1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
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
This patch was refused by upstream:
http://lists.nongnu.org/archive/html/quilt-dev/2013-01/msg00014.html
.
We need to think again about it to see how to rework it to make it
more acceptable.
---
quilt/push.in | 7 +++++++
test/missing.test | 4 ++++
2 files changed, 11 insertions(+)
Index: b/quilt/push.in
===================================================================
--- a/quilt/push.in
+++ b/quilt/push.in
@@ -187,6 +187,13 @@
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
Index: b/test/missing.test
===================================================================
--- 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
|