changeset 5018:f1e90ce1d372

evolve: add more tests for --continue case when relocating "divergent"
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Wed, 27 Nov 2019 20:54:48 +0530
parents b302066725c3
children 967e9a87e82d
files tests/test-evolve-content-divergent-stack.t
diffstat 1 files changed, 68 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-evolve-content-divergent-stack.t	Wed Nov 27 19:50:33 2019 +0530
+++ b/tests/test-evolve-content-divergent-stack.t	Wed Nov 27 20:54:48 2019 +0530
@@ -432,6 +432,74 @@
   o  0:8fa14d15e168 added hgignore
       () [default] draft
 
+when relocating "other" hit merge conflict but not "divergent"
+--------------------------------------------------------------
+  $ hg strip 14: --hidden
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  saved backup bundle to $TESTTMP/stackrepo1/.hg/strip-backup/74fbf3e6a0b6-15474722-backup.hg
+  8 new content-divergent changesets
+
+Insert conflicting changes in between the stack of content-div csets
+  $ hg up -r "max(desc('added b'))"
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ echo b_diverging_local > b
+  $ hg amend
+  2 new orphan changesets
+  $ hg evolve
+  move:[12] added c
+  atop:[14] added b
+  move:[13] added d
+  $ hg up -r d5f148423c16
+  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ echo b_diverging_other > b
+  $ hg amend
+  2 new orphan changesets
+  $ hg evolve
+  move:[7] added c
+  atop:[17] added b
+  move:[8] added d
+
+Now let's try to evolve stack
+  $ hg evolve --content-divergent
+  merge:[10] added a
+  with: [5] watbar to a
+  base: [1] added a
+  rebasing "other" content-divergent changeset 8e222f257bbf on 2228e3b74514
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  merge:[14] added b
+  with: [17] added b
+  base: [2] added b
+  rebasing "divergent" content-divergent changeset 2a955e808c53 on 74fbf3e6a0b6
+  rebasing "other" content-divergent changeset 509103439e5e on 74fbf3e6a0b6
+  merging b
+  warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
+  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
+  4 new orphan changesets
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
+  [1]
+
+  $ echo foo > b
+  $ hg res -m
+  (no more unresolved files)
+  continue: hg evolve --continue
+  $ hg evolve --continue
+  merge:[15] added c
+  with: [18] added c
+  base: [3] added c
+  rebasing "divergent" content-divergent changeset 48b0f803817a on 4e29776e83a5
+  rebasing "other" content-divergent changeset eaf34afe4df3 on 4e29776e83a5
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  merge:[16] added d
+  with: [19] added d
+  base: [4] added d
+  rebasing "divergent" content-divergent changeset 91c8ccb9c241 on 77126af93a25
+  rebasing "other" content-divergent changeset c351be27f199 on 77126af93a25
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  working directory is now at 4e29776e83a5
+
+  $ hg evolve -l
+
   $ cd ..
 
 Make sure that content-divergent resolution doesn't undo a change (issue6203)