tests/test-evolve-abort-phasediv.t
changeset 3771 1f339d81aabd
parent 3757 2bc60fcac354
child 3772 6240579fd0c0
--- a/tests/test-evolve-abort-phasediv.t	Wed May 23 12:16:24 2018 +0200
+++ b/tests/test-evolve-abort-phasediv.t	Thu May 24 00:58:35 2018 +0530
@@ -214,3 +214,97 @@
   |   () public
   o  0:8fa14d15e168 added hgignore
       () public
+
+When there are multiple conflicted phase-divergence resolution and we abort
+after resolving one of them
+----------------------------------------------------------------------------
+
+  $ hg up e44ebefe4f54
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ echo foobar > c
+  $ hg amend
+
+  $ hg glog --hidden
+  @  10:ef9b72b9b42c added d
+  |   () draft
+  | *  9:28cd06b3f801 added c
+  |/    () draft
+  | x  8:9ff8adbe8a24 added c
+  |/    () draft
+  | x  7:e44ebefe4f54 added d
+  |/    () draft
+  | x  6:ddba58020bc0 added d
+  |/    () draft
+  | x  5:cfe30edc6125 added d
+  |/    () draft
+  | o  4:c41c793e0ef1 added d
+  | |   () public
+  | o  3:ca1b80f7960a added c
+  | |   () public
+  | o  2:b1661037fa25 added b
+  |/    () public
+  o  1:c7586e2a9264 added a
+  |   () public
+  o  0:8fa14d15e168 added hgignore
+      () public
+
+  $ hg evolve --phase-divergent --all
+  recreate:[9] added c
+  atop:[3] added c
+  rebasing to destination parent: b1661037fa25
+  merging b
+  warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
+  evolution failed!
+  fix conflict then run 'hg evolve --continue' or use `hg evolve --abort`
+  abort: unresolved merge conflicts (see hg help resolve)
+  [255]
+
+  $ echo watwat > c
+  $ hg resolve -m
+  (no more unresolved files)
+  continue: hg evolve --continue
+  $ hg evolve --continue
+  evolving 9:28cd06b3f801 "added c"
+  computing new diff
+  committed as 95d746965290
+  recreate:[10] added d
+  atop:[4] added d
+  rebasing to destination parent: ca1b80f7960a
+  merging c
+  warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
+  evolution failed!
+  fix conflict then run 'hg evolve --continue' or use `hg evolve --abort`
+  abort: unresolved merge conflicts (see hg help resolve)
+  [255]
+
+  $ hg evolve --abort
+  evolve aborted
+  working directory is now at ef9b72b9b42c
+
+  $ hg glog --hidden
+  o  11:95d746965290 phase-divergent update to ca1b80f7960a:
+  |
+  |  added c
+  |   () draft
+  | @  10:ef9b72b9b42c added d
+  | |   () draft
+  | | x  9:28cd06b3f801 added c
+  | |/    () draft
+  | | x  8:9ff8adbe8a24 added c
+  | |/    () draft
+  | | x  7:e44ebefe4f54 added d
+  | |/    () draft
+  | | x  6:ddba58020bc0 added d
+  | |/    () draft
+  | | x  5:cfe30edc6125 added d
+  | |/    () draft
+  +---o  4:c41c793e0ef1 added d
+  | |     () public
+  o |  3:ca1b80f7960a added c
+  | |   () public
+  o |  2:b1661037fa25 added b
+  |/    () public
+  o  1:c7586e2a9264 added a
+  |   () public
+  o  0:8fa14d15e168 added hgignore
+      () public