diff tests/test-git-import.t @ 14385:7709cc983025

patch: git metadata was ignored if strip > 1 gitpatch objects emitted by iterhunks() are modified in place by applydiff(). Processing them earlier improves iterhunks() isolation. applydiff() modifying them should still be fixed though.
author Patrick Mezard <pmezard@gmail.com>
date Thu, 19 May 2011 22:44:01 +0200
parents 7439ea4146f8
children a6b543e05305
line wrap: on
line diff
--- a/tests/test-git-import.t	Thu May 19 22:44:01 2011 +0200
+++ b/tests/test-git-import.t	Thu May 19 22:44:01 2011 +0200
@@ -383,3 +383,22 @@
   a   0         -1 unset               b
   $ hg ci -m done
   $ cd ..
+
+Renames and strip
+
+  $ hg init renameandstrip
+  $ cd renameandstrip
+  $ echo a > a
+  $ hg ci -Am adda
+  adding a
+  $ hg import --no-commit -p2 - <<EOF
+  > diff --git a/foo/a b/foo/b
+  > rename from foo/a
+  > rename to foo/b
+  > EOF
+  applying patch from stdin
+  $ hg st --copies
+  A b
+    a
+  R a
+  $ cd ..