[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Quilt-dev] [PATCH] handle quilt import -f -p* and update series
From: |
Brandon Philips |
Subject: |
Re: [Quilt-dev] [PATCH] handle quilt import -f -p* and update series |
Date: |
Mon, 12 Feb 2007 21:26:44 -0800 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
On 11:42 Wed 31 Jan 2007, Andreas Gruenbacher wrote:
> Hi,
>
> On Wednesday 31 January 2007 10:30, Brandon Philips wrote:
> > Handle the case where the patch that is being replaced with quilt import -f
> > has a different strip level than the one in the series.
>
> this always calls change_db_strip_level. How about the attached version
> instead? (Could you please give it a try to see if it breaks something?)
That patch didn't work for me if the argument had a path. eg.
/home/philips/import-fix.diff
This new patch fixes all of the issues, hopefully. :-)
Cheers,
Brandon
---
quilt/import.in | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
Index: quilt/import.in
===================================================================
--- quilt/import.in.orig
+++ quilt/import.in
@@ -102,6 +102,7 @@ fi
eval set -- "$options"
+opt_strip=1
while true
do
case "$1" in
@@ -134,8 +135,6 @@ then
exit 1
fi
-[ -n "$opt_strip" ] && patch_args="-p$opt_strip"
-
for patch_file in "$@"
do
if [ -n "$opt_patch" ]
@@ -178,6 +177,9 @@ do
fi
printf $"Replacing patch %s with new version\n" \
"$(print_patch $patch)" >&2
+
+ [ "$opt_strip" = "$(patch_strip_level "$patch")" ] \
+ || change_db_strip_level "-p$opt_strip" "$patch"
elif [ -e "$dest" ]
then
printf $"Importing patch %s\n" "$(print_patch $patch)"
@@ -201,6 +203,9 @@ do
[ "$merged_patch_file" != "$patch_file" ] && rm -f "$merged_patch_file"
+ patch_args=
+ [ "$opt_strip" = 1 ] || patch_args="-p$opt_strip"
+
if ! patch_in_series $patch &&
! insert_in_series $patch "$patch_args"
then
- Re: [Quilt-dev] [PATCH] handle quilt import -f -p* and update series,
Brandon Philips <=