[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Quilt-dev] [PATCH 2/2] files: Add support for unapplied patches
From: |
Jean Delvare |
Subject: |
[Quilt-dev] [PATCH 2/2] files: Add support for unapplied patches |
Date: |
Wed, 16 Jul 2014 17:29:17 +0200 |
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.
---
quilt/files.in | 9 +++++++--
test/example1.test | 3 +++
2 files changed, 10 insertions(+), 2 deletions(-)
--- 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
--- 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
--
Jean Delvare
SUSE L3 Support