diff options
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | po/de.po | 52 | ||||
-rw-r--r-- | po/fr.po | 52 | ||||
-rw-r--r-- | po/ja.po | 52 | ||||
-rw-r--r-- | po/quilt.pot | 50 | ||||
-rw-r--r-- | quilt.changes | 7 | ||||
-rw-r--r-- | quilt/import.in | 19 | ||||
-rw-r--r-- | quilt/scripts/patchfns.in | 41 | ||||
-rw-r--r-- | test/import.test | 93 |
9 files changed, 262 insertions, 106 deletions
@@ -90,8 +90,6 @@ quilt import: - Add option to replace the currently applied patch with a new one, by backing out the topmost patch first. - - Add an -R option for reverse-applying a patch. - quilt setup: - Also recognize other uses of tar and patch (with options in the @@ -181,7 +181,7 @@ msgstr "" msgid "No next patch\\n" msgstr "Kein Patch %s\\n" -#: quilt/delete.in:102 quilt/scripts/patchfns.in:559 +#: quilt/delete.in:102 quilt/scripts/patchfns.in:579 msgid "Patch %s is currently applied\\n" msgstr "Patch %s ist momentan angewandt\\n" @@ -608,13 +608,16 @@ msgid "Appended text to header of patch %s\\n" msgstr "Text an Header von Patch %s angefügt\\n" #: quilt/import.in:22 +#, fuzzy msgid "" -"Usage: quilt import [-p num] [-P patch] [-f] [-d {o|a|n}] patchfile ...\\n" +"Usage: quilt import [-p num] [-R] [-P patch] [-f] [-d {o|a|n}] patchfile ..." +"\\n" msgstr "" "Verwendung: quilt import [-p num] [-P patch] [-f] [-d {o|a|n}] " "[patchdatei] ...\\n" #: quilt/import.in:25 +#, fuzzy msgid "" "\n" "Import external patches. The patches will be inserted following the\n" @@ -623,6 +626,9 @@ msgid "" "-p num\n" "\tNumber of directory levels to strip when applying (default=1)\n" "\n" +"-R\n" +"\tApply patch in reverse.\n" +"\n" "-P patch\n" "\tPatch filename to use inside quilt. This option can only be\n" "\tused when importing a single patch.\n" @@ -654,51 +660,51 @@ msgstr "" "\tOption angegeben werden. Diese Option ist nur in Kombination mit -f " "wirksam.\n" -#: quilt/import.in:68 +#: quilt/import.in:71 msgid "Patch headers differ:\\n" msgstr "Die Patch-Header unterscheiden sich:\\n" -#: quilt/import.in:71 +#: quilt/import.in:74 msgid "Please use -d {o|a|n} to specify which patch header(s) to keep.\\n" msgstr "" "Bitte verwenden Sie die Option -d {o|a|n} um anzugeben, welche Patch-Header " "erhalten bleiben sollen.\\n" -#: quilt/import.in:133 +#: quilt/import.in:139 msgid "Option \\`-P' can only be used when importing a single patch\\n" msgstr "" "Die Option \\`-P' kann nur beim Importieren eines einzelnen Patches " "verwendet werden\\n" -#: quilt/import.in:153 +#: quilt/import.in:168 msgid "Patch %s is applied\\n" msgstr "Patch %s ist angewandt\\n" -#: quilt/import.in:162 +#: quilt/import.in:177 msgid "Patch %s already exists in series.\\n" msgstr "Patch %s existiert bereits in der series-Datei\\n" -#: quilt/import.in:168 +#: quilt/import.in:183 msgid "Patch %s exists. Replace with -f.\\n" msgstr "Patch %s existiert bereits. Ersetzen mit -f.\\n" -#: quilt/import.in:179 +#: quilt/import.in:194 msgid "Replacing patch %s with new version\\n" msgstr "Ersetze Patch %s durch neuere Version\\n" -#: quilt/import.in:183 +#: quilt/import.in:198 msgid "Importing patch %s\\n" msgstr "Importiere patch %s\\n" -#: quilt/import.in:185 +#: quilt/import.in:200 msgid "Importing patch %s (stored as %s)\\n" msgstr "Importiere Patch %s (abgelegt als %s)\\n" -#: quilt/import.in:198 +#: quilt/import.in:213 msgid "Failed to import patch %s\\n" msgstr "Konnte Patch %s nicht importieren\\n" -#: quilt/import.in:207 quilt/refresh.in:328 +#: quilt/import.in:222 quilt/refresh.in:328 msgid "Failed to insert patch %s into file series\\n" msgstr "Konnte Patch %s nicht in die series-Datei einfügen\\n" @@ -919,11 +925,11 @@ msgstr "" "\n" "-v\tViele Meldungen ausgeben.\n" -#: quilt/pop.in:98 quilt/scripts/patchfns.in:860 +#: quilt/pop.in:98 quilt/scripts/patchfns.in:880 msgid "Failed to copy files to temporary directory\\n" msgstr "Konnte Dateien nicht in temporäres Verzeichnis kopieren\\n" -#: quilt/pop.in:122 quilt/scripts/patchfns.in:883 +#: quilt/pop.in:122 quilt/scripts/patchfns.in:903 msgid "Failed to patch temporary files\\n" msgstr "Konnte temporäre Dateien nicht patchen\\n" @@ -949,7 +955,7 @@ msgstr "Patch %s muss zuerst aktualisiert werden (Refresh).\\n" msgid "No patch removed\\n" msgstr "Kein Patch entfernt\\n" -#: quilt/pop.in:267 quilt/scripts/patchfns.in:474 +#: quilt/pop.in:267 quilt/scripts/patchfns.in:494 msgid "No patches applied\\n" msgstr "Keine Patches angewandt\\n" @@ -1293,27 +1299,27 @@ msgstr "Anzeigename `%s' enthält eine unvollständige Klammerung\n" msgid "Delivery address `%s' is invalid\n" msgstr "Zustelladresse `%s' ist ungültig\n" -#: quilt/scripts/patchfns.in:461 +#: quilt/scripts/patchfns.in:481 msgid "No patches in series\\n" msgstr "Keine Patches in der series-Datei\\n" -#: quilt/scripts/patchfns.in:510 +#: quilt/scripts/patchfns.in:530 msgid "Patch %s is not in series\\n" msgstr "Patch %s ist nicht in der series-Datei\\n" -#: quilt/scripts/patchfns.in:538 +#: quilt/scripts/patchfns.in:558 msgid "Patch %s is not applied\\n" msgstr "Patch %s ist nicht angewandt\\n" -#: quilt/scripts/patchfns.in:575 +#: quilt/scripts/patchfns.in:595 msgid "File series fully applied, ends at patch %s\\n" msgstr "series-Datei vollständig angewandt, endet in Patch %s\\n" -#: quilt/scripts/patchfns.in:597 +#: quilt/scripts/patchfns.in:617 msgid "Patch %s does not exist\\n" msgstr "Patch %s existiert nicht\\n" -#: quilt/scripts/patchfns.in:916 +#: quilt/scripts/patchfns.in:936 msgid "" "The quilt meta-data in this tree has version %s, but this version of quilt " "can only handle meta-data formats up to and including version %s. Please pop " @@ -1326,7 +1332,7 @@ msgstr "" "quilt alle Patches mit der Version von quilt, die zur Erstellung des " "Arbeitsverzeichnisses verwendet wurde.\\n" -#: quilt/scripts/patchfns.in:1001 +#: quilt/scripts/patchfns.in:1021 msgid "" "The working tree was created by an older version of quilt. Please run 'quilt " "upgrade'.\\n" @@ -181,7 +181,7 @@ msgstr "" msgid "No next patch\\n" msgstr "Pas de patch suivant\\n" -#: quilt/delete.in:102 quilt/scripts/patchfns.in:559 +#: quilt/delete.in:102 quilt/scripts/patchfns.in:579 msgid "Patch %s is currently applied\\n" msgstr "Le patch %s est actuellement appliqu\\n" @@ -612,13 +612,16 @@ msgid "Appended text to header of patch %s\\n" msgstr "Texte ajout la fin de l'en-tte du patch %s\\n" #: quilt/import.in:22 +#, fuzzy msgid "" -"Usage: quilt import [-p num] [-P patch] [-f] [-d {o|a|n}] patchfile ...\\n" +"Usage: quilt import [-p num] [-R] [-P patch] [-f] [-d {o|a|n}] patchfile ..." +"\\n" msgstr "" "Usage : quilt import [-p num] [-P patch] [-f] [-d {o|a|n}] " "fichier_de_patch ...\\n" #: quilt/import.in:25 +#, fuzzy msgid "" "\n" "Import external patches. The patches will be inserted following the\n" @@ -627,6 +630,9 @@ msgid "" "-p num\n" "\tNumber of directory levels to strip when applying (default=1)\n" "\n" +"-R\n" +"\tApply patch in reverse.\n" +"\n" "-P patch\n" "\tPatch filename to use inside quilt. This option can only be\n" "\tused when importing a single patch.\n" @@ -659,49 +665,49 @@ msgstr "" "\ten-ttes, cette option doit tre spcifie. Cette option n'est\n" "\teffective que lorsque -f est utilis.\n" -#: quilt/import.in:68 +#: quilt/import.in:71 msgid "Patch headers differ:\\n" msgstr "Les en-ttes des patches diffrent :\\n" -#: quilt/import.in:71 +#: quilt/import.in:74 msgid "Please use -d {o|a|n} to specify which patch header(s) to keep.\\n" msgstr "" "Veuillez utiliser -d {o|a|n} pour spcifier quel(s) en-tte(s) conserver.\\n" -#: quilt/import.in:133 +#: quilt/import.in:139 msgid "Option \\`-P' can only be used when importing a single patch\\n" msgstr "" "L'option -P ne peut tre utilis que lors de l'import d'un seul patch.\\n" -#: quilt/import.in:153 +#: quilt/import.in:168 msgid "Patch %s is applied\\n" msgstr "Le patch %s n'est pas appliqu\\n" -#: quilt/import.in:162 +#: quilt/import.in:177 msgid "Patch %s already exists in series.\\n" msgstr "Le patch %s existe dj dans la srie.\\n" -#: quilt/import.in:168 +#: quilt/import.in:183 msgid "Patch %s exists. Replace with -f.\\n" msgstr "Le patch %s existe. Utilisez -f pour le remplacer.\\n" -#: quilt/import.in:179 +#: quilt/import.in:194 msgid "Replacing patch %s with new version\\n" msgstr "Remplacement du patch %s avec la nouvelle version\\n" -#: quilt/import.in:183 +#: quilt/import.in:198 msgid "Importing patch %s\\n" msgstr "Import du patch %s\\n" -#: quilt/import.in:185 +#: quilt/import.in:200 msgid "Importing patch %s (stored as %s)\\n" msgstr "Import du patch %s (enregistr dans %s)\\n" -#: quilt/import.in:198 +#: quilt/import.in:213 msgid "Failed to import patch %s\\n" msgstr "Impossible d'importer le patch %s\\n" -#: quilt/import.in:207 quilt/refresh.in:328 +#: quilt/import.in:222 quilt/refresh.in:328 msgid "Failed to insert patch %s into file series\\n" msgstr "Impossible d'inserer %s dans le fichier de srie.\\n" @@ -931,11 +937,11 @@ msgstr "" "\n" "-v\tOpre verbeusement.\n" -#: quilt/pop.in:98 quilt/scripts/patchfns.in:860 +#: quilt/pop.in:98 quilt/scripts/patchfns.in:880 msgid "Failed to copy files to temporary directory\\n" msgstr "Impossible de copier les fichiers dans le rpertoire temporaire\\n" -#: quilt/pop.in:122 quilt/scripts/patchfns.in:883 +#: quilt/pop.in:122 quilt/scripts/patchfns.in:903 msgid "Failed to patch temporary files\\n" msgstr "Impossible de patcher les fichiers temporaires\\n" @@ -961,7 +967,7 @@ msgstr "Le patch %s doit tre rafraichi au pralable.\\n" msgid "No patch removed\\n" msgstr "Aucun patch retir\\n" -#: quilt/pop.in:267 quilt/scripts/patchfns.in:474 +#: quilt/pop.in:267 quilt/scripts/patchfns.in:494 msgid "No patches applied\\n" msgstr "Aucun patch n'est appliqu\\n" @@ -1306,27 +1312,27 @@ msgstr "Le nom `%s' est mal parenths\n" msgid "Delivery address `%s' is invalid\n" msgstr "L'adresse de destination `%s' est invalide\n" -#: quilt/scripts/patchfns.in:461 +#: quilt/scripts/patchfns.in:481 msgid "No patches in series\\n" msgstr "Aucun patch dans la srie\\n" -#: quilt/scripts/patchfns.in:510 +#: quilt/scripts/patchfns.in:530 msgid "Patch %s is not in series\\n" msgstr "Le patch %s n'est pas dans la srie\\n" -#: quilt/scripts/patchfns.in:538 +#: quilt/scripts/patchfns.in:558 msgid "Patch %s is not applied\\n" msgstr "Le patch %s n'est pas appliqu\\n" -#: quilt/scripts/patchfns.in:575 +#: quilt/scripts/patchfns.in:595 msgid "File series fully applied, ends at patch %s\\n" msgstr "La srie est compltement applique. Le dernier patch est %s.\\n" -#: quilt/scripts/patchfns.in:597 +#: quilt/scripts/patchfns.in:617 msgid "Patch %s does not exist\\n" msgstr "Le patch %s n'existe pas\\n" -#: quilt/scripts/patchfns.in:916 +#: quilt/scripts/patchfns.in:936 msgid "" "The quilt meta-data in this tree has version %s, but this version of quilt " "can only handle meta-data formats up to and including version %s. Please pop " @@ -1338,7 +1344,7 @@ msgstr "" "format %s (inclus). Veuillez retirer vos patches avec la version \n" "utilise pour les appliquer avant d'installer une version plus ancienne.\\n" -#: quilt/scripts/patchfns.in:1001 +#: quilt/scripts/patchfns.in:1021 msgid "" "The working tree was created by an older version of quilt. Please run 'quilt " "upgrade'.\\n" @@ -177,7 +177,7 @@ msgstr "" msgid "No next patch\\n" msgstr "次のパッチはありません\\n" -#: quilt/delete.in:102 quilt/scripts/patchfns.in:559 +#: quilt/delete.in:102 quilt/scripts/patchfns.in:579 msgid "Patch %s is currently applied\\n" msgstr "パッチ %s は現在適用されています\\n" @@ -589,13 +589,16 @@ msgid "Appended text to header of patch %s\\n" msgstr "パッチ %s のヘッダに追加しました\\n" #: quilt/import.in:22 +#, fuzzy msgid "" -"Usage: quilt import [-p num] [-P patch] [-f] [-d {o|a|n}] patchfile ...\\n" +"Usage: quilt import [-p num] [-R] [-P patch] [-f] [-d {o|a|n}] patchfile ..." +"\\n" msgstr "" "使い方: quilt import [-p num] [-P パッチ] [-f] [-d {o|a|n}] パッチファイ" "ル ...\\n" #: quilt/import.in:25 +#, fuzzy msgid "" "\n" "Import external patches. The patches will be inserted following the\n" @@ -604,6 +607,9 @@ msgid "" "-p num\n" "\tNumber of directory levels to strip when applying (default=1)\n" "\n" +"-R\n" +"\tApply patch in reverse.\n" +"\n" "-P patch\n" "\tPatch filename to use inside quilt. This option can only be\n" "\tused when importing a single patch.\n" @@ -634,48 +640,48 @@ msgstr "" "\tがある場合は必ずこのオプションを指定する必要がある。このオプショ\n" "\tンは -fが指定された時のみ有効。\n" -#: quilt/import.in:68 +#: quilt/import.in:71 msgid "Patch headers differ:\\n" msgstr "パッチヘッダの差異:\\n" -#: quilt/import.in:71 +#: quilt/import.in:74 msgid "Please use -d {o|a|n} to specify which patch header(s) to keep.\\n" msgstr "" "どのパッチヘッダを残すか、オプション -d {o|a|n}を使って指定してください" -#: quilt/import.in:133 +#: quilt/import.in:139 msgid "Option \\`-P' can only be used when importing a single patch\\n" msgstr "オプション \\`-P'は、パッチを一つだけ取り込むときのみ有効です\\n" -#: quilt/import.in:153 +#: quilt/import.in:168 msgid "Patch %s is applied\\n" msgstr "パッチ %s は、すでに適用されています\\n" -#: quilt/import.in:162 +#: quilt/import.in:177 msgid "Patch %s already exists in series.\\n" msgstr "パッチ %s は、すでに seriesの中にあります\\n" -#: quilt/import.in:168 +#: quilt/import.in:183 msgid "Patch %s exists. Replace with -f.\\n" msgstr "パッチ %s は、すでに存在します。-fで置き換えることができます\\n" -#: quilt/import.in:179 +#: quilt/import.in:194 msgid "Replacing patch %s with new version\\n" msgstr "パッチ %s を新しいバージョンに置き換えます\\n" -#: quilt/import.in:183 +#: quilt/import.in:198 msgid "Importing patch %s\\n" msgstr "パッチ %s を取り込みます\\n" -#: quilt/import.in:185 +#: quilt/import.in:200 msgid "Importing patch %s (stored as %s)\\n" msgstr "パッチ %s を取り込んでいます (%s として保存されます)\\n" -#: quilt/import.in:198 +#: quilt/import.in:213 msgid "Failed to import patch %s\\n" msgstr "パッチ %s の取り込みに失敗しました\\n" -#: quilt/import.in:207 quilt/refresh.in:328 +#: quilt/import.in:222 quilt/refresh.in:328 msgid "Failed to insert patch %s into file series\\n" msgstr "seriesファイルへのパッチ %s の書き込みに失敗しました\\n" @@ -896,11 +902,11 @@ msgstr "" "\n" "-v\t詳細に表示。\n" -#: quilt/pop.in:98 quilt/scripts/patchfns.in:860 +#: quilt/pop.in:98 quilt/scripts/patchfns.in:880 msgid "Failed to copy files to temporary directory\\n" msgstr "テンポラリディレクトリへのファイルコピーに失敗しました\\n" -#: quilt/pop.in:122 quilt/scripts/patchfns.in:883 +#: quilt/pop.in:122 quilt/scripts/patchfns.in:903 msgid "Failed to patch temporary files\\n" msgstr "テンポラリファイルへのパッチ適用に失敗しました\\n" @@ -926,7 +932,7 @@ msgstr "最初に、パッチ %s のリフレッシュが必要です。\\n" msgid "No patch removed\\n" msgstr "適用されているパッチはありません\\n" -#: quilt/pop.in:267 quilt/scripts/patchfns.in:474 +#: quilt/pop.in:267 quilt/scripts/patchfns.in:494 msgid "No patches applied\\n" msgstr "適用されているパッチはありません\\n" @@ -1263,28 +1269,28 @@ msgstr "表示用の名前 `%s' が対にならない括弧を含んでいます msgid "Delivery address `%s' is invalid\n" msgstr "配送先のアドレス `%s' が不正です\n" -#: quilt/scripts/patchfns.in:461 +#: quilt/scripts/patchfns.in:481 msgid "No patches in series\\n" msgstr "シリーズに登録されているパッチがありません\\n" -#: quilt/scripts/patchfns.in:510 +#: quilt/scripts/patchfns.in:530 msgid "Patch %s is not in series\\n" msgstr "パッチ %s は seriesの中にありません\\n" -#: quilt/scripts/patchfns.in:538 +#: quilt/scripts/patchfns.in:558 msgid "Patch %s is not applied\\n" msgstr "パッチ %s は適用されていません\\n" -#: quilt/scripts/patchfns.in:575 +#: quilt/scripts/patchfns.in:595 msgid "File series fully applied, ends at patch %s\\n" msgstr "" "seriesファイルのパッチはすべて適用されています。最終パッチは %s です。\\n" -#: quilt/scripts/patchfns.in:597 +#: quilt/scripts/patchfns.in:617 msgid "Patch %s does not exist\\n" msgstr "パッチ %s が存在しません\\n" -#: quilt/scripts/patchfns.in:916 +#: quilt/scripts/patchfns.in:936 msgid "" "The quilt meta-data in this tree has version %s, but this version of quilt " "can only handle meta-data formats up to and including version %s. Please pop " @@ -1296,7 +1302,7 @@ msgstr "" "ていません。ダウングレードする前に、pushしたバージョンの quiltを使って、\n" "すべてのパッチを pop してください。\\n" -#: quilt/scripts/patchfns.in:1001 +#: quilt/scripts/patchfns.in:1021 msgid "" "The working tree was created by an older version of quilt. Please run 'quilt " "upgrade'.\\n" diff --git a/po/quilt.pot b/po/quilt.pot index 486c1b3..52fe917 100644 --- a/po/quilt.pot +++ b/po/quilt.pot @@ -119,7 +119,7 @@ msgstr "" msgid "No next patch\\n" msgstr "" -#: quilt/delete.in:102 quilt/scripts/patchfns.in:559 +#: quilt/delete.in:102 quilt/scripts/patchfns.in:579 msgid "Patch %s is currently applied\\n" msgstr "" @@ -397,7 +397,8 @@ msgstr "" #: quilt/import.in:22 msgid "" -"Usage: quilt import [-p num] [-P patch] [-f] [-d {o|a|n}] patchfile ...\\n" +"Usage: quilt import [-p num] [-R] [-P patch] [-f] [-d {o|a|n}] patchfile ..." +"\\n" msgstr "" #: quilt/import.in:25 @@ -409,6 +410,9 @@ msgid "" "-p num\n" "\tNumber of directory levels to strip when applying (default=1)\n" "\n" +"-R\n" +"\tApply patch in reverse.\n" +"\n" "-P patch\n" "\tPatch filename to use inside quilt. This option can only be\n" "\tused when importing a single patch.\n" @@ -421,47 +425,47 @@ msgid "" "\tmust be specified. This option is only effective when -f is used.\n" msgstr "" -#: quilt/import.in:68 +#: quilt/import.in:71 msgid "Patch headers differ:\\n" msgstr "" -#: quilt/import.in:71 +#: quilt/import.in:74 msgid "Please use -d {o|a|n} to specify which patch header(s) to keep.\\n" msgstr "" -#: quilt/import.in:133 +#: quilt/import.in:139 msgid "Option \\`-P' can only be used when importing a single patch\\n" msgstr "" -#: quilt/import.in:153 +#: quilt/import.in:168 msgid "Patch %s is applied\\n" msgstr "" -#: quilt/import.in:162 +#: quilt/import.in:177 msgid "Patch %s already exists in series.\\n" msgstr "" -#: quilt/import.in:168 +#: quilt/import.in:183 msgid "Patch %s exists. Replace with -f.\\n" msgstr "" -#: quilt/import.in:179 +#: quilt/import.in:194 msgid "Replacing patch %s with new version\\n" msgstr "" -#: quilt/import.in:183 +#: quilt/import.in:198 msgid "Importing patch %s\\n" msgstr "" -#: quilt/import.in:185 +#: quilt/import.in:200 msgid "Importing patch %s (stored as %s)\\n" msgstr "" -#: quilt/import.in:198 +#: quilt/import.in:213 msgid "Failed to import patch %s\\n" msgstr "" -#: quilt/import.in:207 quilt/refresh.in:328 +#: quilt/import.in:222 quilt/refresh.in:328 msgid "Failed to insert patch %s into file series\\n" msgstr "" @@ -611,11 +615,11 @@ msgid "" "-v\tVerbose operation.\n" msgstr "" -#: quilt/pop.in:98 quilt/scripts/patchfns.in:860 +#: quilt/pop.in:98 quilt/scripts/patchfns.in:880 msgid "Failed to copy files to temporary directory\\n" msgstr "" -#: quilt/pop.in:122 quilt/scripts/patchfns.in:883 +#: quilt/pop.in:122 quilt/scripts/patchfns.in:903 msgid "Failed to patch temporary files\\n" msgstr "" @@ -639,7 +643,7 @@ msgstr "" msgid "No patch removed\\n" msgstr "" -#: quilt/pop.in:267 quilt/scripts/patchfns.in:474 +#: quilt/pop.in:267 quilt/scripts/patchfns.in:494 msgid "No patches applied\\n" msgstr "" @@ -877,27 +881,27 @@ msgstr "" msgid "Delivery address `%s' is invalid\n" msgstr "" -#: quilt/scripts/patchfns.in:461 +#: quilt/scripts/patchfns.in:481 msgid "No patches in series\\n" msgstr "" -#: quilt/scripts/patchfns.in:510 +#: quilt/scripts/patchfns.in:530 msgid "Patch %s is not in series\\n" msgstr "" -#: quilt/scripts/patchfns.in:538 +#: quilt/scripts/patchfns.in:558 msgid "Patch %s is not applied\\n" msgstr "" -#: quilt/scripts/patchfns.in:575 +#: quilt/scripts/patchfns.in:595 msgid "File series fully applied, ends at patch %s\\n" msgstr "" -#: quilt/scripts/patchfns.in:597 +#: quilt/scripts/patchfns.in:617 msgid "Patch %s does not exist\\n" msgstr "" -#: quilt/scripts/patchfns.in:916 +#: quilt/scripts/patchfns.in:936 msgid "" "The quilt meta-data in this tree has version %s, but this version of quilt " "can only handle meta-data formats up to and including version %s. Please pop " @@ -905,7 +909,7 @@ msgid "" "downgrading.\\n" msgstr "" -#: quilt/scripts/patchfns.in:1001 +#: quilt/scripts/patchfns.in:1021 msgid "" "The working tree was created by an older version of quilt. Please run 'quilt " "upgrade'.\\n" diff --git a/quilt.changes b/quilt.changes index d97a448..0934032 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Wed Feb 21 21:29:29 CET 2007 - khali@linux-fr.org + +- quilt/import.in, quilt/scripts/patchfns.in: Implement import -R + for reverse-applying a patch. Original patch contributed by + Randy Dunlap. + +------------------------------------------------------------------- Tue Feb 20 11:12:05 CET 2007 - khali@linux-fr.org - test/run: Don't attempt to remove comments from command lines. diff --git a/quilt/import.in b/quilt/import.in index 9ee3b35..85160ab 100644 --- a/quilt/import.in +++ b/quilt/import.in @@ -19,7 +19,7 @@ fi usage() { - printf $"Usage: quilt import [-p num] [-P patch] [-f] [-d {o|a|n}] patchfile ...\n" + printf $"Usage: quilt import [-p num] [-R] [-P patch] [-f] [-d {o|a|n}] patchfile ...\n" if [ x$1 = x-h ] then printf $" @@ -29,6 +29,9 @@ current top patch, and must be pushed after import to apply them. -p num Number of directory levels to strip when applying (default=1) +-R + Apply patch in reverse. + -P patch Patch filename to use inside quilt. This option can only be used when importing a single patch. @@ -93,7 +96,7 @@ die() exit $status } -options=`getopt -o P:d:fp:h -- "$@"` +options=`getopt -o P:d:fp:Rh -- "$@"` if [ $? -ne 0 ] then @@ -111,6 +114,9 @@ do -p) opt_strip=$2 shift 2 ;; + -R) + opt_reverse=1 + shift ;; -d) case "$2" in o|n|a) opt_desc=$2 ;; @@ -135,6 +141,15 @@ then fi [ -n "$opt_strip" ] && patch_args="-p$opt_strip" +if [ -n "$opt_reverse" ] +then + if [ -n "$patch_args" ] + then + patch_args="$patch_args -R" + else + patch_args="-R" + fi +fi for patch_file in "$@" do diff --git a/quilt/scripts/patchfns.in b/quilt/scripts/patchfns.in index f2ef913..1c87139 100644 --- a/quilt/scripts/patchfns.in +++ b/quilt/scripts/patchfns.in @@ -136,10 +136,13 @@ patch_args() awk ' {sub(/(^|[ \t]+)#.*/, "") } $1 == "'"$patch"'" \ - { if (NF >= 2) - for (i=2; i <= NF; i++) - print $i - else + { p_printed=0 + for (i=2; i<=NF; i++) { + print $i + if ($i ~ /^-p/) + p_printed=1 + } + if (!p_printed) print "-p1" ; exit } @@ -161,6 +164,7 @@ patch_strip_level() echo "1" } +# Also remove -R if present. change_db_strip_level() { local level=$1 patch=$2 @@ -176,14 +180,33 @@ change_db_strip_level() then local tmpfile=$(gen_tempfile) awk ' + function remove_arg(nr, j) { + for (j=nr; j<NF; j++) + $j=$(j+1) + NF-- + } /^'"$(quote_re $patch)"'([ \t]|$)/ \ - { for(i=2; i<=NF; i++) + { p_printed=0 + for (i=2; i<=NF; i++) { + if ($i ~ /^#/) break if ($i ~ /^-p/) { - $i="'"$level"'" - break + if ("'"$level"'" == "") + remove_arg(i--) + else + $i="'"$level"'" + p_printed=1 + continue + } + if ($i == "-R") { + remove_arg(i--) + continue } - if (i > NF && "'"$level"'" != "") - $i="'"$level"'" + } + if (!p_printed && "'"$level"'" != "") { + for (j=NF; j>i; j--) + $(j+1)=$j + $i="'"$level"'" + } } { print } ' $SERIES > $tmpfile diff --git a/test/import.test b/test/import.test index 4f10ca1..c693810 100644 --- a/test/import.test +++ b/test/import.test @@ -14,7 +14,27 @@ $ quilt refresh > Refreshed patch %{P}patch1.diff - $ quilt pop + $ quilt new patchR.diff + > Patch %{P}patchR.diff is now on top + + $ quilt add f + > File f added to patch %{P}patchR.diff + + $ rm -f f + + $ quilt refresh + > Refreshed patch %{P}patchR.diff + + $ quilt fork patchRp0.diff + > Fork of patch %{P}patchR.diff created as %{P}patchRp0.diff + + $ quilt refresh -p0 + > Refreshed patch %{P}patchRp0.diff + + $ quilt pop -a + > Removing patch patches/patchRp0.diff + > Restoring f + > > Removing patch patches/patch1.diff > Removing f > @@ -22,6 +42,8 @@ $ mkdir t $ mv patches/patch1.diff t/patch1.diff + $ mv patches/patchR.diff t/patchR.diff + $ mv patches/patchRp0.diff t/patchRp0.diff # test importing into an empty series $ rm -rf patches/ .pc/ @@ -137,5 +159,74 @@ $ quilt delete patch1.diff > Patch patch1.diff is not in series + # test importing a reverse patch + $ rm -rf patches/ .pc/ + $ mkdir patches + $ quilt import -R t/patchR.diff + > Importing patch t/patchR.diff (stored as patches/patchR.diff) + + $ quilt push + > Applying patch patches/patchR.diff + >~ patching file `?f'? + > + > Now at patch patches/patchR.diff + + $ cat f + > f + + $ cat patches/series + > patchR.diff -R + + # test that comments are preserved + $ echo "# Test of -R import" > patches/series + $ echo "patchR.diff -R # This patch was originally -R -p1" >> patches/series + + # refreshing a reverse patch un-reverses it + $ quilt refresh + > Refreshed patch %{P}patchR.diff + + $ cat patches/series + > # Test of -R import + > patchR.diff # This patch was originally -R -p1 + + $ touch f + $ quilt pop + > Removing patch patches/patchR.diff + > Removing f + > + > No patches applied + + # test importing a reverse patch with strip level + $ rm -rf patches/ .pc/ + $ mkdir patches + $ quilt import -R -p0 t/patchRp0.diff + > Importing patch t/patchRp0.diff (stored as patches/patchRp0.diff) + + $ quilt push + > Applying patch patches/patchRp0.diff + >~ patching file `?f'? + > + > Now at patch patches/patchRp0.diff + + $ cat f + > f + + $ cat patches/series + > patchRp0.diff -p0 -R + + # refreshing a reverse patch un-reverses it + $ quilt refresh + > Refreshed patch %{P}patchRp0.diff + + $ cat patches/series + > patchRp0.diff -p0 + + $ touch f + $ quilt pop + > Removing patch patches/patchRp0.diff + > Removing f + > + > No patches applied + $ cd .. $ rm -rf d |