diff tests/test-git-import.t @ 12874:bb7bf43b72fb stable

patch: fix copies when patching over uncommitted changed (issue2459)
author Patrick Mezard <pmezard@gmail.com>
date Thu, 28 Oct 2010 21:25:53 +0200
parents b96de59a2c39
children 7439ea4146f8
line wrap: on
line diff
--- a/tests/test-git-import.t	Wed Oct 27 16:54:46 2010 -0500
+++ b/tests/test-git-import.t	Thu Oct 28 21:25:53 2010 +0200
@@ -361,4 +361,25 @@
   A binary2
     text2
   R text2
+  $ cd ..
 
+Consecutive import with renames (issue2459)
+
+  $ hg init issue2459
+  $ cd issue2459
+  $ hg import --no-commit --force - <<EOF
+  > diff --git a/a b/a
+  > new file mode 100644
+  > EOF
+  applying patch from stdin
+  $ hg import --no-commit --force - <<EOF
+  > diff --git a/a b/b
+  > rename from a
+  > rename to b
+  > EOF
+  applying patch from stdin
+  a has not been committed yet, so no copy data will be stored for b.
+  $ hg debugstate
+  a   0         -1 unset               b
+  $ hg ci -m done
+  $ cd ..