From 00227c3952cd1618d0bd6a6a2231046b3153c14e Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Fri, 2 Jul 2004 01:14:07 +0000 Subject: - Several Fixes from Joe Green : + Another sed \t\r problem, in Makefile.in + Bad error message on "quilt delete" of non-existent patch + "import" doesn't remove all leading components on patch file + Misspelling in "import" help text - With using the GNU diff --label option, file timestamps disappeared. Specify the timestamps in --label by hand: This gives us added flexibility when generating patches; we may some day want to support diff styles other than unified. Also reported by Joe Green. - Add --backup option to quilt refresh. - Update documentation to QUILT_${COMMAND}_ARGS in .quiltrc. (The old settings still work but they are no longer documented.) - Update German translation. --- Makefile.in | 6 +++--- doc/main.tex | 22 ++++++++------------- doc/quilt.1.in | 20 +++++++------------ doc/quilt.pdf | Bin 183418 -> 180027 bytes doc/sample.quiltrc | 13 ++++++------ po/de.po | 56 ++++++++++++++++++++++++++++------------------------ po/fr.po | 46 ++++++++++++++++++++++-------------------- po/quilt.pot | 45 ++++++++++++++++++++--------------------- quilt.changes | 18 +++++++++++++++++ quilt/delete.in | 2 ++ quilt/diff.in | 8 ++++---- quilt/import.in | 4 ++-- quilt/refresh.in | 18 +++++++++++------ scripts/patchfns.in | 31 +++++++++++++++-------------- test/Makefile | 2 +- test/test.quiltrc | 3 ++- 16 files changed, 160 insertions(+), 134 deletions(-) diff --git a/Makefile.in b/Makefile.in index 2de99d3..d5838b9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -81,7 +81,7 @@ DOC := $(DOC_IN) SRC += $(DOC_SRC) SRC += doc/main.tex doc/quilt.pdf doc/Makefile \ doc/sample.quiltrc doc/quilt.1.in -DIRT += $(DOC_IN:%=doc/%) +DIRT += $(DOC_IN:%=doc/%) doc/quilt.1 MAN1 := bin/guards.1 doc/quilt.1 @@ -141,8 +141,8 @@ doc/quilt.1: doc/quilt.1.in $(QUILT:%=quilt/%) echo ; \ (bash -c ". scripts/patchfns ; LC_ALL=C . $$here/$$cmd -h")| \ grep -v 'Usage: quilt' | \ - sed -e 's/^\t//' \ - -e 's/\t/\n/' | \ + sed -e $$'s/^\t//' \ + -e $$'s/\t/\\\n/' | \ sed -e 's/^\(-.*\)$$/.IP " \1" 8/';\ echo; \ done \ diff --git a/doc/main.tex b/doc/main.tex index 2a02cce..de9805b 100644 --- a/doc/main.tex +++ b/doc/main.tex @@ -641,14 +641,16 @@ the series file in this case. \section{Customizing Quilt} -The following settings influence how quilt behaves: +Upon startup, quilt evaluates the file \textsf{.quiltrc} in the user's +home directory, or the file specified with the \textsf{--quiltrc} option. +This file is a regular bash script. Default options can be passed to +any command by defining a \textsf{QUILT\_\textit{COMMAND}\_ARGS} variable +(for example, \textsf{QUILT\_DIFF\_ARGS="--color=auto"} causes the output +of \quilt{diff} to be syntax colored when writing to a terminal). -\begin{description} +In addition to that, quilt recognizes the following variables: -\item[\textsf{QUILT\_BACKUP}] -When set to ``\textsf{yes}'', the \quilt{refresh} command will create -backup files when refreshing patches. The backup files have -``\textsc{\~}'' appended to the patch file names. +\begin{description} \item[\textsf{QUILT\_DIFF\_OPTS}] Additional options that quilt shall pass to \prog{GNU diff} when @@ -656,10 +658,6 @@ generating patches. A useful setting for C source code is ``\textsf{-p}'', which causes \prog{GNU diff} to show in the resulting patch which function a change is in. -\item[\textsf{QUILT\_NO\_DIFF\_TIMESTAMPS}] -When set to ``\textsf{yes}'', the \quilt{diff} and \quilt{refresh} -commands will not include file timestamps in patches. - \item[\textsf{QUILT\_PATCH\_OPTS}] Additional options that quilt shall pass to \prog{GNU patch} when applying patches. (For example, some versions of \prog{GNU patch} @@ -672,10 +670,6 @@ defaults to ``\textsf{patches}''. \end{description} -These settings can either be defined in the environment, or in the file -\textsf{.quiltrc} in user home directories. \textsf{.quiltrc} is a -\prog{bash} script. - \section{Pitfalls and Known Problems} As mentioned earlier, files must be added to patches before they can be diff --git a/doc/quilt.1.in b/doc/quilt.1.in index 6233689..f8238ad 100644 --- a/doc/quilt.1.in +++ b/doc/quilt.1.in @@ -118,15 +118,14 @@ Please refere to the pdf documentation for an example. .SH CONFIGURATION FILE -The file ~/.quiltrc is used by default as configuration file, but that can -be changed with the option --quiltrc. This file is to be sourced by bash. -Here are the existing settings and their effects: +Upon startup, quilt evaluates the file .quiltrc in the user's +home directory, or the file specified with the --quiltrc option. +This file is a regular bash script. Default options can be passed to +any command by defining a QUILT_COMMAND_ARGS variable +(for example, QUILT_DIFF_ARGS="--color=auto" causes the output +of quilt diff to be syntax colored when writing to a terminal). -.IP QUILT_BACKUP 4 - -When set to "yes", the quilt refresh command will create backup files when -refreshing patches. The backup files have "~" appended to the patch file -names. +In addition to that, quilt recognizes the following variables: .IP QUILT_DIFF_OPTS 4 @@ -134,11 +133,6 @@ Additional options that quilt shall pass to GNU diff when generating patches. A useful setting for C source code is "-p", which causes GNU diff to show in the resulting patch which function a change is in. -.IP QUILT_NO_DIFF_TIMESTAMPS 4 - -When set to "yes", the quilt diff and quilt refresh commands will not -include file timestamps in patches. - .IP QUILT_PATCH_OPTS 4 Additional options that quilt shall pass to GNU patch when applying patches. diff --git a/doc/quilt.pdf b/doc/quilt.pdf index 5e5ad94..9ccddc5 100644 Binary files a/doc/quilt.pdf and b/doc/quilt.pdf differ diff --git a/doc/sample.quiltrc b/doc/sample.quiltrc index 0aa72a7..c447f27 100644 --- a/doc/sample.quiltrc +++ b/doc/sample.quiltrc @@ -1,15 +1,16 @@ # Additional options passed to GNU diff # -p : Show which C function each change is in. -QUILT_DIFF_OPTS="-p${QUILT_DIFF_OPTS:+ $QUILT_DIFF_OPTS}" +QUILT_DIFF_OPTS="--show-c-function" # Additional options passed to GNU patch -#QUILT_PATCH_OPTS="" +#QUILT_PATCH_OPTS="--ignore-whitespace" # The directory in which patches are found (defaults to "patches"). #QUILT_PATCHES=patches -# Define this to generate diffs without timestamps. -#QUILT_NO_DIFF_TIMESTAMPS=yes +# Generate syntax-colored diffs without timestamps. +QUILT_DIFF_ARGS="--color=auto --no-timestamps" -# Create backup when refreshing patches. -QUILT_BACKUP=yes +# Generate patches without timestamps, and keep a backup of the previous +# patch. +QUILT_REFRESH_ARGS="--no-timestamps --backup" diff --git a/po/de.po b/po/de.po index 0c688cb..2884279 100644 --- a/po/de.po +++ b/po/de.po @@ -65,12 +65,12 @@ msgstr "" "-p patch\n" "\tDer Patch, zu dem die Dateien hinzugefügt werden sollen." -#: ../quilt/add.in:54 ../quilt/diff.in:140 ../quilt/diff.in:151 +#: ../quilt/add.in:54 ../quilt/diff.in:139 ../quilt/diff.in:150 #: ../quilt/remove.in:52 msgid "Patch $2 is not in series" msgstr "Patch $2 ist in der series-Datei nicht enthalten" -#: ../quilt/add.in:75 ../quilt/applied.in:72 ../quilt/refresh.in:106 +#: ../quilt/add.in:75 ../quilt/applied.in:72 ../quilt/refresh.in:112 #: ../quilt/remove.in:73 msgid "Patch $patch is not applied" msgstr "Patch $patch ist nicht angewandt" @@ -78,7 +78,7 @@ msgstr "Patch $patch ist nicht angewandt" #: ../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 +#: ../quilt/refresh.in:119 ../quilt/remove.in:80 msgid "No patches applied" msgstr "Keine Patches angewandt" @@ -138,15 +138,15 @@ msgstr "" "dieser Patch angewandt ist, entfernt quilt ihn zuerst. (Momentan kann \n" "nur der oberste Patch entfernt werden.)" -#: ../quilt/delete.in:73 +#: ../quilt/delete.in:75 msgid "Patch $patch is not in series" msgstr "Patch $patch ist in der series-Datei nicht enthalten" -#: ../quilt/delete.in:82 +#: ../quilt/delete.in:84 msgid "Patch $patch is currently applied" msgstr "Patch $patch ist momentan angewandt" -#: ../quilt/delete.in:88 +#: ../quilt/delete.in:90 msgid "Failed to remove patch $patch" msgstr "Konnte Patch $patch nicht entfernen" @@ -189,11 +189,10 @@ msgid "" "\tis invoked with the original and new file name as arguments.\n" "\n" "--no-timestamps\n" -"\tDo not include file timestamps in patch headers (as if\n" -" QUILT_DIFF_NO_TIMESTAMPS were set to yes).\n" +"\tDo not include file timestamps in patch headers.\n" "\t\n" "--color[=always|auto|never]\n" -"\tUse ANSI escape sequences to colorize the result." +"\tUse syntax coloring." msgstr "" "\n" "Erzeugt ein Diff der angegebenen Dateien im obersten oder angegebenen\n" @@ -223,10 +222,10 @@ msgstr "" "aufgerufen.\n" "\n" "--no-timestamps\n" -"\tKeine Zeitstempel in Patches angeben (wie QUILT_DIFF_NO_TIMESTAMPS in~/." -"quiltrc).\t\n" +"\tKeine Zeitstempel in Patches angeben.\n" +"\n" "--color[=always|auto|never]\n" -"\tVerwende ANSI Escapesequenzen, und färbe das Ergebnis ein." +"\tSyntaxeinfärbung verwenden (immer, nur für Terminals, nie)." #: ../quilt/diff.in:196 msgid "Options \\`-c patch', \\`--snapshot', and \\`-z' cannot be combined." @@ -273,7 +272,7 @@ msgstr "Kann nicht in Quellverzeichnis wechseln" msgid "File $file is not being modified." msgstr "Datei $file wird nicht verändert." -#: ../quilt/diff.in:370 ../quilt/refresh.in:145 +#: ../quilt/diff.in:370 ../quilt/refresh.in:151 msgid "Diff failed, aborting." msgstr "Diff fehlgeschlagen, Abbruch." @@ -391,7 +390,7 @@ msgid "" "Import external patches.\n" "\n" "-p num\n" -"\tNumber of directory levels to strip when aplying (default=1)\n" +"\tNumber of directory levels to strip when applying (default=1)\n" "\n" "-n patch\n" "\tPatch filename to use inside quilt. This option can only be\n" @@ -672,8 +671,8 @@ msgid "File series fully applied, ends at patch $top" msgstr "series-Datei vollständig angewandt, endet in Patch $top" #: ../quilt/refresh.in:22 -msgid "Usage: quilt refresh [-p n] [-f] [--no-timestamps] [patch]" -msgstr "Verwendung: quilt refresh [-p n] [-f] --no-timestamps] [patch]" +msgid "Usage: quilt refresh [-p n] [-f] [--no-timestamps] [--backup] [patch]" +msgstr "Verwendung: quilt refresh [-p n] [-f] [--no-timestamps] [--backup] [patch]" #: ../quilt/refresh.in:26 msgid "" @@ -696,8 +695,10 @@ msgid "" "\tsome of the same files.\n" "\n" "--no-timestamps\n" -"\tDo not include file timestamps in patch headers (as if\n" -" QUILT_DIFF_NO_TIMESTAMPS were set to yes)." +"\tDo not include file timestamps in patch headers.\n" +"\t\n" +"--backup\n" +"\tCreate a backup copy of the old version of a patch as patch~." msgstr "" "\n" "Frischt den obersten oder angegebenen Patch auf. Dokumentation in der\n" @@ -720,12 +721,15 @@ msgstr "" "--no-timestamps\n" "\tKeine Zeitstempel in Patches angeben (wie QUILT_DIFF_NO_TIMESTAMPS in~/." "quiltrc)." +"\t\n" +"--backup\n" +"\tErzeuge ein Backup der alten Version von patch als patch~." -#: ../quilt/refresh.in:101 +#: ../quilt/refresh.in:107 msgid "Patch $opt_patch is not in series" msgstr "Patch $opt_patch in series-Datei nicht gefunden" -#: ../quilt/refresh.in:124 +#: ../quilt/refresh.in:130 msgid "" "Cannot refresh patches with -p$opt_strip_level, please specify -p0 or -p1 " "instead" @@ -733,21 +737,21 @@ msgstr "" "Kann Patches mit Level -p$opt_strip_level nicht auffrischen, bitte -p0 oder -" "p1 angeben" -#: ../quilt/refresh.in:151 +#: ../quilt/refresh.in:157 msgid "More recent patches modify files in $patch. Enforce refresh with -f." msgstr "" "Später angewandte Patches verändern Dateien von $patch. Auffrischen mit -f " "erzwingen." -#: ../quilt/refresh.in:158 +#: ../quilt/refresh.in:164 msgid "Nothing in patch $patch" msgstr "Patch $patch is leer" -#: ../quilt/refresh.in:183 +#: ../quilt/refresh.in:189 msgid "Patch $patch is unchanged" msgstr "Patch $patch ist unverändert." -#: ../quilt/refresh.in:197 +#: ../quilt/refresh.in:203 msgid "Refreshed patch $patch" msgstr "Patch $patch aufgefrischt." @@ -974,7 +978,7 @@ msgstr "Patch $patch l msgid "The topmost patch $top needs to be refreshed first." msgstr "Der oberste Patch $top muss zuerst aufgefrischt werden (Refresh)." -#: ../scripts/patchfns.in:697 +#: ../scripts/patchfns.in:698 msgid "" "The quilt meta-data in this tree has version $version, but this version of " "quilt can only handle meta-data formats up to and including version " @@ -987,7 +991,7 @@ msgstr "" "quilt alle Patches mit der Version von quilt, die zur Erstellung des " "Arbeitsverzeichnisses verwendet wurde." -#: ../scripts/patchfns.in:759 +#: ../scripts/patchfns.in:760 msgid "" "The working tree was created by an older version of quilt. Please run 'quilt " "upgrade'." diff --git a/po/fr.po b/po/fr.po index ceb1d13..eff14cf 100644 --- a/po/fr.po +++ b/po/fr.po @@ -66,12 +66,12 @@ msgstr "" "-p patch\n" "\tPatch auquel les fichiers doivent être ajoutés." -#: ../quilt/add.in:54 ../quilt/diff.in:140 ../quilt/diff.in:151 +#: ../quilt/add.in:54 ../quilt/diff.in:139 ../quilt/diff.in:150 #: ../quilt/remove.in:52 msgid "Patch $2 is not in series" msgstr "Le patch $2 n'est pas dans la série" -#: ../quilt/add.in:75 ../quilt/applied.in:72 ../quilt/refresh.in:106 +#: ../quilt/add.in:75 ../quilt/applied.in:72 ../quilt/refresh.in:112 #: ../quilt/remove.in:73 msgid "Patch $patch is not applied" msgstr "Le patch $patch n'est pas appliqué" @@ -79,7 +79,7 @@ msgstr "Le patch $patch n'est pas appliqu #: ../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 +#: ../quilt/refresh.in:119 ../quilt/remove.in:80 msgid "No patches applied" msgstr "Aucun patch n'est appliqué" @@ -139,15 +139,15 @@ msgstr "" "actuelle. Si le patch est appliqué, quilt tentera de le retirer avant.\n" "(Seul le patch au sommet peut être retiré pour l'instant)." -#: ../quilt/delete.in:73 +#: ../quilt/delete.in:75 msgid "Patch $patch is not in series" msgstr "Le patch $patch n'est pas dans la série" -#: ../quilt/delete.in:82 +#: ../quilt/delete.in:84 msgid "Patch $patch is currently applied" msgstr "Le patch $patch est appliqué" -#: ../quilt/delete.in:88 +#: ../quilt/delete.in:90 msgid "Failed to remove patch $patch" msgstr "Impossible de retirer le patch $patch" @@ -192,8 +192,7 @@ msgid "" "\tis invoked with the original and new file name as arguments.\n" "\n" "--no-timestamps\n" -"\tDo not include file timestamps in patch headers (as if\n" -" QUILT_DIFF_NO_TIMESTAMPS were set to yes).\n" +"\tDo not include file timestamps in patch headers.\n" "\t\n" "--color[=always|auto|never]\n" "\tUse ANSI escape sequences to colorize the result." @@ -277,7 +276,7 @@ msgstr "Impossible d'entrer dans le r msgid "File $file is not being modified." msgstr "Le fichier $file n'est pas modifié." -#: ../quilt/diff.in:370 ../quilt/refresh.in:145 +#: ../quilt/diff.in:370 ../quilt/refresh.in:151 msgid "Diff failed, aborting." msgstr "Le diff a échoué. Abandon." @@ -391,12 +390,13 @@ msgid "Usage: quilt import [-f] [-p num] [-n patch] patchfile ..." msgstr "Usage : quilt import [-f] [-p num] [-n patch] fichier_de_patch ..." #: ../quilt/import.in:25 +#, fuzzy msgid "" "\n" "Import external patches.\n" "\n" "-p num\n" -"\tNumber of directory levels to strip when aplying (default=1)\n" +"\tNumber of directory levels to strip when applying (default=1)\n" "\n" "-n patch\n" "\tPatch filename to use inside quilt. This option can only be\n" @@ -686,10 +686,12 @@ msgid "File series fully applied, ends at patch $top" msgstr "La série est complètement appliquée. Le dernier patch est $top." #: ../quilt/refresh.in:22 -msgid "Usage: quilt refresh [-p n] [-f] [--no-timestamps] [patch]" +#, fuzzy +msgid "Usage: quilt refresh [-p n] [-f] [--no-timestamps] [--backup] [patch]" msgstr "Usage : quilt refresh [-p n] [-f] [--no-timestamps] [patch]" #: ../quilt/refresh.in:26 +#, fuzzy msgid "" "\n" "Refreshes the specified patch, or the topmost patch by default.\n" @@ -710,8 +712,10 @@ msgid "" "\tsome of the same files.\n" "\n" "--no-timestamps\n" -"\tDo not include file timestamps in patch headers (as if\n" -" QUILT_DIFF_NO_TIMESTAMPS were set to yes)." +"\tDo not include file timestamps in patch headers.\n" +"\t\n" +"--backup\n" +"\tCreate a backup copy of the old version of a patch as patch~." msgstr "" "\n" "Rafraîchit un patch appliqué. Si aucun patch n'est spécifié, il s'agit de\n" @@ -736,11 +740,11 @@ msgstr "" "\tSupprime les timestamps des entêtes du patch (comme si\n" " QUILT_DIFF_NO_TIMESTAMPS valait \"yes\")." -#: ../quilt/refresh.in:101 +#: ../quilt/refresh.in:107 msgid "Patch $opt_patch is not in series" msgstr "Le patch $opt_patch est introuvable dans le fichier de série" -#: ../quilt/refresh.in:124 +#: ../quilt/refresh.in:130 msgid "" "Cannot refresh patches with -p$opt_strip_level, please specify -p0 or -p1 " "instead" @@ -748,21 +752,21 @@ msgstr "" "Impossible de rafraîchir des patchs avec -p$opt_strip_level. Veuillez\n" "spécifier -p0 ou -p1 à la place." -#: ../quilt/refresh.in:151 +#: ../quilt/refresh.in:157 msgid "More recent patches modify files in $patch. Enforce refresh with -f." msgstr "" "Des fichiers plus récents modifient les mêmes fichiers que $patch.\n" "Forcez le rafraîchissement avec -f." -#: ../quilt/refresh.in:158 +#: ../quilt/refresh.in:164 msgid "Nothing in patch $patch" msgstr "Le patch $patch ne contient rien" -#: ../quilt/refresh.in:183 +#: ../quilt/refresh.in:189 msgid "Patch $patch is unchanged" msgstr "Le patch $patch n'a pas été modifié" -#: ../quilt/refresh.in:197 +#: ../quilt/refresh.in:203 msgid "Refreshed patch $patch" msgstr "Le patch $patch a été rafraichi." @@ -992,7 +996,7 @@ msgstr "" msgid "The topmost patch $top needs to be refreshed first." msgstr "Le patch au sommet $top doit être rafraichi au préalable." -#: ../scripts/patchfns.in:697 +#: ../scripts/patchfns.in:698 msgid "" "The quilt meta-data in this tree has version $version, but this version of " "quilt can only handle meta-data formats up to and including version " @@ -1005,7 +1009,7 @@ msgstr "" "version utilisée pour les appliquer avant d'installer une version\n" "plus ancienne." -#: ../scripts/patchfns.in:759 +#: ../scripts/patchfns.in:760 msgid "" "The working tree was created by an older version of quilt. Please run 'quilt " "upgrade'." diff --git a/po/quilt.pot b/po/quilt.pot index 113ea2b..cca9d74 100644 --- a/po/quilt.pot +++ b/po/quilt.pot @@ -34,12 +34,12 @@ msgid "" "\tPatch to add files to." msgstr "" -#: ../quilt/add.in:54 ../quilt/diff.in:140 ../quilt/diff.in:151 +#: ../quilt/add.in:54 ../quilt/diff.in:139 ../quilt/diff.in:150 #: ../quilt/remove.in:52 msgid "Patch $2 is not in series" msgstr "" -#: ../quilt/add.in:75 ../quilt/applied.in:72 ../quilt/refresh.in:106 +#: ../quilt/add.in:75 ../quilt/applied.in:72 ../quilt/refresh.in:112 #: ../quilt/remove.in:73 msgid "Patch $patch is not applied" msgstr "" @@ -47,7 +47,7 @@ msgstr "" #: ../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 +#: ../quilt/refresh.in:119 ../quilt/remove.in:80 msgid "No patches applied" msgstr "" @@ -98,15 +98,15 @@ msgid "" "topmost patch can be removed right now.)" msgstr "" -#: ../quilt/delete.in:73 +#: ../quilt/delete.in:75 msgid "Patch $patch is not in series" msgstr "" -#: ../quilt/delete.in:82 +#: ../quilt/delete.in:84 msgid "Patch $patch is currently applied" msgstr "" -#: ../quilt/delete.in:88 +#: ../quilt/delete.in:90 msgid "Failed to remove patch $patch" msgstr "" @@ -147,11 +147,10 @@ msgid "" "\tis invoked with the original and new file name as arguments.\n" "\n" "--no-timestamps\n" -"\tDo not include file timestamps in patch headers (as if\n" -" QUILT_DIFF_NO_TIMESTAMPS were set to yes).\n" +"\tDo not include file timestamps in patch headers.\n" "\t\n" "--color[=always|auto|never]\n" -"\tUse ANSI escape sequences to colorize the result." +"\tUse syntax coloring." msgstr "" #: ../quilt/diff.in:196 @@ -196,7 +195,7 @@ msgstr "" msgid "File $file is not being modified." msgstr "" -#: ../quilt/diff.in:370 ../quilt/refresh.in:145 +#: ../quilt/diff.in:370 ../quilt/refresh.in:151 msgid "Diff failed, aborting." msgstr "" @@ -291,7 +290,7 @@ msgid "" "Import external patches.\n" "\n" "-p num\n" -"\tNumber of directory levels to strip when aplying (default=1)\n" +"\tNumber of directory levels to strip when applying (default=1)\n" "\n" "-n patch\n" "\tPatch filename to use inside quilt. This option can only be\n" @@ -493,7 +492,7 @@ msgid "File series fully applied, ends at patch $top" msgstr "" #: ../quilt/refresh.in:22 -msgid "Usage: quilt refresh [-p n] [-f] [--no-timestamps] [patch]" +msgid "Usage: quilt refresh [-p n] [-f] [--no-timestamps] [--backup] [patch]" msgstr "" #: ../quilt/refresh.in:26 @@ -517,33 +516,35 @@ msgid "" "\tsome of the same files.\n" "\n" "--no-timestamps\n" -"\tDo not include file timestamps in patch headers (as if\n" -" QUILT_DIFF_NO_TIMESTAMPS were set to yes)." +"\tDo not include file timestamps in patch headers.\n" +"\t\n" +"--backup\n" +"\tCreate a backup copy of the old version of a patch as patch~." msgstr "" -#: ../quilt/refresh.in:101 +#: ../quilt/refresh.in:107 msgid "Patch $opt_patch is not in series" msgstr "" -#: ../quilt/refresh.in:124 +#: ../quilt/refresh.in:130 msgid "" "Cannot refresh patches with -p$opt_strip_level, please specify -p0 or -p1 " "instead" msgstr "" -#: ../quilt/refresh.in:151 +#: ../quilt/refresh.in:157 msgid "More recent patches modify files in $patch. Enforce refresh with -f." msgstr "" -#: ../quilt/refresh.in:158 +#: ../quilt/refresh.in:164 msgid "Nothing in patch $patch" msgstr "" -#: ../quilt/refresh.in:183 +#: ../quilt/refresh.in:189 msgid "Patch $patch is unchanged" msgstr "" -#: ../quilt/refresh.in:197 +#: ../quilt/refresh.in:203 msgid "Refreshed patch $patch" msgstr "" @@ -721,7 +722,7 @@ msgstr "" msgid "The topmost patch $top needs to be refreshed first." msgstr "" -#: ../scripts/patchfns.in:697 +#: ../scripts/patchfns.in:698 msgid "" "The quilt meta-data in this tree has version $version, but this version of " "quilt can only handle meta-data formats up to and including version " @@ -729,7 +730,7 @@ msgid "" "push them before downgrading." msgstr "" -#: ../scripts/patchfns.in:759 +#: ../scripts/patchfns.in:760 msgid "" "The working tree was created by an older version of quilt. Please run 'quilt " "upgrade'." diff --git a/quilt.changes b/quilt.changes index 4a5fb52..8042f00 100644 --- a/quilt.changes +++ b/quilt.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Fri Jul 2 03:08:39 CEST 2004 - agruen@suse.de + +- Several Fixes from Joe Green : + + Another sed \t\r problem, in Makefile.in + + Bad error message on "quilt delete" of non-existent patch + + "import" doesn't remove all leading components on patch file + + Misspelling in "import" help text +- With using the GNU diff --label option, file timestamps + disappeared. Specify the timestamps in --label by hand: This + gives us added flexibility when generating patches; we may + some day want to support diff styles other than unified. + Also reported by Joe Green. +- Add --backup option to quilt refresh. +- Update documentation to QUILT_${COMMAND}_ARGS in .quiltrc. + (The old settings still work but they are no longer documented.) +- Update German translation. + ------------------------------------------------------------------- Thu Jul 1 22:55:11 CEST 2004 - agruen@suse.de diff --git a/quilt/delete.in b/quilt/delete.in index 0bef1fc..b506939 100644 --- a/quilt/delete.in +++ b/quilt/delete.in @@ -68,8 +68,10 @@ then exit 1 fi else + save_patch=$patch if ! patch=$(find_patch $patch) then + patch=$save_patch echo $"Patch $patch is not in series" exit 1 fi diff --git a/quilt/diff.in b/quilt/diff.in index 24b4215..8ad3639 100644 --- a/quilt/diff.in +++ b/quilt/diff.in @@ -52,11 +52,10 @@ included. is invoked with the original and new file name as arguments. --no-timestamps - Do not include file timestamps in patch headers (as if - QUILT_DIFF_NO_TIMESTAMPS were set to yes). + Do not include file timestamps in patch headers. --color[=always|auto|never] - Use ANSI escape sequences to colorize the result." + Use syntax coloring." exit 0 else exit 1 @@ -168,7 +167,8 @@ do opt_diff="$2" shift 2 ;; --no-timestamps) - QUILT_DIFF_NO_TIMESTAMPS=yes ;; + QUILT_NO_DIFF_TIMESTAMPS=1 + shift ;; --color) case "$2" in "" | always) diff --git a/quilt/import.in b/quilt/import.in index 9be062a..1c9f0f8 100644 --- a/quilt/import.in +++ b/quilt/import.in @@ -26,7 +26,7 @@ usage() Import external patches. -p num - Number of directory levels to strip when aplying (default=1) + Number of directory levels to strip when applying (default=1) -n patch Patch filename to use inside quilt. This option can only be @@ -82,7 +82,7 @@ do then patch=$opt_patch else - patch=${patch_file#*/} + patch=${patch_file##*/} fi if is_applied $patch diff --git a/quilt/refresh.in b/quilt/refresh.in index 3bce618..292beef 100644 --- a/quilt/refresh.in +++ b/quilt/refresh.in @@ -19,7 +19,7 @@ fi usage() { - echo $"Usage: quilt refresh [-p n] [-f] [--no-timestamps] [patch]" + echo $"Usage: quilt refresh [-p n] [-f] [--no-timestamps] [--backup] [patch]" if [ x$1 = x-h ] then @@ -42,8 +42,10 @@ patch. some of the same files. --no-timestamps - Do not include file timestamps in patch headers (as if - QUILT_DIFF_NO_TIMESTAMPS were set to yes)." + Do not include file timestamps in patch headers. + +--backup + Create a backup copy of the old version of a patch as patch~." exit 0 else exit 1 @@ -58,7 +60,7 @@ die () exit $status } -options=`getopt -o p:fh --long no-timestamps -- "$@"` +options=`getopt -o p:fh --long no-timestamps,backup -- "$@"` if [ $? -ne 0 ] then @@ -79,7 +81,11 @@ do -h) usage -h ;; --no-timestamps) - QUILT_DIFF_NO_TIMESTAMPS=yes ;; + QUILT_NO_DIFF_TIMESTAMPS=1 + shift ;; + --backup) + QUILT_BACKUP=1 + shift ;; --) shift break ;; @@ -184,7 +190,7 @@ then exit 0 fi -if ( [ "$QUILT_BACKUP" = yes -a -e $patch_file ] && \ +if ( [ -n "$QUILT_BACKUP" -a -e $patch_file ] && \ ! cp $patch_file $patch_file~ ) || \ ! cat_to_file $patch_file < $tmpfile2 then diff --git a/scripts/patchfns.in b/scripts/patchfns.in index 8a0a3cc..3acb92b 100644 --- a/scripts/patchfns.in +++ b/scripts/patchfns.in @@ -494,21 +494,10 @@ touched_by_patch() }' } -fix_diff_header() -{ - local from=$1 to=$2 z - if [ -n "$QUILT_NO_DIFF_TIMESTAMPS" ] - then - sed -e 's:^\(\(---\|+++\) .*\)\t.*:\1:' - else - cat - fi -} - diff_file() { local file=$1 old_file=$2 new_file=$3 - local index old_hdr new_hdr line + local index old_hdr old_date new_hdr new_date line : ${opt_strip_level:=1} if [ $opt_strip_level -eq 0 ] @@ -526,21 +515,33 @@ diff_file() then old_file=/dev/null old_hdr=/dev/null + [ -n "$QUILT_NO_DIFF_TIMESTAMPS" ] \ + || old_date=$'\t'"1970-01-01 00:00:00.000000000 +0000" + else + [ -n "$QUILT_NO_DIFF_TIMESTAMPS" ] \ + || old_date=$'\t'$(date +'%Y-%m-%d %H:%M:%S.%N %z' \ + -r "$old_file") fi if ! [ -s "$new_file" ] then new_file=/dev/null new_hdr=/dev/null + [ -n "$QUILT_NO_DIFF_TIMESTAMPS" ] \ + || new_date="1970-01-01 00:00:00.000000000 +0000" + else + [ -n "$QUILT_NO_DIFF_TIMESTAMPS" ] \ + || new_date=$'\t'$(date +'%Y-%m-%d %H:%M:%S.%N %z' \ + -r "$new_file") fi @DIFF@ -Nu $QUILT_DIFF_OPTS $old_file $new_file \ - --label "$old_hdr" --label "$new_hdr" \ + --label "$old_hdr$old_date" --label "$new_hdr$new_date" \ | if read line then echo "Index: $index" echo "===================================================================" - (echo "$line" ; cat) \ - | fix_diff_header + echo "$line" + cat fi } diff --git a/test/Makefile b/test/Makefile index 0595d2e..16c34b4 100644 --- a/test/Makefile +++ b/test/Makefile @@ -6,5 +6,5 @@ all: $(patsubst %,_test_%,$(TESTS)) $(patsubst %,_test_%,$(TESTS)): @test=$(patsubst _test_%,%,$@); \ echo "[$$test]" ; \ - export QUILTRC=test.quiltrc ; \ + export QUILTRC=$(CURDIR)/test.quiltrc ; \ ./run $$test diff --git a/test/test.quiltrc b/test/test.quiltrc index 468812d..ba458a6 100644 --- a/test/test.quiltrc +++ b/test/test.quiltrc @@ -1,2 +1,3 @@ # Define this to generate diffs without timestamps. -QUILT_NO_DIFF_TIMESTAMPS=yes +QUILT_DIFF_ARGS="--no-timestamps" +QUILT_REFRESH_ARGS="--no-timestamps" -- cgit