diff tests/test-evolve-abort-contentdiv.t @ 3792:bb7d1616407f

evolve: return the new node formed only as the replacement sometimes, the the other content divergent changeset is obsoleted in favour of the local divergent changeset in which case we should not store that as a replacement because `hg evolve --abort` will strip that changeset. Let's make sure we return the newnode only if formed. The test results shows that we are still not 100% accurate as we need to strip an obsmarker.
author Pulkit Goyal <7895pulkit@gmail.com>
date Thu, 24 May 2018 02:12:14 +0530
parents 63d6d024dfb2
children fb821ed44f86
line wrap: on
line diff
--- a/tests/test-evolve-abort-contentdiv.t	Thu May 24 17:04:20 2018 +0530
+++ b/tests/test-evolve-abort-contentdiv.t	Thu May 24 02:12:14 2018 +0530
@@ -165,16 +165,16 @@
   abort: fix conflicts and run 'hg evolve --continue' or use 'hg update -C .' to abort
   [255]
 
-XXX: this went wrong and stripped rev 10 also
   $ hg evolve --abort
-  warning: ignoring unknown working parent 491e10505bae!
   evolve aborted
   working directory is now at 491e10505bae
 
   $ hg glog --hidden
-  @  9:491e10505bae added c
+  @  10:491e10505bae added c
   |   () draft
-  | x  8:7398f702a162 added c
+  | x  9:7398f702a162 added c
+  |/    () draft
+  | o  8:2ba73e31f264 added c
   |/    () draft
   | *  7:f0f1694f123e added d
   | |   () draft
@@ -192,3 +192,18 @@
   |   () draft
   o  0:8fa14d15e168 added hgignore
       () draft
+
+XXX: we need to strip off the obsmarker created 10 -> 8
+  $ hg obslog -r . --all
+  o    2ba73e31f264 (8) added c
+  |\
+  @ |  491e10505bae (10) added c
+  | |    rewritten as 2ba73e31f264 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
+  | |
+  x |  7398f702a162 (9) added c
+  |/     rewritten(content) as 491e10505bae using amend by test (Thu Jan 01 00:00:00 1970 +0000)
+  |
+  x  ca1b80f7960a (3) added c
+       rewritten(content) as 2ba73e31f264 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
+       rewritten(content) as 7398f702a162 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
+