quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Quilt-dev] [patch 1/5] Verbosly fail when trying to push a non existant


From: martin . quinson
Subject: [Quilt-dev] [patch 1/5] Verbosly fail when trying to push a non existant patch
Date: Wed, 19 Dec 2012 15:35:11 +0100
User-agent: quilt/0.60-1

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]