tests/test-evolve-stop-contentdiv.t
changeset 3828 c58ebf5d2f57
parent 3827 82c72eb37f85
child 3842 b293cce4ff55
--- a/tests/test-evolve-stop-contentdiv.t	Mon Jun 11 00:47:28 2018 +0530
+++ b/tests/test-evolve-stop-contentdiv.t	Mon Jun 11 01:00:57 2018 +0530
@@ -149,3 +149,69 @@
   |   () draft
   o  0:8fa14d15e168 added hgignore
       () draft
+
+Content-divergence with parent-change which will result in conflicts while
+relocation
+---------------------------------------------------------------------------
+
+  $ echo babar > c
+  $ hg add c
+  $ hg amend
+  $ hg glog
+  @  8:8fd1c4bd144c added d
+  |   () draft
+  | *  5:e49523854bc8 added d
+  | |   () draft
+  | o  3:ca1b80f7960a added c
+  | |   () draft
+  | o  2:b1661037fa25 added b
+  |/    () draft
+  o  1:c7586e2a9264 added a
+  |   () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+  $ hg evolve --content-divergent
+  merge:[5] added d
+  with: [8] added d
+  base: [4] added d
+  rebasing "other" content-divergent changeset 8fd1c4bd144c on ca1b80f7960a
+  merging c
+  warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
+  abort: unresolved merge conflicts (see hg help resolve)
+  [255]
+
+  $ hg diff
+  diff -r ca1b80f7960a c
+  --- a/c	Thu Jan 01 00:00:00 1970 +0000
+  +++ b/c	Thu Jan 01 00:00:00 1970 +0000
+  @@ -1,1 +1,5 @@
+  +<<<<<<< destination: ca1b80f7960a - test: added c
+   foo
+  +=======
+  +babar
+  +>>>>>>> evolving:    8fd1c4bd144c - test: added d
+  diff -r ca1b80f7960a d
+  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  +++ b/d	Thu Jan 01 00:00:00 1970 +0000
+  @@ -0,0 +1,1 @@
+  +foobar
+
+  $ hg evolve --stop
+  stopped the interrupted evolve
+  working directory is now at ca1b80f7960a
+
+XXX: we should have preserved the wdir to be at rev 8
+  $ hg glog
+  *  8:8fd1c4bd144c added d
+  |   () draft
+  | *  5:e49523854bc8 added d
+  | |   () draft
+  | @  3:ca1b80f7960a added c
+  | |   () draft
+  | o  2:b1661037fa25 added b
+  |/    () draft
+  o  1:c7586e2a9264 added a
+  |   () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft