Allow quilt header to operate on patches out of the series

 quilt/header.in  |    8 +++-----
 test/header.test |   14 ++++++++++++++
 2 files changed, 17 insertions(+), 5 deletions(-)

--- quilt-files.orig/quilt/header.in
+++ quilt-files/quilt/header.in
@@ -126,9 +126,7 @@ then
        usage
 fi
 
-patch=$(find_series_patch "$1") || exit 1
-
-patch_file=$(patch_file_name $patch)
+patch_file=$(find_patch_file "$1") || exit 1
 
 if [ -z "$opt_replace" -a -z "$opt_append" -a -z "$opt_edit" ]
 then
@@ -173,10 +171,10 @@ else
                if [ -z "$opt_append" ]
                then
                        printf \
-$"Replaced header of patch %s\n" "$(print_patch $patch)"
+$"Replaced header of patch %s\n" "$patch_file"
                else
                        printf \
-$"Appended text to header of patch %s\n" "$(print_patch $patch)"
+$"Appended text to header of patch %s\n" "$patch_file"
                fi
        else
                exit 1
--- quilt-files.orig/test/header.test
+++ quilt-files/test/header.test
@@ -45,5 +45,19 @@
        > -foo
        > +bar
 
+       $ mkdir t
+       $ cp patches/patch t/patch
+
+       $ quilt header t/patch
+       > Header2
+       > Appended
+
+       $ quilt header -r t/patch
+       < Replaced
+       > Replaced header of patch t/patch
+
+       $ quilt header t/patch
+       > Replaced
+
        $ cd ..
        $ rm -rf d

--
John


_______________________________________________
Quilt-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/quilt-dev

Reply via email to