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?)
Thanks,
Andreas
? fix
? import-fix.diff
? quilt/scripts/.patchfns.in.swp
Index: quilt.changes
===================================================================
RCS file: /sources/quilt/quilt/quilt.changes,v
retrieving revision 1.484
diff -u -r1.484 quilt.changes
--- quilt.changes 31 Jan 2007 18:47:09 -0000 1.484
+++ quilt.changes 31 Jan 2007 19:40:27 -0000
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Wed Jan 31 11:37:58 PST 2007 - [EMAIL PROTECTED]
+
+- quilt import: From Brandon Philips <[EMAIL PROTECTED]>: When
+ reimporting an existing patch, update the patch strip level in
+ the series file where necessary.
+
+-------------------------------------------------------------------
Wed Jan 31 10:46:32 PST 2007 - [EMAIL PROTECTED]
- Update the German translation.
Index: quilt/import.in
===================================================================
RCS file: /sources/quilt/quilt/quilt/import.in,v
retrieving revision 1.40
diff -u -r1.40 import.in
--- quilt/import.in 1 Jun 2006 10:01:21 -0000 1.40
+++ quilt/import.in 31 Jan 2007 19:40:27 -0000
@@ -102,6 +102,7 @@
eval set -- "$options"
+opt_strip=1
while true
do
case "$1" in
@@ -134,8 +135,6 @@
exit 1
fi
-[ -n "$opt_strip" ] && patch_args="-p$opt_strip"
-
for patch_file in "$@"
do
if [ -n "$opt_patch" ]
@@ -178,6 +177,9 @@
fi
printf $"Replacing patch %s with new version\n" \
"$(print_patch $patch)" >&2
+
+ [ "$opt_strip" = "$(patch_strip_level "$patch_file")" ] \
+ || change_db_strip_level "-p$opt_strip" "$patch_file"
elif [ -e "$dest" ]
then
printf $"Importing patch %s\n" "$(print_patch $patch)"
@@ -201,6 +203,9 @@
[ "$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
_______________________________________________
Quilt-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/quilt-dev