Description: Verbosly fail when trying to push a non existant patch
 Useful if there is a typo in the serie file.
 This can be overriden by providing -f.
Bug-Debian: http://bugs.debian.org/358875
Forwarded: sent 2012-12-19

---
 quilt/push.in     |    7 +++++++
 test/missing.test |    4 ++++
 2 files changed, 11 insertions(+)

--- a/quilt/push.in
+++ b/quilt/push.in
@@ -184,6 +184,13 @@ add_patch()
                no_reject_files="-r $tmp"
        fi
 
+       if [ ! -e "$patch_file" -a -z "$opt_force" ]
+       then
+               printf $"Patch %s does not exist\n" \
+                      "$(print_patch $patch)" >&2
+               return 1
+       fi
+
        apply_patch $patch "$patch_file"
        status=$?
        trap "" SIGINT
--- a/test/missing.test
+++ b/test/missing.test
@@ -5,6 +5,10 @@
        < missing2.diff
        
        $ quilt push -qa
+       > Patch patches/missing1.diff does not exist
+       > Applying patch patches/missing1.diff
+       
+       $ quilt push -qaf
        > Applying patch patches/missing1.diff
        > Patch patches/missing1.diff does not exist; applied empty patch
        > Applying patch patches/missing2.diff


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

Reply via email to