summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2004-08-11 12:32:14 +0000
committerAndreas Gruenbacher <agruen@suse.de>2004-08-11 12:32:14 +0000
commit30870bd7cd1daa0c3a68df5e8f08c1c44542d70d (patch)
tree2069c0539d971756b5aedb69e54a114ae78d8e90
parent09e39e03953b7e5e94f74e56258606d8df959874 (diff)
downloadquilt-30870bd7cd1daa0c3a68df5e8f08c1c44542d70d.tar.gz
- Merge improvement to files command from Dean Roehrich: Allow to
list all files modified, or all files modified by a range of patches. - Fix pop command help.
-rw-r--r--po/de.po46
-rw-r--r--po/fr.po61
-rw-r--r--po/quilt.pot39
-rw-r--r--quilt.changes17
-rw-r--r--quilt/files.in131
-rw-r--r--quilt/pop.in8
6 files changed, 207 insertions, 95 deletions
diff --git a/po/de.po b/po/de.po
index 58d8bcb..4ebe289 100644
--- a/po/de.po
+++ b/po/de.po
@@ -65,20 +65,19 @@ msgstr ""
"\tPatch, zu dem die Dateien hinzugefügt werden sollen.\n"
#: ../quilt/add.in:54 ../quilt/applied.in:62 ../quilt/delete.in:76
-#: ../quilt/diff.in:148 ../quilt/diff.in:159 ../quilt/files.in:69
-#: ../quilt/next.in:62 ../quilt/pop.in:129 ../quilt/previous.in:62
-#: ../quilt/push.in:145 ../quilt/refresh.in:129 ../quilt/remove.in:53
-#: ../quilt/unapplied.in:62
+#: ../quilt/diff.in:148 ../quilt/diff.in:159 ../quilt/next.in:62
+#: ../quilt/pop.in:129 ../quilt/previous.in:62 ../quilt/push.in:145
+#: ../quilt/refresh.in:129 ../quilt/remove.in:53 ../quilt/unapplied.in:62
msgid "Patch %s is not in series\\n"
msgstr "Patch %s ist nicht in der series-Datei enthalten\\n"
-#: ../quilt/add.in:75 ../quilt/diff.in:221 ../quilt/files.in:89
-#: ../quilt/pop.in:150 ../quilt/refresh.in:135 ../quilt/remove.in:74
+#: ../quilt/add.in:75 ../quilt/diff.in:221 ../quilt/pop.in:150
+#: ../quilt/refresh.in:135 ../quilt/remove.in:74
msgid "Patch %s is not applied\\n"
msgstr "Patch %s ist nicht angewandt\\n"
#: ../quilt/add.in:82 ../quilt/delete.in:68 ../quilt/diff.in:229
-#: ../quilt/files.in:76 ../quilt/fold.in:79 ../quilt/fork.in:65
+#: ../quilt/files.in:103 ../quilt/fold.in:79 ../quilt/fork.in:65
#: ../quilt/pop.in:185 ../quilt/push.in:182 ../quilt/push.in:221
#: ../quilt/refresh.in:143 ../quilt/remove.in:81
msgid "No patches applied\\n"
@@ -241,7 +240,7 @@ msgstr ""
"Kann kein Diff mit -p$opt_strip_level erzeugen, bitte -p0 oder -p1 verwenden."
"\\n"
-#: ../quilt/diff.in:275
+#: ../quilt/diff.in:275 ../quilt/files.in:122
msgid "Patch %s not applied before patch %s\\n"
msgstr "Patch %s ist nicht vor Patch %s angewandt\\n"
@@ -292,25 +291,30 @@ msgstr ""
"sie dann in \\$EDITOR (%s).\n"
#: ../quilt/files.in:22
-msgid "Usage: quilt files [-v] [patch]\\n"
-msgstr "Verwendung: quilt files [-v] [patch]\\n"
+msgid "Usage: quilt files [-v] [-a] [-l] [--combine patch] [patch]\\n"
+msgstr "Verwendung: quilt files [-v] [-a] [-l] [--combine patch] [patch]\\n"
#: ../quilt/files.in:25
msgid ""
"\n"
"Print the list of files that the topmost or specified patch changes.\n"
"\n"
+"-a\tList all files in all applied patches.\n"
+"\n"
+"-l\tAdd patch name to output.\n"
+"\n"
"-v\tVerbose, more user friendly output.\n"
-msgstr ""
"\n"
-"Gibt eine Liste der Dateien aus, die der oberste oder angegebene Patch\n"
-"beinhaltet.\n"
+"--combine patch\n"
+"\tCreate a listing for all patches between this patch and\n"
+"\tthe topmost applied patch. A patch name of \\\"-\\\" is equivalent\n"
+"\tto specifying the first applied patch.\n"
"\n"
-"-v\tAusführlichere, benutzerfreundliche Ausgabe.\n"
+msgstr ""
-#: ../quilt/files.in:85
-msgid "Patch %s is not applied (no verbose output)\\n"
-msgstr "Patch %s ist nicht angewandt (keine ausführliche Ausgabe)\\n"
+#: ../quilt/files.in:76 ../quilt/files.in:96
+msgid "Patch %s is not in series file\\n"
+msgstr "Patch %s ist nicht in der series-Datei enthalten\\n"
#: ../quilt/fold.in:22
msgid "Usage: quilt fold [-p strip-level]\\n"
@@ -502,10 +506,10 @@ msgid ""
"\n"
"Remove patch(es) from the stack of applied patches. Without options,\n"
"the topmost patch is removed. When a number is specified, remove the\n"
-"specified number of patches. When a patch name is specified, remove all\n"
-"patches up to and including the specified patch. Patch names may\n"
-"include the patches/ prefix, which means that filename completion can be\n"
-"used.\n"
+"specified number of patches. When a patch name is specified, remove\n"
+"patches until the specified patch end up on top of the stack. Patch\n"
+"names may include the patches/ prefix, which means that filename\n"
+"completion can be used.\n"
"\n"
"-a\tRemove all applied patches.\n"
"\n"
diff --git a/po/fr.po b/po/fr.po
index 2705d6c..afe0b07 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -67,20 +67,19 @@ msgstr ""
"\tPatch auquel les fichiers doivent être ajoutés.\n"
#: ../quilt/add.in:54 ../quilt/applied.in:62 ../quilt/delete.in:76
-#: ../quilt/diff.in:148 ../quilt/diff.in:159 ../quilt/files.in:69
-#: ../quilt/next.in:62 ../quilt/pop.in:129 ../quilt/previous.in:62
-#: ../quilt/push.in:145 ../quilt/refresh.in:129 ../quilt/remove.in:53
-#: ../quilt/unapplied.in:62
+#: ../quilt/diff.in:148 ../quilt/diff.in:159 ../quilt/next.in:62
+#: ../quilt/pop.in:129 ../quilt/previous.in:62 ../quilt/push.in:145
+#: ../quilt/refresh.in:129 ../quilt/remove.in:53 ../quilt/unapplied.in:62
msgid "Patch %s is not in series\\n"
msgstr "Le patch %s n'est pas dans la série\\n"
-#: ../quilt/add.in:75 ../quilt/diff.in:221 ../quilt/files.in:89
-#: ../quilt/pop.in:150 ../quilt/refresh.in:135 ../quilt/remove.in:74
+#: ../quilt/add.in:75 ../quilt/diff.in:221 ../quilt/pop.in:150
+#: ../quilt/refresh.in:135 ../quilt/remove.in:74
msgid "Patch %s is not applied\\n"
msgstr "Le patch %s n'est pas appliqué\\n"
#: ../quilt/add.in:82 ../quilt/delete.in:68 ../quilt/diff.in:229
-#: ../quilt/files.in:76 ../quilt/fold.in:79 ../quilt/fork.in:65
+#: ../quilt/files.in:103 ../quilt/fold.in:79 ../quilt/fork.in:65
#: ../quilt/pop.in:185 ../quilt/push.in:182 ../quilt/push.in:221
#: ../quilt/refresh.in:143 ../quilt/remove.in:81
msgid "No patches applied\\n"
@@ -250,7 +249,7 @@ msgstr ""
"Impossible de créer des patches avec -p%s. Veuillez spécifier -p0 ou -p1 à "
"la place\\n"
-#: ../quilt/diff.in:275
+#: ../quilt/diff.in:275 ../quilt/files.in:122
msgid "Patch %s not applied before patch %s\\n"
msgstr "Le patch %s n'est pas appliqué avant %s\\n."
@@ -301,7 +300,8 @@ msgstr ""
"au patch du sommet.\n"
#: ../quilt/files.in:22
-msgid "Usage: quilt files [-v] [patch]\\n"
+#, fuzzy
+msgid "Usage: quilt files [-v] [-a] [-l] [--combine patch] [patch]\\n"
msgstr "Usage : quilt files [-v] [patch]\\n"
#: ../quilt/files.in:25
@@ -309,17 +309,23 @@ msgid ""
"\n"
"Print the list of files that the topmost or specified patch changes.\n"
"\n"
+"-a\tList all files in all applied patches.\n"
+"\n"
+"-l\tAdd patch name to output.\n"
+"\n"
"-v\tVerbose, more user friendly output.\n"
-msgstr ""
"\n"
-"Affiche la liste des fichiers modifiés par le patch spécifié (ou celui \n"
-"au sommet).\n"
+"--combine patch\n"
+"\tCreate a listing for all patches between this patch and\n"
+"\tthe topmost applied patch. A patch name of \\\"-\\\" is equivalent\n"
+"\tto specifying the first applied patch.\n"
"\n"
-"-v\tAffichage verbeux, plus simple à lire.\n"
+msgstr ""
-#: ../quilt/files.in:85
-msgid "Patch %s is not applied (no verbose output)\\n"
-msgstr "Le patch %s n'est pas appliqué (affichage non verbeux)"
+#: ../quilt/files.in:76 ../quilt/files.in:96
+#, fuzzy
+msgid "Patch %s is not in series file\\n"
+msgstr "Le patch %s n'est pas dans la série\\n"
#: ../quilt/fold.in:22
msgid "Usage: quilt fold [-p strip-level]\\n"
@@ -517,10 +523,10 @@ msgid ""
"\n"
"Remove patch(es) from the stack of applied patches. Without options,\n"
"the topmost patch is removed. When a number is specified, remove the\n"
-"specified number of patches. When a patch name is specified, remove all\n"
-"patches up to and including the specified patch. Patch names may\n"
-"include the patches/ prefix, which means that filename completion can be\n"
-"used.\n"
+"specified number of patches. When a patch name is specified, remove\n"
+"patches until the specified patch end up on top of the stack. Patch\n"
+"names may include the patches/ prefix, which means that filename\n"
+"completion can be used.\n"
"\n"
"-a\tRemove all applied patches.\n"
"\n"
@@ -1019,3 +1025,18 @@ msgstr "Retrait de %s\\n"
#: ../scripts/rpatch.in:179
msgid "Patch %s needs to be refreshed first.\\n"
msgstr "Le patch %s doit être rafraichi au préalable.\\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Print the list of files that the topmost or specified patch changes.\n"
+#~ "\n"
+#~ "-v\tVerbose, more user friendly output.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Affiche la liste des fichiers modifiés par le patch spécifié (ou celui \n"
+#~ "au sommet).\n"
+#~ "\n"
+#~ "-v\tAffichage verbeux, plus simple à lire.\n"
+
+#~ msgid "Patch %s is not applied (no verbose output)\\n"
+#~ msgstr "Le patch %s n'est pas appliqué (affichage non verbeux)"
diff --git a/po/quilt.pot b/po/quilt.pot
index 1f815e3..09c3038 100644
--- a/po/quilt.pot
+++ b/po/quilt.pot
@@ -35,20 +35,19 @@ msgid ""
msgstr ""
#: ../quilt/add.in:54 ../quilt/applied.in:62 ../quilt/delete.in:76
-#: ../quilt/diff.in:148 ../quilt/diff.in:159 ../quilt/files.in:69
-#: ../quilt/next.in:62 ../quilt/pop.in:129 ../quilt/previous.in:62
-#: ../quilt/push.in:145 ../quilt/refresh.in:129 ../quilt/remove.in:53
-#: ../quilt/unapplied.in:62
+#: ../quilt/diff.in:148 ../quilt/diff.in:159 ../quilt/next.in:62
+#: ../quilt/pop.in:129 ../quilt/previous.in:62 ../quilt/push.in:145
+#: ../quilt/refresh.in:129 ../quilt/remove.in:53 ../quilt/unapplied.in:62
msgid "Patch %s is not in series\\n"
msgstr ""
-#: ../quilt/add.in:75 ../quilt/diff.in:221 ../quilt/files.in:89
-#: ../quilt/pop.in:150 ../quilt/refresh.in:135 ../quilt/remove.in:74
+#: ../quilt/add.in:75 ../quilt/diff.in:221 ../quilt/pop.in:150
+#: ../quilt/refresh.in:135 ../quilt/remove.in:74
msgid "Patch %s is not applied\\n"
msgstr ""
#: ../quilt/add.in:82 ../quilt/delete.in:68 ../quilt/diff.in:229
-#: ../quilt/files.in:76 ../quilt/fold.in:79 ../quilt/fork.in:65
+#: ../quilt/files.in:103 ../quilt/fold.in:79 ../quilt/fork.in:65
#: ../quilt/pop.in:185 ../quilt/push.in:182 ../quilt/push.in:221
#: ../quilt/refresh.in:143 ../quilt/remove.in:81
msgid "No patches applied\\n"
@@ -161,7 +160,7 @@ msgstr ""
msgid "Cannot diff patches with -p%s, please specify -p0 or -p1 instead\\n"
msgstr ""
-#: ../quilt/diff.in:275
+#: ../quilt/diff.in:275 ../quilt/files.in:122
msgid "Patch %s not applied before patch %s\\n"
msgstr ""
@@ -209,7 +208,7 @@ msgid ""
msgstr ""
#: ../quilt/files.in:22
-msgid "Usage: quilt files [-v] [patch]\\n"
+msgid "Usage: quilt files [-v] [-a] [-l] [--combine patch] [patch]\\n"
msgstr ""
#: ../quilt/files.in:25
@@ -217,11 +216,21 @@ msgid ""
"\n"
"Print the list of files that the topmost or specified patch changes.\n"
"\n"
+"-a\tList all files in all applied patches.\n"
+"\n"
+"-l\tAdd patch name to output.\n"
+"\n"
"-v\tVerbose, more user friendly output.\n"
+"\n"
+"--combine patch\n"
+"\tCreate a listing for all patches between this patch and\n"
+"\tthe topmost applied patch. A patch name of \\\"-\\\" is equivalent\n"
+"\tto specifying the first applied patch.\n"
+"\n"
msgstr ""
-#: ../quilt/files.in:85
-msgid "Patch %s is not applied (no verbose output)\\n"
+#: ../quilt/files.in:76 ../quilt/files.in:96
+msgid "Patch %s is not in series file\\n"
msgstr ""
#: ../quilt/fold.in:22
@@ -374,10 +383,10 @@ msgid ""
"\n"
"Remove patch(es) from the stack of applied patches. Without options,\n"
"the topmost patch is removed. When a number is specified, remove the\n"
-"specified number of patches. When a patch name is specified, remove all\n"
-"patches up to and including the specified patch. Patch names may\n"
-"include the patches/ prefix, which means that filename completion can be\n"
-"used.\n"
+"specified number of patches. When a patch name is specified, remove\n"
+"patches until the specified patch end up on top of the stack. Patch\n"
+"names may include the patches/ prefix, which means that filename\n"
+"completion can be used.\n"
"\n"
"-a\tRemove all applied patches.\n"
"\n"
diff --git a/quilt.changes b/quilt.changes
index c864e8e..296232c 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Wed Aug 11 14:28:59 CEST 2004 - agruen@suse.de
+
+- Merge improvement to files command from Dean Roehrich: Allow to
+ list all files modified, or all files modified by a range of
+ patches.
+- Fix pop command help.
+
+-------------------------------------------------------------------
Wed Aug 11 09:18:56 CEST 2004 - agruen@suse.de
- Working in sub-directories: `quilt new' so far did always
@@ -11,8 +19,8 @@ Wed Aug 11 09:18:56 CEST 2004 - agruen@suse.de
-------------------------------------------------------------------
Sat Aug 7 14:47:53 PDT 2004 - mquinson@fuxfamily.org
-- Small fix by Yasushi SHOJI: display the name of the patch which is not
- applied in the error message.
+- Small fix by Yasushi SHOJI: display the name of the patch which
+ is not applied in the error message.
-------------------------------------------------------------------
Wed Jul 21 19:38:14 PDT 2004 - mquinson@tuxfamily.org
@@ -24,8 +32,9 @@ Wed Jul 21 19:38:14 PDT 2004 - mquinson@tuxfamily.org
-------------------------------------------------------------------
Thu Jul 15 15:23:33 PDT 2004 - mquinson@tuxfamily.org
-- patch from Joe Green to "Complete options for a partial command as long as
- it's unique. quilt will accept such a partial command as valid."
+- patch from Joe Green to "Complete options for a partial command
+ as long as it's unique. quilt will accept such a partial command
+ as valid."
-------------------------------------------------------------------
Thu Jul 15 02:25:44 CEST 2004 - agruen@suse.de
diff --git a/quilt/files.in b/quilt/files.in
index 32d4345..8c421b2 100644
--- a/quilt/files.in
+++ b/quilt/files.in
@@ -19,13 +19,23 @@ fi
usage()
{
- printf $"Usage: quilt files [-v] [patch]\n"
+ printf $"Usage: quilt files [-v] [-a] [-l] [--combine patch] [patch]\n"
if [ x$1 = x-h ]
then
printf $"
Print the list of files that the topmost or specified patch changes.
+-a List all files in all applied patches.
+
+-l Add patch name to output.
+
-v Verbose, more user friendly output.
+
+--combine patch
+ Create a listing for all patches between this patch and
+ the topmost applied patch. A patch name of \"-\" is equivalent
+ to specifying the first applied patch.
+
"
exit 0
else
@@ -33,7 +43,7 @@ Print the list of files that the topmost or specified patch changes.
fi
}
-options=`getopt -o vh -- "$@"`
+options=`getopt -o vhal --long combine: -- "$@"`
if [ $? -ne 0 ]
then
@@ -48,8 +58,25 @@ do
-v)
opt_verbose=1
shift ;;
+ -a)
+ opt_all=1
+ shift ;;
+ -l)
+ opt_labels=1
+ shift ;;
-h)
usage -h ;;
+ --combine)
+ opt_all=1
+ if [ "$2" = - ]
+ then
+ :
+ elif ! first_patch=$(find_patch $2)
+ then
+ printf $"Patch %s is not in series file\n" "$2" >&2
+ exit 1
+ fi
+ shift 2 ;;
--)
shift
break ;;
@@ -60,58 +87,100 @@ if [ $# -gt 1 ]
then
usage
fi
-opt_patch=$1
+last_patch=$1
-if [ -n "$opt_patch" ]
+if [ -n "$last_patch" ]
then
- if ! patch=$(find_patch $opt_patch)
+ if ! patch=$(find_patch $last_patch)
then
- printf $"Patch %s is not in series\n" "$opt_patch" >&2
+ printf $"Patch %s is not in series file\n" "$last_patch" >&2
exit 1
fi
else
- patch=$(top_patch)
- if [ -z "$patch" ]
+ last_patch=$(top_patch)
+ if [ -z "$last_patch" ]
then
printf $"No patches applied\n" >&2
exit 1
fi
fi
-if ! is_applied $patch
+if [ -n "$opt_all" -a -z "$first_patch" ]
then
- if [ -n "$opt_verbose" ]
+ first_patch=$(applied_patches | head -n 1)
+fi
+
+if [ -n "$opt_all" ]
+then
+ set -- $(patches_before $last_patch) $last_patch
+ while [ $# -ge 1 -a "$1" != "$first_patch" ]
+ do
+ shift
+ done
+ if [ $# -eq 0 ]
then
- printf $"Patch %s is not applied (no verbose output)\n" \
- "$patch" >&2
- opt_verbose=0
- else
- printf $"Patch %s is not applied\n" "$patch" >&2
+ printf $"Patch %s not applied before patch %s\n" \
+ "$(print_patch $first_patch)" \
+ "$(print_patch $last_patch)" >&2
+ exit 1
fi
+ patches=( $@ )
+else
+ patches=( $last_patch )
fi
-for file in $(files_in_patch_ordered $patch)
-do
- status=" "
- if [ -s $(backup_file_name $patch $file) ]
+list_files_in_patch()
+{
+ local patch=$1
+ local status
+
+ if [ -n "$opt_all" ] && [ -n "$opt_verbose" ] && [ -z "$opt_labels" ]
+ then
+ echo "$patch"
+ fi
+ if [ -n "$opt_verbose" ] && [ -z "$opt_labels" ]
then
- if ! [ -s $file ]
+ use_status=yes
+ fi
+ # Note: If opt_labels is set, then use_status is not set.
+ for file in $(files_in_patch_ordered $patch)
+ do
+ status=" "
+ if [ -s $(backup_file_name $patch $file) ]
then
- status="-"
+ if ! [ -s $file ]
+ then
+ status="-"
+ fi
+ else
+ if [ -s $file ]
+ then
+ status="+"
+ fi
fi
- else
- if [ -s $file ]
+ if [ -n "$opt_labels" ]
then
- status="+"
+ if [ -n "$opt_verbose" ]
+ then
+ echo -n "[$patch] "
+ else
+ echo -n "$patch "
+ fi
fi
- fi
- if [ -z "$opt_verbose" ]
- then
- echo "$file"
- else
- echo "$status $file"
- fi
+ if [ -z "$use_status" ]
+ then
+ echo "$file"
+ else
+ echo "$status $file"
+ fi
+ done
+}
+
+for patch in ${patches[@]}
+do
+ list_files_in_patch $patch
done
+
### Local Variables:
### mode: shell-script
### End:
diff --git a/quilt/pop.in b/quilt/pop.in
index 01b319a..6f8562c 100644
--- a/quilt/pop.in
+++ b/quilt/pop.in
@@ -25,10 +25,10 @@ usage()
printf $"
Remove patch(es) from the stack of applied patches. Without options,
the topmost patch is removed. When a number is specified, remove the
-specified number of patches. When a patch name is specified, remove all
-patches up to and including the specified patch. Patch names may
-include the patches/ prefix, which means that filename completion can be
-used.
+specified number of patches. When a patch name is specified, remove
+patches until the specified patch end up on top of the stack. Patch
+names may include the patches/ prefix, which means that filename
+completion can be used.
-a Remove all applied patches.