diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2003-01-29 14:47:28 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2003-01-29 14:47:28 +0000 |
commit | ae0a90a1a94c3f30abdf92aafa09159d6ad10056 (patch) | |
tree | e939b595eef5d5b1170f38813ea0189f18352e6a | |
parent | f1974021073a238f9f99d2781cdcc6dbbe57dcd1 (diff) | |
download | quilt-ae0a90a1a94c3f30abdf92aafa09159d6ad10056.tar.gz |
Add --leave-rejects option to quilt push (and apatch)
-rwxr-xr-x | lib/apatch.in | 10 | ||||
-rw-r--r-- | quilt/push.in | 13 |
2 files changed, 19 insertions, 4 deletions
diff --git a/lib/apatch.in b/lib/apatch.in index 76d9dc7..3a13238 100755 --- a/lib/apatch.in +++ b/lib/apatch.in @@ -28,7 +28,10 @@ rollback_patch() local patch=$1 pc_file=$(pc_file_name $patch) @LIB@/backup-files $silent_unless_verbose \ -f $pc_file -B .pc/$patch/ -r - rm -f $(files_in_patch $patch | sed -e 's/$/\.rej/') + if [ -z "$opt_leave_rejects" ] + then + rm -f $(files_in_patch $patch | sed -e 's/$/\.rej/') + fi } interrupt() @@ -130,7 +133,7 @@ apatch() return $status } -options=`getopt -o fqvh -- "$@"` +options=`getopt -o fqvh --long leave-rejects -- "$@"` if [ $? -ne 0 ] then @@ -151,6 +154,9 @@ do -v) opt_verbose=1 shift ;; + --leave-rejects) + opt_leave_rejects=1 + shift ;; -h) usage -h ;; --) diff --git a/quilt/push.in b/quilt/push.in index d488c7e..45becc9 100644 --- a/quilt/push.in +++ b/quilt/push.in @@ -19,7 +19,7 @@ fi usage() { - echo "Usage: quilt push [-afqv] [num|patch]" + echo "Usage: quilt push [-afqv] [--leave-rejects] [num|patch]" if [ x$1 = x-h ] then cat <<EOF @@ -38,6 +38,10 @@ specified, apply the next patch. -v Verbose operation. +--leave-rejects + Leave around the reject files patch produced, even if + the a patch is not actually applied. + EOF exit 0 else @@ -82,7 +86,7 @@ list_patches() fi } -options=`getopt -o fqvah -- "$@"` +options=`getopt -o fqvah --long leave-rejects -- "$@"` if [ $? -ne 0 ] then @@ -108,6 +112,9 @@ do shift ;; -h) usage -h ;; + --leave-rejects) + opt_leave_rejects=1 + shift ;; --) shift break ;; @@ -137,6 +144,8 @@ fi apatch_options="$apatch_options -q" [ -n "$opt_verbose" ] && apatch_options="$apatch_options -v" +[ -n "$opt_leave_rejects" ] && + apatch_options="="$apatch_options --leave-rejects" if [ -n "$stop_at_patch" ] then |