tests/test-convert-git.t
changeset 25998 a7527c5769bb
parent 25905 80149d0b6842
parent 25997 d4e1e947444b
child 26047 d9d3d49c4cf7
--- a/tests/test-convert-git.t	Sat Aug 08 18:52:59 2015 -0700
+++ b/tests/test-convert-git.t	Mon Aug 10 15:30:28 2015 -0500
@@ -321,8 +321,9 @@
   $ cp bar bar-copied
   $ cp baz baz-copied
   $ cp baz baz-copied2
+  $ cp baz ba-copy
   $ echo baz2 >> baz
-  $ git add bar-copied baz-copied baz-copied2
+  $ git add bar-copied baz-copied baz-copied2 ba-copy
   $ commit -a -m 'rename and copy'
   $ cd ..
 
@@ -340,6 +341,8 @@
   $ hg -q convert --config convert.git.similarity=100 --datesort git-repo2 fullrepo
   $ hg -R fullrepo status -C --change master
   M baz
+  A ba-copy
+    baz
   A bar-copied
   A baz-copied
     baz
@@ -349,6 +352,13 @@
     foo
   R foo
 
+Ensure that the modification to the copy source was preserved
+(there was a bug where if the copy dest was alphabetically prior to the copy
+source, the copy source took the contents of the copy dest)
+  $ hg cat -r tip fullrepo/baz
+  baz
+  baz2
+
   $ cd git-repo2
   $ echo bar2 >> bar
   $ commit -a -m 'change bar'