[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Quilt-dev] [patch] import -R (reverse)
From: |
Randy Dunlap |
Subject: |
[Quilt-dev] [patch] import -R (reverse) |
Date: |
Sun, 3 Dec 2006 21:39:16 -0800 |
Hi,
I needed 'quilt import -R' recently and noticed that it is
listed in the TODO file.
This is likely missing something, so please tell me what it is.
It works, but I had to specify -p1 also, instead of it being
used as the normal default. Anyone know why?
Thanks.
---
Add "-R" for "apply patch in reverse" to quilt "import".
---
quilt/import.in | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
--- quilt-0.46.orig/quilt/import.in
+++ quilt-0.46/quilt/import.in
@@ -19,7 +19,7 @@ fi
usage()
{
- printf $"Usage: quilt import [-p num] [-P patch] [-f] [-d {o|a|n}]
patchfile ...\n"
+ printf $"Usage: quilt import [-p num] [-R] [-P patch] [-f] [-d {o|a|n}]
patchfile ...\n"
if [ x$1 = x-h ]
then
printf $"
@@ -29,6 +29,9 @@ current top patch, and must be pushed af
-p num
Number of directory levels to strip when applying (default=1)
+-R
+ Apply patch in reverse.
+
-P patch
Patch filename to use inside quilt. This option can only be
used when importing a single patch.
@@ -93,7 +96,8 @@ die()
exit $status
}
-options=`getopt -o P:d:fp:h -- "$@"`
+options=`getopt -o P:d:fRp:h -- "$@"`
+opt_reverse=""
if [ $? -ne 0 ]
then
@@ -111,6 +115,9 @@ do
-p)
opt_strip=$2
shift 2 ;;
+ -R)
+ opt_reverse=$1
+ shift ;;
-d)
case "$2" in
o|n|a) opt_desc=$2 ;;
@@ -135,6 +142,7 @@ then
fi
[ -n "$opt_strip" ] && patch_args="-p$opt_strip"
+patch_args=`expr "$patch_args $opt_reverse"`
for patch_file in "$@"
do
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Quilt-dev] [patch] import -R (reverse),
Randy Dunlap <=