tests: allow an empty merge commit to have tests pass without too many changes draft stable
authorAnton Shestakov <av6@dwimlabs.net>
Mon, 27 Jan 2020 14:55:35 +0700
branchstable
changeset 5249 1bcfbcc934c1
parent 5248 fa20e48b7713
tests: allow an empty merge commit to have tests pass without too many changes Not the greatest fix, but this allows us to have the same test case for all versions of Mercurial. Hash of 29 changes because instead of both parents only one is set in hg 5.3.
tests/test-evolve-orphan-merge.t
--- a/tests/test-evolve-orphan-merge.t	Sun Jan 26 20:52:25 2020 +0700
+++ b/tests/test-evolve-orphan-merge.t	Mon Jan 27 14:55:35 2020 +0700
@@ -529,13 +529,17 @@
 case where merge commit becomes orphan with its ancestors pruned up until a
 point where the other parent of merge is the first non-pruned ancestor.
 
-  $ hg evolve -r .
+Note: allowing an empty commit here to have the same output on all hg versions.
+In newer versions or Mercurial this command would not create a new commit.
+hg <= 5.2 (32d11a23c9cf)
+
+  $ hg evolve -r . --config ui.allowemptycommit=true
   move:[28] merged l and x
   atop:[0] added hgignore
-  working directory is now at b61ba77b924a
+  working directory is now at * (glob)
 
   $ hg glog
-  @  29:b61ba77b924a merged l and x
+  @  29:* merged l and x (glob)
   |   () draft
   o  0:8fa14d15e168 added hgignore
       () draft