summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2007-05-06 12:40:06 +0000
committerAndreas Gruenbacher <agruen@suse.de>2007-05-06 12:40:06 +0000
commitbd1dfdab48e3cda765b37efa7d61fb51ae113b4a (patch)
treea10189c9fabbd319ce15ab71f0e3671a3c6dc4e2
parentf08763e88006195c13c2072c466e248d9cb001a1 (diff)
downloadquilt-bd1dfdab48e3cda765b37efa7d61fb51ae113b4a.tar.gz
- Mail command: when only a single patch is specified, only mail
that one. Only mail all patches to the end of the series if the last patch is '-', or no patches have been specified. - Revert command: change semantics to really revert the changes relative to the patch instead of removing the file from the patch. That's much more useful; the other behavior is available as ``quilt diff <file> | patch -p1'', anyway. - Update German translation.
-rw-r--r--po/de.po42
-rw-r--r--po/fr.po33
-rw-r--r--po/ja.po33
-rw-r--r--po/quilt.pot32
-rw-r--r--quilt.changes12
-rw-r--r--quilt/mail.in13
-rw-r--r--quilt/revert.in65
-rw-r--r--test/perms.test6
-rw-r--r--test/revert.test41
-rw-r--r--test/revert2.test3
-rw-r--r--test/snapshot.test4
-rw-r--r--test/snapshot2.test4
-rw-r--r--test/subdir.test7
13 files changed, 170 insertions, 125 deletions
diff --git a/po/de.po b/po/de.po
index 45529c3..cd7f2ba 100644
--- a/po/de.po
+++ b/po/de.po
@@ -322,7 +322,7 @@ msgstr ""
"Kann kein Diff mit -p$opt_strip_level erzeugen, bitte -p0 oder -p1 verwenden."
"\\n"
-#: quilt/diff.in:266 quilt/files.in:105 quilt/mail.in:315
+#: quilt/diff.in:266 quilt/files.in:105 quilt/mail.in:320
msgid "Patch %s not applied before patch %s\\n"
msgstr "Patch %s ist nicht vor Patch %s angewandt\\n"
@@ -731,7 +731,8 @@ msgid ""
"[first_patch [last_patch]]\\n"
msgstr ""
"Verwendung: quilt mail {--mbox datei|--send} [-m text] [--prefix prefix] [--"
-"sender ...] [--from ...] [--to ...] [--cc ...] [--bcc ...] [--subject ...] [first_patch [last_patch]]\\n"
+"sender ...] [--from ...] [--to ...] [--cc ...] [--bcc ...] [--subject ...] "
+"[first_patch [last_patch]]\\n"
#: quilt/mail.in:27
msgid ""
@@ -740,8 +741,8 @@ msgid ""
"the series file, and either store them in a mailbox file, or send them\n"
"immediately. The editor is opened with a template for the introduction.\n"
"Please see %s for details.\n"
-"When specifying a range of patches, a first patch name of \\`-' is\n"
-"equivalent to specifying the first applied patch.\n"
+"When specifying a range of patches, a first patch name of \\`-' denotes the\n"
+"first, and a last patch name of \\`-' denotes the last patch in the series.\n"
"\n"
"-m text\n"
"\tText to use as the text in the introduction. When this option is\n"
@@ -775,8 +776,8 @@ msgstr ""
"speichere sie in einer Mailbox-Datei, oder versende sie sofort. Der Editor\n"
"wird mit der Vorlage einer Einleitung geöffnet. Für Details siehe\n"
"%s.\n"
-"Wenn ein Bereich von Patches angegeben wird, kann \\`-' für den ersten Patch\n"
-"verwendet werden.\n"
+"Wenn ein Bereich von Patches angegeben wird, kann \\`-' für den ersten bzw.\n"
+"letzten Patch in der Series-Datei angegeben werden.\n"
"\n"
"-m text\n"
"\tText, der für die Einleitung verwendet werden soll. Wenn\n"
@@ -804,28 +805,28 @@ msgstr ""
"--to, --cc, --bcc\n"
"\tFüre einen Empfänger an die To, Cc, or Bcc-Kopfzeilen an.\n"
-#: quilt/mail.in:184
+#: quilt/mail.in:189
msgid "Could not determine the envelope sender address. Please use --sender."
msgstr ""
"Konnte die Envelope-Adresse nicht feststellen. Bitte verwenden Sie --sender."
-#: quilt/mail.in:345
+#: quilt/mail.in:350
msgid "Unable to extract a subject header from %s\\n"
msgstr "Konnte keine Subject-Kopfzeile aus %s extrahieren\\n"
-#: quilt/mail.in:368
+#: quilt/mail.in:373
msgid "Patches %s have duplicate subject headers.\\n"
msgstr "Die Patches %s haben die selben Subject-Kopfzeilen.\\n"
-#: quilt/mail.in:410
+#: quilt/mail.in:415
msgid "Introduction has no subject header (saved as %s)\\n"
msgstr "Die Einleitung hat keine Subject-Kopfzeile (gespeichert als %s)\\n"
-#: quilt/mail.in:413
+#: quilt/mail.in:418
msgid "Introduction has no subject header\\n"
msgstr "Die Einleitung hat keine Subject-Kopfzeile\\n"
-#: quilt/mail.in:503
+#: quilt/mail.in:508
msgid "Introduction saved as %s\\n"
msgstr "Einleitung gespeichert als %s\\n"
@@ -1279,17 +1280,18 @@ msgstr "Verwendung: quilt revert [-P patch] {datei} ...\\n"
#: quilt/revert.in:25
msgid ""
"\n"
-"Revert the changes to one or more files in the topmost or named patch.\n"
-"Changes in files that are modified by patches on top of the specified patch\n"
+"Revert the changes to the topmost or named patch for the specified file(s).\n"
+"Changes to files that are modified by patches on top of the specified patch\n"
"cannot be reverted.\n"
"\n"
"-P patch\n"
"\tRevert changes in the named patch.\n"
msgstr ""
"\n"
-"Änderungen an den angegebenen Datei(en) im obersten oder angegebenen Patch\n"
+"Änderungen an den angegebenen Dateien am obersten oder angegebenen Patch\n"
"zurücknehmen. Änderungen in Dateien, die durch Patches über dem angegebenen\n"
"Patch verändert werden, können nicht zurückgenommen werden.\n"
+"\n"
"-P patch\n"
"\tPatch, aus dem Dateien entfernt werden sollen.\n"
@@ -1297,11 +1299,15 @@ msgstr ""
msgid "File %s is not in patch %s\\n"
msgstr "Datei %s ist nicht in Patch %s\\n"
-#: quilt/revert.in:92
-msgid "Failed to revert changed to %s in patch %s\\n"
+#: quilt/revert.in:102 quilt/revert.in:112
+msgid "File %s is unchanged\\n"
+msgstr "Datei %s ist unverändert\\n"
+
+#: quilt/revert.in:120
+msgid "Failed to revert changes to %s in patch %s\\n"
msgstr "Konnte Änderungen an %s in Patch %s nicht zurücknehmen\\n"
-#: quilt/revert.in:106
+#: quilt/revert.in:124
msgid "Changes to %s in patch %s reverted\\n"
msgstr "Änderungen an %s in Patch %s zurückgenommen\\n"
diff --git a/po/fr.po b/po/fr.po
index 6fb604d..d00bc57 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -324,7 +324,7 @@ msgstr ""
"Impossible de crer des patches avec -p%s. Veuillez spcifier -p0 ou -p1 "
"la place\\n"
-#: quilt/diff.in:266 quilt/files.in:105 quilt/mail.in:315
+#: quilt/diff.in:266 quilt/files.in:105 quilt/mail.in:320
msgid "Patch %s not applied before patch %s\\n"
msgstr "Le patch %s n'est pas appliqu avant %s\\n."
@@ -738,8 +738,8 @@ msgid ""
"the series file, and either store them in a mailbox file, or send them\n"
"immediately. The editor is opened with a template for the introduction.\n"
"Please see %s for details.\n"
-"When specifying a range of patches, a first patch name of \\`-' is\n"
-"equivalent to specifying the first applied patch.\n"
+"When specifying a range of patches, a first patch name of \\`-' denotes the\n"
+"first, and a last patch name of \\`-' denotes the last patch in the series.\n"
"\n"
"-m text\n"
"\tText to use as the text in the introduction. When this option is\n"
@@ -804,28 +804,28 @@ msgstr ""
"\tAjoute un destinataire dans le champ d'en-tte A, Copie ou Copie\n"
"\tcache, respectivement.\n"
-#: quilt/mail.in:184
+#: quilt/mail.in:189
msgid "Could not determine the envelope sender address. Please use --sender."
msgstr "Impossible de dterminer l'adresse d'expditeur. Utilisez --sender."
-#: quilt/mail.in:345
+#: quilt/mail.in:350
msgid "Unable to extract a subject header from %s\\n"
msgstr "Impossible d'extraire une ligne de sujet de %s\\n"
-#: quilt/mail.in:368
+#: quilt/mail.in:373
msgid "Patches %s have duplicate subject headers.\\n"
msgstr "Les patches %s ont des sujets dupliqus.\\n"
-#: quilt/mail.in:410
+#: quilt/mail.in:415
msgid "Introduction has no subject header (saved as %s)\\n"
msgstr ""
"L'introduction n'a pas de ligne de sujet (sauvegard en tant que %s)\\n"
-#: quilt/mail.in:413
+#: quilt/mail.in:418
msgid "Introduction has no subject header\\n"
msgstr "L'introduction ne contient pas de ligne de sujet\\n"
-#: quilt/mail.in:503
+#: quilt/mail.in:508
msgid "Introduction saved as %s\\n"
msgstr "Introduction sauvegarde en tant que %s\\n"
@@ -1291,8 +1291,8 @@ msgstr "Usage : quilt remove [-P patch] {fichier} ...\\n"
#, fuzzy
msgid ""
"\n"
-"Revert the changes to one or more files in the topmost or named patch.\n"
-"Changes in files that are modified by patches on top of the specified patch\n"
+"Revert the changes to the topmost or named patch for the specified file(s).\n"
+"Changes to files that are modified by patches on top of the specified patch\n"
"cannot be reverted.\n"
"\n"
"-P patch\n"
@@ -1310,12 +1310,17 @@ msgstr ""
msgid "File %s is not in patch %s\\n"
msgstr "Le fichier %s n'est pas dans le patch %s.\\n"
-#: quilt/revert.in:92
+#: quilt/revert.in:102 quilt/revert.in:112
#, fuzzy
-msgid "Failed to revert changed to %s in patch %s\\n"
+msgid "File %s is unchanged\\n"
+msgstr "Patch %s inchang\\n"
+
+#: quilt/revert.in:120
+#, fuzzy
+msgid "Failed to revert changes to %s in patch %s\\n"
msgstr "Impossible d'enlever le fichier %s du patch %s.\\n"
-#: quilt/revert.in:106
+#: quilt/revert.in:124
#, fuzzy
msgid "Changes to %s in patch %s reverted\\n"
msgstr "Impossible d'inserer %s dans le fichier de srie.\\n"
diff --git a/po/ja.po b/po/ja.po
index a52eee5..85ccab1 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -312,7 +312,7 @@ msgstr ""
msgid "Cannot diff patches with -p%s, please specify -p0 or -p1 instead\\n"
msgstr "-p%s でパッチの差分はとれません。-p0か -p1を指定してください\\n"
-#: quilt/diff.in:266 quilt/files.in:105 quilt/mail.in:315
+#: quilt/diff.in:266 quilt/files.in:105 quilt/mail.in:320
msgid "Patch %s not applied before patch %s\\n"
msgstr "パッチ %s は、パッチ %s の前に適用されていません\\n"
@@ -712,8 +712,8 @@ msgid ""
"the series file, and either store them in a mailbox file, or send them\n"
"immediately. The editor is opened with a template for the introduction.\n"
"Please see %s for details.\n"
-"When specifying a range of patches, a first patch name of \\`-' is\n"
-"equivalent to specifying the first applied patch.\n"
+"When specifying a range of patches, a first patch name of \\`-' denotes the\n"
+"first, and a last patch name of \\`-' denotes the last patch in the series.\n"
"\n"
"-m text\n"
"\tText to use as the text in the introduction. When this option is\n"
@@ -773,29 +773,29 @@ msgstr ""
"--to, --cc, --bcc\n"
"\tToやCC、BCCへの受信者の追加。\n"
-#: quilt/mail.in:184
+#: quilt/mail.in:189
msgid "Could not determine the envelope sender address. Please use --sender."
msgstr ""
"エンベロープの送信者アドレスを確定できませんでした。--senderオプション\n"
"を使用してください。"
-#: quilt/mail.in:345
+#: quilt/mail.in:350
msgid "Unable to extract a subject header from %s\\n"
msgstr "%s から件名を取り出せません。\\n"
-#: quilt/mail.in:368
+#: quilt/mail.in:373
msgid "Patches %s have duplicate subject headers.\\n"
msgstr "パッチ %s の件名が重複しています。\\n"
-#: quilt/mail.in:410
+#: quilt/mail.in:415
msgid "Introduction has no subject header (saved as %s)\\n"
msgstr "序文に件名がありません(%s として保存されました)\\n"
-#: quilt/mail.in:413
+#: quilt/mail.in:418
msgid "Introduction has no subject header\\n"
msgstr "序文に件名がありません\\n"
-#: quilt/mail.in:503
+#: quilt/mail.in:508
msgid "Introduction saved as %s\\n"
msgstr "序文は %s という名前で保存されました\\n"
@@ -1249,8 +1249,8 @@ msgstr "使い方: quilt remove [-P パッチ] {ファイル} ...\\n"
#, fuzzy
msgid ""
"\n"
-"Revert the changes to one or more files in the topmost or named patch.\n"
-"Changes in files that are modified by patches on top of the specified patch\n"
+"Revert the changes to the topmost or named patch for the specified file(s).\n"
+"Changes to files that are modified by patches on top of the specified patch\n"
"cannot be reverted.\n"
"\n"
"-P patch\n"
@@ -1267,12 +1267,17 @@ msgstr ""
msgid "File %s is not in patch %s\\n"
msgstr "ファイル %s は、パッチ %s に含まれていません\\n"
-#: quilt/revert.in:92
+#: quilt/revert.in:102 quilt/revert.in:112
#, fuzzy
-msgid "Failed to revert changed to %s in patch %s\\n"
+msgid "File %s is unchanged\\n"
+msgstr "パッチ %s に変更はありません\\n"
+
+#: quilt/revert.in:120
+#, fuzzy
+msgid "Failed to revert changes to %s in patch %s\\n"
msgstr "ファイル %s を、パッチ %s から削除することに失敗しました\\n"
-#: quilt/revert.in:106
+#: quilt/revert.in:124
#, fuzzy
msgid "Changes to %s in patch %s reverted\\n"
msgstr "seriesファイルへのパッチ %s の書き込みに失敗しました\\n"
diff --git a/po/quilt.pot b/po/quilt.pot
index 37711c9..1635bd1 100644
--- a/po/quilt.pot
+++ b/po/quilt.pot
@@ -206,7 +206,7 @@ msgstr ""
msgid "Cannot diff patches with -p%s, please specify -p0 or -p1 instead\\n"
msgstr ""
-#: quilt/diff.in:266 quilt/files.in:105 quilt/mail.in:315
+#: quilt/diff.in:266 quilt/files.in:105 quilt/mail.in:320
msgid "Patch %s not applied before patch %s\\n"
msgstr ""
@@ -490,8 +490,8 @@ msgid ""
"the series file, and either store them in a mailbox file, or send them\n"
"immediately. The editor is opened with a template for the introduction.\n"
"Please see %s for details.\n"
-"When specifying a range of patches, a first patch name of \\`-' is\n"
-"equivalent to specifying the first applied patch.\n"
+"When specifying a range of patches, a first patch name of \\`-' denotes the\n"
+"first, and a last patch name of \\`-' denotes the last patch in the series.\n"
"\n"
"-m text\n"
"\tText to use as the text in the introduction. When this option is\n"
@@ -521,27 +521,27 @@ msgid ""
"\tAppend a recipient to the To, Cc, or Bcc header.\n"
msgstr ""
-#: quilt/mail.in:184
+#: quilt/mail.in:189
msgid "Could not determine the envelope sender address. Please use --sender."
msgstr ""
-#: quilt/mail.in:345
+#: quilt/mail.in:350
msgid "Unable to extract a subject header from %s\\n"
msgstr ""
-#: quilt/mail.in:368
+#: quilt/mail.in:373
msgid "Patches %s have duplicate subject headers.\\n"
msgstr ""
-#: quilt/mail.in:410
+#: quilt/mail.in:415
msgid "Introduction has no subject header (saved as %s)\\n"
msgstr ""
-#: quilt/mail.in:413
+#: quilt/mail.in:418
msgid "Introduction has no subject header\\n"
msgstr ""
-#: quilt/mail.in:503
+#: quilt/mail.in:508
msgid "Introduction saved as %s\\n"
msgstr ""
@@ -859,8 +859,8 @@ msgstr ""
#: quilt/revert.in:25
msgid ""
"\n"
-"Revert the changes to one or more files in the topmost or named patch.\n"
-"Changes in files that are modified by patches on top of the specified patch\n"
+"Revert the changes to the topmost or named patch for the specified file(s).\n"
+"Changes to files that are modified by patches on top of the specified patch\n"
"cannot be reverted.\n"
"\n"
"-P patch\n"
@@ -871,11 +871,15 @@ msgstr ""
msgid "File %s is not in patch %s\\n"
msgstr ""
-#: quilt/revert.in:92
-msgid "Failed to revert changed to %s in patch %s\\n"
+#: quilt/revert.in:102 quilt/revert.in:112
+msgid "File %s is unchanged\\n"
msgstr ""
-#: quilt/revert.in:106
+#: quilt/revert.in:120
+msgid "Failed to revert changes to %s in patch %s\\n"
+msgstr ""
+
+#: quilt/revert.in:124
msgid "Changes to %s in patch %s reverted\\n"
msgstr ""
diff --git a/quilt.changes b/quilt.changes
index 2717b11..2068d8b 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -1,4 +1,16 @@
-------------------------------------------------------------------
+Sun May 6 14:36:25 CEST 2007 - agruen@suse.de
+
+- Mail command: when only a single patch is specified, only mail
+ that one. Only mail all patches to the end of the series if the
+ last patch is '-', or no patches have been specified.
+- Revert command: change semantics to really revert the changes
+ relative to the patch instead of removing the file from the
+ patch. That's much more useful; the other behavior is available
+ as ``quilt diff <file> | patch -p1'', anyway.
+- Update German translation.
+
+-------------------------------------------------------------------
Thu May 3 18:56:44 CEST 2007 - agruen@suse.de
- fold command: Add -R option.
diff --git a/quilt/mail.in b/quilt/mail.in
index 367962c..f9ae313 100644
--- a/quilt/mail.in
+++ b/quilt/mail.in
@@ -29,8 +29,8 @@ Create mail messages from a specified range of patches, or all patches in
the series file, and either store them in a mailbox file, or send them
immediately. The editor is opened with a template for the introduction.
Please see %s for details.
-When specifying a range of patches, a first patch name of \`-' is
-equivalent to specifying the first applied patch.
+When specifying a range of patches, a first patch name of \`-' denotes the
+first, and a last patch name of \`-' denotes the last patch in the series.
-m text
Text to use as the text in the introduction. When this option is
@@ -165,9 +165,14 @@ if [ $# -ge 1 ]; then
fi
if [ $# -ge 2 ]; then
- last_patch="$(find_patch "$2")" || exit 1
+ if [ "$2" = - ]
+ then
+ last_patch="$(find_last_patch)" || exit 1
+ else
+ last_patch="$(find_patch "$2")" || exit 1
+ fi
else
- last_patch="$(find_last_patch)" || exit 1
+ last_patch=$first_patch
fi
fi
diff --git a/quilt/revert.in b/quilt/revert.in
index 3e79141..14b651a 100644
--- a/quilt/revert.in
+++ b/quilt/revert.in
@@ -23,8 +23,8 @@ usage()
if [ x$1 = x-h ]
then
printf $"
-Revert the changes to one or more files in the topmost or named patch.
-Changes in files that are modified by patches on top of the specified patch
+Revert the changes to the topmost or named patch for the specified file(s).
+Changes to files that are modified by patches on top of the specified patch
cannot be reverted.
-P patch
@@ -67,47 +67,66 @@ fi
patch=$(find_applied_patch "$opt_patch") || exit 1
status=0
-for file in $*
+for file in "${@/#/$SUBDIR}"
do
- if ! file_in_patch $SUBDIR$file $patch
+ if ! file_in_patch "$file" $patch
then
printf $"File %s is not in patch %s\n" \
- "$SUBDIR$file" "$(print_patch $patch)" >&2
+ "$file" "$(print_patch $patch)" >&2
status=1
continue
fi
- next_patch=$(next_patch_for_file $patch $SUBDIR$file)
+ next_patch=$(next_patch_for_file $patch "$file")
if [ -n "$next_patch" ]
then
printf $"File %s modified by patch %s\n" \
- "$SUBDIR$file" "$(print_patch $next_patch)"
+ "$file" "$(print_patch $next_patch)"
status=1
continue
fi
+done
+[ $status -eq 0 ] || exit $status
+
+workdir=$(gen_tempfile -d $PWD)
+trap "rm -rf $workdir" EXIT
+apply_patch_temporarily $workdir $patch "${@/#/$SUBDIR}" || exit 1
- # Restore file from backup
- if ! $QUILT_LIB/backup-files -r -t -s -B $QUILT_PC/$patch/ $SUBDIR$file
+for file in ${*/#/$SUBDIR}
+do
+ if [ -s "$workdir/$file" ]
then
- printf $"Failed to revert changed to %s in patch %s\n" \
- "$SUBDIR$file" "$(print_patch $patch)" >&2
- status=1
- continue
- fi
+ if [ -e "$file" ] &&
+ diff -q "$workdir/$file" "$file" > /dev/null
+ then
+ printf $"File %s is unchanged\n" "$file"
+ continue
+ fi
- if [ -e $(dirname $QUILT_PC/$patch~refresh) -a \
- -e $(patch_file_name $patch) ]
+ mkdir -p "$(dirname "$file")"
+ ln -f "$workdir/$file" "$file" 2>&1 ||
+ cp -p "$workdir/$file" "$file"
+ else
+ if [ ! -e "$file" ]
+ then
+ printf $"File %s is unchanged\n" "$file"
+ continue
+ fi
+
+ rm -f "$file"
+ fi
+ if [ $? -ne 0 ]
then
- # The patch must be refreshed in order to get rid of the
- # patch permanently.
- touch $QUILT_PC/$patch~refresh
+ printf $"Failed to revert changes to %s in patch %s\n" \
+ "$file" "$(print_patch $patch)" >&2
+ status=1
+ else
+ printf $"Changes to %s in patch %s reverted\n" \
+ "$file" "$(print_patch $patch)"
fi
-
- printf $"Changes to %s in patch %s reverted\n" \
- "$SUBDIR$file" "$(print_patch $patch)"
done
exit $status
### Local Variables:
### mode: shell-script
### End:
-# vim:filetype=sh
+# vim:filetype=sh:w
diff --git a/test/perms.test b/test/perms.test
index 29c3cfe..db13286 100644
--- a/test/perms.test
+++ b/test/perms.test
@@ -56,11 +56,5 @@ the backup file.
> Removing patch %{P}test2.diff
> Now at patch %{P}test.diff
- $ quilt revert foo
- > Changes to foo in patch %{P}test.diff reverted
-
- $ ls -l foo | awk '{ print $1,$NF }'
- > -rwx---r-- foo
-
$ cd ..
$ rm -rf d
diff --git a/test/revert.test b/test/revert.test
index cf7eae6..8656391 100644
--- a/test/revert.test
+++ b/test/revert.test
@@ -2,49 +2,54 @@
$ mkdir -p d/patches
$ cd d
- $ echo f1 > f
- $ echo g1 > g
+ $ mkdir sub
+ $ echo f1 > sub/f
+ $ echo g1 > sub/g
$ quilt new p.diff
> Patch patches/p.diff is now on top
- $ quilt add f g h
- > File f added to patch patches/p.diff
- > File g added to patch patches/p.diff
- > File h added to patch patches/p.diff
+ $ quilt add sub/f sub/g sub/h
+ > File sub/f added to patch patches/p.diff
+ > File sub/g added to patch patches/p.diff
+ > File sub/h added to patch patches/p.diff
- $ echo h1 > h
- $ rm -f g
+ $ rm -f sub/g
+ $ echo h1 > sub/h
$ quilt refresh
> Refreshed patch patches/p.diff
+ $ cd sub
+ $ echo f2 > f
$ quilt revert f
- > Changes to f in patch patches/p.diff reverted
+ > Changes to sub/f in patch ../patches/p.diff reverted
$ quilt diff -z
$ quilt pop -qf
- > Removing patch patches/p.diff
+ > Removing patch ../patches/p.diff
> No patches applied
$ quilt push -q
- > Applying patch patches/p.diff
- > Now at patch patches/p.diff
+ > Applying patch ../patches/p.diff
+ > Now at patch ../patches/p.diff
+ $ echo g2 > g
$ quilt revert g
- > Changes to g in patch patches/p.diff reverted
+ > Changes to sub/g in patch ../patches/p.diff reverted
$ quilt diff -z
$ quilt pop -qf
- > Removing patch patches/p.diff
+ > Removing patch ../patches/p.diff
> No patches applied
$ quilt push -q
- > Applying patch patches/p.diff
- > Now at patch patches/p.diff
+ > Applying patch ../patches/p.diff
+ > Now at patch ../patches/p.diff
+ $ echo h2 > h
$ quilt revert h
- > Changes to h in patch patches/p.diff reverted
+ > Changes to sub/h in patch ../patches/p.diff reverted
$ quilt diff -z
- $ cd ..
+ $ cd ../..
$ rm -rf d
diff --git a/test/revert2.test b/test/revert2.test
index af86a93..d1c6bd0 100644
--- a/test/revert2.test
+++ b/test/revert2.test
@@ -19,11 +19,12 @@
$ quilt refresh
> Refreshed patch patches/revert.patch
+ $ echo will-revert > bar
$ quilt revert bar
> Changes to bar in patch patches/revert.patch reverted
$ quilt refresh
- > Refreshed patch patches/revert.patch
+ > Patch patches/revert.patch is unchanged
$ cd ..
$ rm -rf d
diff --git a/test/snapshot.test b/test/snapshot.test
index 51a8913..1d73a93 100644
--- a/test/snapshot.test
+++ b/test/snapshot.test
@@ -21,9 +21,7 @@
$ quilt fork
> Fork of patch %{P}snapshot created as %{P}snapshot-2
- $ quilt revert g.txt
- > Changes to g.txt in patch patches/snapshot-2 reverted
-
+ $ rm g.txt
$ quilt add h.txt
> File h.txt added to patch %{P}snapshot-2
diff --git a/test/snapshot2.test b/test/snapshot2.test
index 8e1bc9e..b55ed7d 100644
--- a/test/snapshot2.test
+++ b/test/snapshot2.test
@@ -21,9 +21,7 @@
$ quilt fork
> Fork of patch %{_P}snapshot created as %{_P}snapshot-2
- $ quilt revert g.txt
- > Changes to d/g.txt in patch ../patches/snapshot-2 reverted
-
+ $ rm g.txt
$ quilt add h.txt
> File d/h.txt added to patch %{_P}snapshot-2
diff --git a/test/subdir.test b/test/subdir.test
index 7f2cac2..fa60b9c 100644
--- a/test/subdir.test
+++ b/test/subdir.test
@@ -63,12 +63,5 @@
$ quilt refresh
> Refreshed patch %{_P}test.patch
- $ quilt revert file2
- > Changes to subdir/file2 in patch ../patches/test.patch reverted
-
- $ quilt files
- > subdir/file
- > subdir/file3
-
$ cd ../..
$ rm -rf d