summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBert Wesarg <bert.wesarg@googlemail.com>2010-01-02 13:33:32 +0100
committerJean Delvare <jdelvare@suse.de>2010-01-27 13:49:51 +0100
commita5960daef44bd5b028bfe8ea3482566e80a9501c (patch)
tree0c6852f6ddb48b951ec32ecfef992d4678874cd2
parent0f702aa9f3457aaa7fbfc6148e9b6f28036effe6 (diff)
downloadquilt-a5960daef44bd5b028bfe8ea3482566e80a9501c.tar.gz
push: patch's --merge option has an optional argument now
Since version 2.6.1 the patch utility knows an optional argument for --merge. Regognize this and pass it on to patch.
-rw-r--r--quilt.changes6
-rw-r--r--quilt/push.in21
2 files changed, 21 insertions, 6 deletions
diff --git a/quilt.changes b/quilt.changes
index 76ed1fe..6d10ac5 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Wed Jan 27 13:39:06 CET 2010 - bert.wesarg@googlemail.com
+
+- quilt/push.in: patch's --merge option has an optional argument
+ now.
+
+-------------------------------------------------------------------
Wed Jan 27 13:38:02 CET 2010 - hertzog@debian.org
- quilt/scripts/patchfns.in: Skip non-files when selecting the
diff --git a/quilt/push.in b/quilt/push.in
index d89f927..17862fa 100644
--- a/quilt/push.in
+++ b/quilt/push.in
@@ -21,7 +21,7 @@ setup_colors
usage()
{
- printf $"Usage: quilt push [-afqv] [--merge] [--leave-rejects] [--color[=always|auto|never]] [num|patch]\n"
+ printf $"Usage: quilt push [-afqv] [--merge[=merge|diff3]] [--leave-rejects] [--color[=always|auto|never]] [num|patch]\n"
if [ x$1 = x-h ]
then
printf $"
@@ -44,7 +44,7 @@ be used.
--fuzz=N
Set the maximum fuzz factor (default: 2).
--m, --merge
+-m, --merge[=merge|diff3]
Merge the patch file into the original files (see patch(1)).
--leave-rejects
@@ -274,7 +274,7 @@ list_patches()
fi
}
-options=`getopt -o fqvamh --long fuzz:,merge,leave-rejects,color:: -- "$@"`
+options=`getopt -o fqvam::h --long fuzz:,merge::,leave-rejects,color:: -- "$@"`
if [ $? -ne 0 ]
then
@@ -305,8 +305,17 @@ do
opt_fuzz=$2
shift 2 ;;
-m | --merge)
- opt_merge=1
- shift 1 ;;
+ case "$2" in
+ "" | merge)
+ opt_merge=1
+ opt_merge_arg= ;;
+ diff3)
+ opt_merge=1
+ opt_merge_arg="=diff3" ;;
+ *)
+ usage ;;
+ esac
+ shift 2 ;;
--leave-rejects)
opt_leave_rejects=1
shift ;;
@@ -357,7 +366,7 @@ more_patch_args=
more_patch_args="$more_patch_args -f"
if [ -n "$opt_merge" ]
then
- more_patch_args="$more_patch_args --merge"
+ more_patch_args="$more_patch_args --merge$opt_merge_arg"
fi
[ -n "$opt_fuzz" ] && more_patch_args="$more_patch_args -F$opt_fuzz"