diff tests/test-rename-after-merge @ 7689:d821ea464465

Fix a corner case when committing a rename after a merge (issue1476)
author Patrick Mezard <pmezard@gmail.com>
date Sun, 25 Jan 2009 18:55:29 +0100
parents 784eadabd985
children
line wrap: on
line diff
--- a/tests/test-rename-after-merge	Wed Jan 21 11:15:47 2009 -0600
+++ b/tests/test-rename-after-merge	Sun Jan 25 18:55:29 2009 +0100
@@ -32,3 +32,37 @@
 echo % rename back c as b
 hg mv c b
 hg st
+cd ..
+
+# Test issue 1476: renaming a first parent file into
+# another first parent file while none of them belong to
+# the second parent was broken
+echo % test issue 1476
+hg init repo1476
+cd repo1476
+echo a > a
+hg ci -Am adda
+echo b1 > b1
+echo b2 > b2
+hg ci -Am changea
+hg up -C 0
+echo c1 > c1
+echo c2 > c2
+hg ci -Am addcandd
+echo % merge heads
+hg merge
+hg mv -Af c1 c2
+echo % commit issue 1476
+hg ci -m merge
+hg log -r tip -C -v | grep copies
+hg rollback
+hg up -C .
+echo % merge heads again
+hg merge
+hg mv -Af b1 b2
+echo % commit issue 1476 with a rename on the other side
+hg ci -m merge
+hg log -r tip -C -v | grep copies
+
+
+