diff options
-rw-r--r-- | po/de.po | 60 | ||||
-rw-r--r-- | po/fr.po | 49 | ||||
-rw-r--r-- | po/quilt.pot | 47 | ||||
-rw-r--r-- | quilt.changes | 6 | ||||
-rw-r--r-- | quilt/diff.in | 46 |
5 files changed, 133 insertions, 75 deletions
@@ -65,7 +65,7 @@ msgstr "" "-p patch\n" "\tDer Patch, zu dem die Dateien hinzugefügt werden sollen." -#: ../quilt/add.in:54 ../quilt/diff.in:116 ../quilt/diff.in:127 +#: ../quilt/add.in:54 ../quilt/diff.in:140 ../quilt/diff.in:151 #: ../quilt/remove.in:52 msgid "Patch $2 is not in series" msgstr "Patch $2 ist in der series-Datei nicht enthalten" @@ -75,7 +75,7 @@ msgstr "Patch $2 ist in der series-Datei nicht enthalten" msgid "Patch $patch is not applied" msgstr "Patch $patch ist nicht angewandt" -#: ../quilt/add.in:82 ../quilt/delete.in:67 ../quilt/diff.in:174 +#: ../quilt/add.in:82 ../quilt/delete.in:67 ../quilt/diff.in:211 #: ../quilt/files.in:75 ../quilt/fold.in:78 ../quilt/fork.in:64 #: ../quilt/pop.in:181 ../quilt/push.in:179 ../quilt/push.in:215 #: ../quilt/refresh.in:113 ../quilt/remove.in:80 @@ -153,10 +153,10 @@ msgstr "Konnte Patch $patch nicht entfernen" #: ../quilt/diff.in:22 msgid "" "Usage: quilt diff [-p n] [-c patch|-z] [-R] [-P patch] [--snapshot] [--" -"diff=utility] [file ...]" +"diff=utility] [--color] [file ...]" msgstr "" "Verwendung: quilt diff [-p n] [-c patch|-z] [-R] [-P patch] [--snapshot] [--" -"diff=programm] [datei ...]" +"diff=programm] [--color] [datei ...]" #: ../quilt/diff.in:26 msgid "" @@ -190,7 +190,10 @@ msgid "" "\n" "--no-timestamps\n" "\tDo not include file timestamps in patch headers (as if\n" -" QUILT_DIFF_NO_TIMESTAMPS were set to yes)." +" QUILT_DIFF_NO_TIMESTAMPS were set to yes).\n" +"\t\n" +"--color[=always|auto|never]\n" +"\tUse ANSI escape sequences to colorize the result." msgstr "" "\n" "Erzeugt ein Diff der angegebenen Dateien im obersten oder angegebenen\n" @@ -220,59 +223,62 @@ msgstr "" "aufgerufen.\n" "\n" "--no-timestamps\n" -"\tKeine Zeitstempel in Patches angeben (wie QUILT_DIFF_NO_TIMESTAMPS in" -"~/.quiltrc)." +"\tKeine Zeitstempel in Patches angeben (wie QUILT_DIFF_NO_TIMESTAMPS in~/." +"quiltrc)." +"\t\n" +"--color[=always|auto|never]\n" +"\tVerwende ANSI Escapesequenzen, und färbe das Ergebnis ein." -#: ../quilt/diff.in:159 +#: ../quilt/diff.in:196 msgid "Options \\`-c patch', \\`--snapshot', and \\`-z' cannot be combined." msgstr "" "Die Optionen \\`-c patch', \\`--snapshot', und \\`-z' können nicht " "kombiniert werden." -#: ../quilt/diff.in:167 +#: ../quilt/diff.in:204 msgid "Patch $last_patch is not applied" msgstr "Patch $last_patch ist nicht angewandt" -#: ../quilt/diff.in:185 +#: ../quilt/diff.in:222 msgid "" "Cannot diff patches with -p$opt_strip_level, please specify -p0 or -p1 " "instead" msgstr "" "Kann kein Diff mit -p$opt_strip_level erzeugen, bitte -p0 oder -p1 verwenden." -#: ../quilt/diff.in:219 +#: ../quilt/diff.in:256 msgid "Patch $first_patch not applied before $last_patch." msgstr "Patch $first_patch ist nicht vor Patch $last_patch angewandt." -#: ../quilt/diff.in:253 +#: ../quilt/diff.in:290 msgid "Cannot change into $QUILT_PC/$last_patch" msgstr "Kann nicht in Verzeichnis $QUILT_PC/$last_patch wechseln." -#: ../quilt/diff.in:259 ../scripts/rpatch.in:62 +#: ../quilt/diff.in:296 ../scripts/rpatch.in:62 msgid "Failed to copy files to temporary directory" msgstr "Konnte Dateien nicht in ein temporäres Verzeichnis kopieren" -#: ../quilt/diff.in:270 +#: ../quilt/diff.in:307 msgid "Cannot change to temporary directory" msgstr "Kann nicht in temporäres Verzeichnis wechseln" -#: ../quilt/diff.in:289 ../scripts/rpatch.in:85 +#: ../quilt/diff.in:326 ../scripts/rpatch.in:85 msgid "Failed to patch temporary files" msgstr "Konnte temporäre Dateien nicht patchen" -#: ../quilt/diff.in:295 +#: ../quilt/diff.in:332 msgid "Cannot change to source directory" msgstr "Kann nicht in Quellverzeichnis wechseln" -#: ../quilt/diff.in:313 +#: ../quilt/diff.in:350 msgid "File $file is not being modified." msgstr "Datei $file wird nicht verändert." -#: ../quilt/diff.in:332 ../quilt/refresh.in:145 +#: ../quilt/diff.in:370 ../quilt/refresh.in:145 msgid "Diff failed, aborting." msgstr "Diff fehlgeschlagen, Abbruch." -#: ../quilt/diff.in:339 +#: ../quilt/diff.in:377 msgid "More recent patches modify files in $last_patch." msgstr "Später angewandte Patches verändern Dateien von $last_patch." @@ -412,27 +418,27 @@ msgstr "" "Die Option \\`-n' kann nur beim Importieren eines einzelnen Patches " "verwendet werden" -#: ../quilt/import.in:94 +#: ../quilt/import.in:90 msgid "Patch $patch is applied." msgstr "Patch $patch ist angewandt." -#: ../quilt/import.in:102 +#: ../quilt/import.in:98 msgid "Patch $patch exists. Replace with -f." msgstr "Patch $patch existiert bereits. Ersetzen mit -f." -#: ../quilt/import.in:105 +#: ../quilt/import.in:101 msgid "Replacing patch $patch with new version" msgstr "Ersetze Patch $patch durch neuere Version" -#: ../quilt/import.in:107 +#: ../quilt/import.in:103 msgid "Importing patch $patch_file (stored as $patch)" msgstr "Importiere Patch $patch_file (abgelegt als $patch)" -#: ../quilt/import.in:113 +#: ../quilt/import.in:109 msgid "Failed to import patch $patch" msgstr "Konnte Patch $patch nicht importieren" -#: ../quilt/import.in:120 +#: ../quilt/import.in:116 msgid "Failed to insert $patch in file series." msgstr "Konnte Patch $patch nicht in die series-Datei einfügen." @@ -713,8 +719,8 @@ msgstr "" "-f\tAuffrischen erzwingen, selbst wenn Patches über dem angegebenen Patch\n" "\teinige der selben Dateien verändern.\n" "--no-timestamps\n" -"\tKeine Zeitstempel in Patches angeben (wie QUILT_DIFF_NO_TIMESTAMPS in" -"~/.quiltrc)." +"\tKeine Zeitstempel in Patches angeben (wie QUILT_DIFF_NO_TIMESTAMPS in~/." +"quiltrc)." #: ../quilt/refresh.in:101 msgid "Patch $opt_patch is not in series" @@ -66,7 +66,7 @@ msgstr "" "-p patch\n" "\tPatch auquel les fichiers doivent être ajoutés." -#: ../quilt/add.in:54 ../quilt/diff.in:116 ../quilt/diff.in:127 +#: ../quilt/add.in:54 ../quilt/diff.in:140 ../quilt/diff.in:151 #: ../quilt/remove.in:52 msgid "Patch $2 is not in series" msgstr "Le patch $2 n'est pas dans la série" @@ -76,7 +76,7 @@ msgstr "Le patch $2 n'est pas dans la série" msgid "Patch $patch is not applied" msgstr "Le patch $patch n'est pas appliqué" -#: ../quilt/add.in:82 ../quilt/delete.in:67 ../quilt/diff.in:174 +#: ../quilt/add.in:82 ../quilt/delete.in:67 ../quilt/diff.in:211 #: ../quilt/files.in:75 ../quilt/fold.in:78 ../quilt/fork.in:64 #: ../quilt/pop.in:181 ../quilt/push.in:179 ../quilt/push.in:215 #: ../quilt/refresh.in:113 ../quilt/remove.in:80 @@ -152,14 +152,16 @@ msgid "Failed to remove patch $patch" msgstr "Impossible de retirer le patch $patch" #: ../quilt/diff.in:22 +#, fuzzy msgid "" "Usage: quilt diff [-p n] [-c patch|-z] [-R] [-P patch] [--snapshot] [--" -"diff=utility] [file ...]" +"diff=utility] [--color] [file ...]" msgstr "" "Usage : quilt diff [-p n] [-c patch|-z] [-R] [-P patch] [--snapshot] [--" "diff=programme] [fichier ...]" #: ../quilt/diff.in:26 +#, fuzzy msgid "" "\n" "Produces a diff of the specified file(s) in the topmost or specified\n" @@ -191,7 +193,10 @@ msgid "" "\n" "--no-timestamps\n" "\tDo not include file timestamps in patch headers (as if\n" -" QUILT_DIFF_NO_TIMESTAMPS were set to yes)." +" QUILT_DIFF_NO_TIMESTAMPS were set to yes).\n" +"\t\n" +"--color[=always|auto|never]\n" +"\tUse ANSI escape sequences to colorize the result." msgstr "" "\n" "Produit un diff du ou des fichiers spécifiés par le patch spécifié (ou à\n" @@ -226,17 +231,17 @@ msgstr "" "\tSupprime les timestamps des entêtes du patch (comme si\n" " QUILT_DIFF_NO_TIMESTAMPS valait \"yes\")." -#: ../quilt/diff.in:159 +#: ../quilt/diff.in:196 msgid "Options \\`-c patch', \\`--snapshot', and \\`-z' cannot be combined." msgstr "" "Les options \\`-c patch', \\`--snapshot' et \\`-z' ne peuvent pas être " "combinées." -#: ../quilt/diff.in:167 +#: ../quilt/diff.in:204 msgid "Patch $last_patch is not applied" msgstr "Le patch $last_patch ne semble pas appliqué" -#: ../quilt/diff.in:185 +#: ../quilt/diff.in:222 msgid "" "Cannot diff patches with -p$opt_strip_level, please specify -p0 or -p1 " "instead" @@ -244,39 +249,39 @@ msgstr "" "Impossible de créer des patches avec -p$opt_strip_level. Veuillez spécifier -" "p0 ou -p1 à la place" -#: ../quilt/diff.in:219 +#: ../quilt/diff.in:256 msgid "Patch $first_patch not applied before $last_patch." msgstr "Le patch $first_patch n'est pas appliqué avant $last_patch." -#: ../quilt/diff.in:253 +#: ../quilt/diff.in:290 msgid "Cannot change into $QUILT_PC/$last_patch" msgstr "Impossible d'entrer dans $QUILT_PC/$last_patch" -#: ../quilt/diff.in:259 ../scripts/rpatch.in:62 +#: ../quilt/diff.in:296 ../scripts/rpatch.in:62 msgid "Failed to copy files to temporary directory" msgstr "Impossible de copier les fichiers dans le répertoire temporaire" -#: ../quilt/diff.in:270 +#: ../quilt/diff.in:307 msgid "Cannot change to temporary directory" msgstr "Impossible d'entrer dans le répertoire temporaire" -#: ../quilt/diff.in:289 ../scripts/rpatch.in:85 +#: ../quilt/diff.in:326 ../scripts/rpatch.in:85 msgid "Failed to patch temporary files" msgstr "Impossible de patcher les fichiers temporaires" -#: ../quilt/diff.in:295 +#: ../quilt/diff.in:332 msgid "Cannot change to source directory" msgstr "Impossible d'entrer dans le répertoire source" -#: ../quilt/diff.in:313 +#: ../quilt/diff.in:350 msgid "File $file is not being modified." msgstr "Le fichier $file n'est pas modifié." -#: ../quilt/diff.in:332 ../quilt/refresh.in:145 +#: ../quilt/diff.in:370 ../quilt/refresh.in:145 msgid "Diff failed, aborting." msgstr "Le diff a échoué. Abandon." -#: ../quilt/diff.in:339 +#: ../quilt/diff.in:377 msgid "More recent patches modify files in $last_patch." msgstr "Un patch plus recent modifie des fichiers communs à $last_patch." @@ -417,27 +422,27 @@ msgid "Option \\`-n' can only be used when importing a single patch" msgstr "" "L'option « -n » ne peut être utilisé que lors de l'import d'un seul patch." -#: ../quilt/import.in:94 +#: ../quilt/import.in:90 msgid "Patch $patch is applied." msgstr "Le patch $patch est appliqué." -#: ../quilt/import.in:102 +#: ../quilt/import.in:98 msgid "Patch $patch exists. Replace with -f." msgstr "Le patch $patch existe. Utilisez -f pour le remplacer." -#: ../quilt/import.in:105 +#: ../quilt/import.in:101 msgid "Replacing patch $patch with new version" msgstr "Remplacement du patch $patch avec la nouvelle version" -#: ../quilt/import.in:107 +#: ../quilt/import.in:103 msgid "Importing patch $patch_file (stored as $patch)" msgstr "Import du patch $patch_file (enregistré dans $patch)" -#: ../quilt/import.in:113 +#: ../quilt/import.in:109 msgid "Failed to import patch $patch" msgstr "Impossible d'importer le patch $patch" -#: ../quilt/import.in:120 +#: ../quilt/import.in:116 msgid "Failed to insert $patch in file series." msgstr "Impossible d'inserer $patch dans le fichier de série." diff --git a/po/quilt.pot b/po/quilt.pot index edacf2f..25abfd2 100644 --- a/po/quilt.pot +++ b/po/quilt.pot @@ -34,7 +34,7 @@ msgid "" "\tPatch to add files to." msgstr "" -#: ../quilt/add.in:54 ../quilt/diff.in:116 ../quilt/diff.in:127 +#: ../quilt/add.in:54 ../quilt/diff.in:140 ../quilt/diff.in:151 #: ../quilt/remove.in:52 msgid "Patch $2 is not in series" msgstr "" @@ -44,7 +44,7 @@ msgstr "" msgid "Patch $patch is not applied" msgstr "" -#: ../quilt/add.in:82 ../quilt/delete.in:67 ../quilt/diff.in:174 +#: ../quilt/add.in:82 ../quilt/delete.in:67 ../quilt/diff.in:211 #: ../quilt/files.in:75 ../quilt/fold.in:78 ../quilt/fork.in:64 #: ../quilt/pop.in:181 ../quilt/push.in:179 ../quilt/push.in:215 #: ../quilt/refresh.in:113 ../quilt/remove.in:80 @@ -113,7 +113,7 @@ msgstr "" #: ../quilt/diff.in:22 msgid "" "Usage: quilt diff [-p n] [-c patch|-z] [-R] [-P patch] [--snapshot] [--" -"diff=utility] [file ...]" +"diff=utility] [--color] [file ...]" msgstr "" #: ../quilt/diff.in:26 @@ -148,56 +148,59 @@ msgid "" "\n" "--no-timestamps\n" "\tDo not include file timestamps in patch headers (as if\n" -" QUILT_DIFF_NO_TIMESTAMPS were set to yes)." +" QUILT_DIFF_NO_TIMESTAMPS were set to yes).\n" +"\t\n" +"--color[=always|auto|never]\n" +"\tUse ANSI escape sequences to colorize the result." msgstr "" -#: ../quilt/diff.in:159 +#: ../quilt/diff.in:196 msgid "Options \\`-c patch', \\`--snapshot', and \\`-z' cannot be combined." msgstr "" -#: ../quilt/diff.in:167 +#: ../quilt/diff.in:204 msgid "Patch $last_patch is not applied" msgstr "" -#: ../quilt/diff.in:185 +#: ../quilt/diff.in:222 msgid "" "Cannot diff patches with -p$opt_strip_level, please specify -p0 or -p1 " "instead" msgstr "" -#: ../quilt/diff.in:219 +#: ../quilt/diff.in:256 msgid "Patch $first_patch not applied before $last_patch." msgstr "" -#: ../quilt/diff.in:253 +#: ../quilt/diff.in:290 msgid "Cannot change into $QUILT_PC/$last_patch" msgstr "" -#: ../quilt/diff.in:259 ../scripts/rpatch.in:62 +#: ../quilt/diff.in:296 ../scripts/rpatch.in:62 msgid "Failed to copy files to temporary directory" msgstr "" -#: ../quilt/diff.in:270 +#: ../quilt/diff.in:307 msgid "Cannot change to temporary directory" msgstr "" -#: ../quilt/diff.in:289 ../scripts/rpatch.in:85 +#: ../quilt/diff.in:326 ../scripts/rpatch.in:85 msgid "Failed to patch temporary files" msgstr "" -#: ../quilt/diff.in:295 +#: ../quilt/diff.in:332 msgid "Cannot change to source directory" msgstr "" -#: ../quilt/diff.in:313 +#: ../quilt/diff.in:350 msgid "File $file is not being modified." msgstr "" -#: ../quilt/diff.in:332 ../quilt/refresh.in:145 +#: ../quilt/diff.in:370 ../quilt/refresh.in:145 msgid "Diff failed, aborting." msgstr "" -#: ../quilt/diff.in:339 +#: ../quilt/diff.in:377 msgid "More recent patches modify files in $last_patch." msgstr "" @@ -301,27 +304,27 @@ msgstr "" msgid "Option \\`-n' can only be used when importing a single patch" msgstr "" -#: ../quilt/import.in:94 +#: ../quilt/import.in:90 msgid "Patch $patch is applied." msgstr "" -#: ../quilt/import.in:102 +#: ../quilt/import.in:98 msgid "Patch $patch exists. Replace with -f." msgstr "" -#: ../quilt/import.in:105 +#: ../quilt/import.in:101 msgid "Replacing patch $patch with new version" msgstr "" -#: ../quilt/import.in:107 +#: ../quilt/import.in:103 msgid "Importing patch $patch_file (stored as $patch)" msgstr "" -#: ../quilt/import.in:113 +#: ../quilt/import.in:109 msgid "Failed to import patch $patch" msgstr "" -#: ../quilt/import.in:120 +#: ../quilt/import.in:116 msgid "Failed to insert $patch in file series." msgstr "" diff --git a/quilt.changes b/quilt.changes index feb87b6..f18a36a 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Jul 1 00:39:53 CEST 2004 - agruen@suse.de + +- Quilt diff: add --color option for optionally colorizing the + output. + +------------------------------------------------------------------- Sat Jun 26 23:24:42 CEST 2004 - agruen@suse.de - Quilt import: when importing patches with their original file diff --git a/quilt/diff.in b/quilt/diff.in index a617d33..24b4215 100644 --- a/quilt/diff.in +++ b/quilt/diff.in @@ -19,7 +19,7 @@ fi usage() { - echo $"Usage: quilt diff [-p n] [-c patch|-z] [-R] [-P patch] [--snapshot] [--diff=utility] [file ...]" + echo $"Usage: quilt diff [-p n] [-c patch|-z] [-R] [-P patch] [--snapshot] [--diff=utility] [--color] [file ...]" if [ x$1 = x-h ] then @@ -53,13 +53,37 @@ included. --no-timestamps Do not include file timestamps in patch headers (as if - QUILT_DIFF_NO_TIMESTAMPS were set to yes)." + QUILT_DIFF_NO_TIMESTAMPS were set to yes). + +--color[=always|auto|never] + Use ANSI escape sequences to colorize the result." exit 0 else exit 1 fi } +colorize() { + if [ -n "$opt_color" ]; then + awk ' + function esc(x) { return "'$'\e''[" x "m" } + { if (/^(Index:|\-\-\-|\+\+\+) /) + print esc(32) $0 esc(0) + else if (/^\+/) + print esc(36) $0 esc(0) + else if (/^\-/) + print esc(35) $0 esc(0) + else if (/^@@ \-[0-9]+(,[0-9]+)? \+[0-9]+(,[0-9]+)? @@/) + print gensub(/^(@@[^@]*@@)([ \t]*)(.*)/, + esc(33) "\\1" esc(0) "\\2" esc(35) "\\3" esc(0), "") + else + print + }' + else + cat + fi +} + do_diff() { local file=$1 old_file=$2 new_file=$3 @@ -95,7 +119,7 @@ die () exit $status } -options=`getopt -o p:P:c:Rzh --long diff:,snapshot,no-timestamps -- "$@"` +options=`getopt -o p:P:c:Rzh --long diff:,snapshot,no-timestamps,color:: -- "$@"` if [ $? -ne 0 ] then @@ -145,6 +169,19 @@ do shift 2 ;; --no-timestamps) QUILT_DIFF_NO_TIMESTAMPS=yes ;; + --color) + case "$2" in + "" | always) + opt_color=1 ;; + auto | tty) + opt_color= + [ -t 1 ] && opt_color=1 ;; + never) + opt_color= ;; + *) + usage ;; + esac + shift 2 ;; --) shift break ;; @@ -325,7 +362,8 @@ do files_were_shadowed=1 fi - do_diff "$file" "$old_file" "$new_file" + do_diff "$file" "$old_file" "$new_file" \ + | colorize if [ $? -ne 0 ] then |