summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--quilt.changes7
-rw-r--r--quilt/push.in13
-rwxr-xr-xscripts/apatch.in12
3 files changed, 26 insertions, 6 deletions
diff --git a/quilt.changes b/quilt.changes
index 96dcf99..7f101a6 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Fri Apr 11 17:17:35 CEST 2003 - agruen@suse.de
+
+- Apply patches with `patch -f' by default. Add --interactive
+ option top `quilt push' to allow applying patches without
+ `patch -f'.
+
+-------------------------------------------------------------------
Wed Apr 9 12:08:47 CEST 2003 - agruen@suse.de
- Remove awk hacks in Makefile.in with shell loop and sed hack:
diff --git a/quilt/push.in b/quilt/push.in
index ad3c706..423b10c 100644
--- a/quilt/push.in
+++ b/quilt/push.in
@@ -40,7 +40,11 @@ patch name is specified, apply the next patch from the series file.
--leave-rejects
Leave around the reject files patch produced, even if the patch
is not actually applied.
-
+
+--interactive
+ Allow the patch utility to ask hwo to deal with conflicts. If
+ this option is not given, the -f patch optionch will be used.
+
"
exit 0
else
@@ -85,7 +89,7 @@ list_patches()
fi
}
-options=`getopt -o fqvah --long leave-rejects -- "$@"`
+options=`getopt -o fqvah --long leave-rejects,interactive -- "$@"`
if [ $? -ne 0 ]
then
@@ -114,6 +118,9 @@ do
--leave-rejects)
opt_leave_rejects=1
shift ;;
+ --interactive)
+ opt_interactive=1
+ shift ;;
--)
shift
break ;;
@@ -145,6 +152,8 @@ fi
apatch_options="$apatch_options -v"
[ -n "$opt_leave_rejects" ] &&
apatch_options="$apatch_options --leave-rejects"
+[ -n "$opt_interactive" ] &&
+ apatch_options="$apatch_options --interactive"
if [ -n "$stop_at_patch" ]
then
diff --git a/scripts/apatch.in b/scripts/apatch.in
index ca97d13..046e54f 100755
--- a/scripts/apatch.in
+++ b/scripts/apatch.in
@@ -56,15 +56,15 @@ apply_patch()
then
gzip -cd $patch_file \
| @PATCH@ $(patch_args $patch) --no-backup-if-mismatch \
- -E $silent
+ -E $silent $force_apply
elif [ "x${patch_file:(-4)}" = "x.bz2" ]
then
bzip2 -cd $patch_file \
| @PATCH@ $(patch_args $patch) --no-backup-if-mismatch \
- -E $silent
+ -E $silent $force_apply
else
@PATCH@ $(patch_args $patch) --no-backup-if-mismatch \
- -E $silent -i $patch_file
+ -E $silent -i $patch_file $force_apply
fi
}
@@ -133,7 +133,7 @@ apatch()
return $status
}
-options=`getopt -o fqvh --long leave-rejects -- "$@"`
+options=`getopt -o fqvh --long leave-rejects,interactive -- "$@"`
if [ $? -ne 0 ]
then
@@ -157,6 +157,9 @@ do
--leave-rejects)
opt_leave_rejects=1
shift ;;
+ --interactive)
+ opt_interactive=1
+ shift ;;
-h)
usage -h ;;
--)
@@ -172,6 +175,7 @@ fi
[ -n "$opt_quiet" ] && silent=-s
[ -z "$opt_verbose" ] && silent_unless_verbose=-s
+[ -z "$opt_interactive" ] && force_apply=-f
patch=$(stripit $1)