tests/test-casecollision-merge.t
branchstable
changeset 19106 3d0dd890c525
parent 19105 c60a7f5a741f
child 19801 41abe2e3e3b7
--- a/tests/test-casecollision-merge.t	Tue Apr 30 05:01:32 2013 +0900
+++ b/tests/test-casecollision-merge.t	Tue Apr 30 05:01:32 2013 +0900
@@ -16,6 +16,8 @@
 
   $ echo a > a
   $ hg add a
+  $ echo b > b
+  $ hg add b
   $ hg commit -m '#0'
   $ hg tag -l A
   $ hg rename a tmp
@@ -33,6 +35,7 @@
   $ hg status -A
   M A
   R a
+  C b
   C x
 
   $ hg update -q --clean 1
@@ -40,6 +43,7 @@
   $ hg status -A
   M x
   C A
+  C b
   $ hg commit -m '(D)'
   $ hg tag -l D
 
@@ -64,6 +68,7 @@
 
   $ hg update -q --clean C
   $ echo "modify 'a' at (E)" > a
+  $ echo "modify 'b' at (E)" > b
   $ hg commit -m '(E)'
   created new head
   $ hg tag -l E
@@ -77,10 +82,45 @@
   $ hg status -A
   M A
     a
+  M b
   C x
   $ cat A
   modify 'a' at (E)
 
+test also the case that (B) is recorded after (C), to prevent
+regression by changes in the future.
+
+to avoid unexpected (successful) behavior by filelog unification,
+target file is not 'a'/'A' but 'b'/'B' in this case.
+
+  $ hg update -q --clean A
+  $ hg rename b tmp
+  $ hg rename tmp B
+  $ hg commit -m '(B1)'
+  created new head
+  $ hg tag -l B1
+
+  $ hg merge -q C
+  $ hg status -A
+  M x
+  C B
+  C a
+  $ hg commit -m '(D1)'
+  $ hg tag -l D1
+
+  $ echo "modify 'B' at (F1)" > B
+  $ hg commit -m '(F1)'
+  $ hg tag -l F1
+
+  $ hg merge -q --tool internal:other E
+  $ hg status -A
+  M B
+    b
+  M a
+  C x
+  $ cat B
+  modify 'b' at (E)
+
   $ cd ..
 
 (2) colliding file is not related to collided file