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
|
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.
.
This patch was refused by upstream:
https://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.
Bug-Debian: https://bugs.debian.org/358875
Forwarded: https://lists.nongnu.org/archive/html/quilt-dev/2012-12/msg00034.html
---
quilt/push.in | 7 +++++++
test/missing.test | 4 ++++
2 files changed, 11 insertions(+)
--- a/quilt/push.in
+++ b/quilt/push.in
@@ -182,6 +182,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
--- 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 %{P}missing1.diff
> Patch %{P}missing1.diff does not exist; applied empty patch
> Applying patch %{P}missing2.diff
|