tests: allow an empty merge commit to have tests pass without too many changes stable
authorAnton Shestakov <av6@dwimlabs.net>
Mon, 27 Jan 2020 14:55:35 +0700
branchstable
changeset 5097 f0c18ad24273
parent 5096 6742ce189373
child 5098 a958927b0232
child 5106 25fc1a2c3dc6
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	Tue Jan 28 20:12:04 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