[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Quilt-dev] issue with quilt push -f
From: |
Martin Panter |
Subject: |
Re: [Quilt-dev] issue with quilt push -f |
Date: |
Wed, 17 Sep 2014 22:38:29 +0000 |
On 17/09/2014, Aristeu Rozanski <address@hidden> wrote:
> The next step, my usual "quilt push -f" didn't quite did the expected,
> it just ran patch without -f and patch just thought it was a full revert
> based on the first hunk. Now I understand that "quilt push -f -q" will
> make quilt use "-f" for patch, but here's the problem: using quilt push
> without -q is supposed to be "interactive" except it isn't after the
> color output support:
> . . .
I found this behaviour annoying when I used to use Quilt a long time
ago (possibly even before colour output support?).
> 1) could simply use -f for patch always, and have -q still
> useful to supress further messages
Here’s a patch written a few years ago which should do option 1. See
<https://github.com/vadmium/quilt/commit/b675543b1c16cb00c8132cfee9c8d40cdae87dbf.patch>
in case G Mail screws it up.
>From b675543b1c16cb00c8132cfee9c8d40cdae87dbf Mon Sep 17 00:00:00 2001
From: Martin Panter <vadmium à gmail·com>
Date: Wed, 23 Sep 2009 18:20:30 +1000
Subject: [PATCH] =?UTF-8?q?Do=20not=20use=20interactive=20mode=20with=20?=
=?UTF-8?q?=E2=80=9Cquilt=20push=20-f=E2=80=9D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Now the “patch -f” option is always used.
---
quilt/push.in | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/quilt/push.in b/quilt/push.in
index 36e4664..ab8a7dd 100644
--- a/quilt/push.in
+++ b/quilt/push.in
@@ -36,8 +36,7 @@ be used.
-q Quiet operation.
--f Force apply, even if the patch has rejects. Unless in quiet mode,
- apply the patch interactively: the patch utility may ask questions.
+-f Force apply, even if the patch has rejects.
-v Verbose operation.
@@ -115,19 +114,19 @@ apply_patch()
| patch $QUILT_PATCH_OPTS $(push_patch_args $patch) \
--backup --prefix="$QUILT_PC/$patch/" \
$no_reject_files \
- -E $silent $force_apply 2>&1
+ -E $silent -f 2>&1
elif [ "${patch_file:(-4)}" = ".bz2" ]
then
bzip2 -cd $patch_file \
| patch $QUILT_PATCH_OPTS $(push_patch_args $patch) \
--backup --prefix="$QUILT_PC/$patch/" \
$no_reject_files \
- -E $silent $force_apply 2>&1
+ -E $silent -f 2>&1
else
patch $QUILT_PATCH_OPTS $(push_patch_args $patch) \
--backup --prefix="$QUILT_PC/$patch/" \
$no_reject_files \
- -E $silent $force_apply -i $patch_file 2>&1
+ -E $silent -f -i $patch_file 2>&1
fi
}
@@ -337,7 +336,6 @@ stop_at_patch=$(find_unapplied_patch
"$stop_at_patch") || exit 1
[ -n "$opt_quiet" ] && silent=-s
[ -z "$opt_verbose" ] && silent_unless_verbose=-s
-[ -z "$opt_force" -o -n "$opt_quiet" ] && force_apply=-f
[ -n "$opt_force" ] && opt_leave_rejects=1
top=$(top_patch)