revset: add tests of heads(commonancestors(..))
The second-to-last one shows the same bug as commonancestors(..): the
result should be 8, not 9.
Differential Revision: https://phab.mercurial-scm.org/D4741
--- a/tests/test-revset.t Tue Sep 25 16:18:43 2018 -0400
+++ b/tests/test-revset.t Tue Sep 25 16:29:39 2018 -0400
@@ -1070,11 +1070,24 @@
4
8
+test the specialized implementation of heads(commonancestors(..))
+(2 gcas is tested in test-merge-criss-cross.t)
+
+ $ hg log -T '{rev}\n' -r 'heads(commonancestors(7 + 9))'
+ 4
+ $ hg log -T '{rev}\n' -r 'heads(commonancestors(heads(all())))'
+ 4
+ $ hg log -T '{rev}\n' -r 'heads(commonancestors(9))'
+ 9
+ $ hg log -T '{rev}\n' -r 'heads(commonancestors(8 + 9))'
+ 9
+
test ancestor variants of empty revision
$ log 'ancestor(none())'
$ log 'ancestors(none())'
$ log 'commonancestors(none())'
+ $ log 'heads(commonancestors(none()))'
test ancestors with depth limit