evolve: add test to show that --abort is working fine
authorSushil khanchi <sushilkhanchi97@gmail.com>
Wed, 27 Nov 2019 22:52:08 +0530
changeset 5027 08be8a4d5196
parent 5022 95af630d913a
child 5028 109889c7d02d
evolve: add test to show that --abort is working fine When resolving content-divergence where relocation of "divergent" changeset is also required, this test file make sure that --abort option is working fine.
tests/test-evolve-content-divergent-stack.t
--- a/tests/test-evolve-content-divergent-stack.t	Thu Dec 19 21:36:59 2019 -0800
+++ b/tests/test-evolve-content-divergent-stack.t	Wed Nov 27 22:52:08 2019 +0530
@@ -459,6 +459,14 @@
   atop:[17] added b
   move:[8] added d
 
+  $ hg log -r tip
+  changeset:   19:c351be27f199
+  tag:         tip
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  instability: content-divergent
+  summary:     added d
+  
 Now let's try to evolve stack
   $ hg evolve --content-divergent
   merge:[10] added a
@@ -479,6 +487,42 @@
   (see 'hg help evolve.interrupted')
   [1]
 
+(make sure that --abort works fine when relocation of "divergent" also included)
+  $ hg evolve --abort
+  2 new content-divergent changesets
+  evolve aborted
+  working directory is now at 509103439e5e
+
+confirm that tip is same as it was before we started --content-div resolution
+  $ hg log -r tip
+  changeset:   19:c351be27f199
+  tag:         tip
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  instability: content-divergent
+  summary:     added d
+  
+
+Again, let's evolve the 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)