summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2014-07-23 09:54:32 +0200
committerJean Delvare <jdelvare@suse.de>2014-07-23 09:54:32 +0200
commitc7b479354c4fbcc36e567420aada536cb810d6cf (patch)
tree7d32dd921d4015cb6b4c93f20e810c8fa1bbcfba
parent054f2f0dc232f3609c2566ab4ce98595c5991065 (diff)
downloadquilt-c7b479354c4fbcc36e567420aada536cb810d6cf.tar.gz
files: Add support for unapplied patches
We already have a function to figure out which files are touched by unapplied patches. The only thing missing to let the user call "quilt files" on unapplied patches was two small spots of glue.
-rw-r--r--quilt/files.in9
-rw-r--r--test/example1.test3
2 files changed, 10 insertions, 2 deletions
diff --git a/quilt/files.in b/quilt/files.in
index 355fa21..2f697cb 100644
--- a/quilt/files.in
+++ b/quilt/files.in
@@ -86,7 +86,7 @@ then
usage
fi
-last_patch=$(find_applied_patch "$1") || exit 1
+last_patch=$(find_patch_in_series "$1") || exit 1
if [ -n "$opt_all" -a -z "$first_patch" ]
then
@@ -128,7 +128,12 @@ list_files_in_patch()
fi
# Note: If opt_labels is set, then use_status is not set.
IFS=
- files_in_patch "$patch" |
+ if is_applied "$patch"
+ then
+ files_in_patch "$patch"
+ else
+ filenames_in_patch "$patch"
+ fi |
sort |
while read file
do
diff --git a/test/example1.test b/test/example1.test
index 7eaa228..582530c 100644
--- a/test/example1.test
+++ b/test/example1.test
@@ -88,6 +88,9 @@ Or ``quilt edit Oberon.txt''
>
> No patches applied
+ $ quilt files %{P}flower.diff
+ > Oberon.txt
+
$ sed -e "s/girls/maidens/" Oberon.txt > Oberon.new
$ mv Oberon.new Oberon.txt
$ quilt push