? fix ? import-fix.diff ? quilt/scripts/.patchfns.in.swp --- 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