# HG changeset patch # User Valentin Gatien-Baron # Date 1537905921 14400 # Node ID cb5134f2318a1bade3e8a0aab550714c18eb9bb1 # Parent 572cd30eaffb94ac98270bd9750c5cccbcfcc5a3 revset: make commonancestors(x + x^) be ::(x^), not ::x Differential Revision: https://phab.mercurial-scm.org/D4738 diff -r 572cd30eaffb -r cb5134f2318a mercurial/revset.py --- a/mercurial/revset.py Tue Sep 25 15:27:41 2018 -0400 +++ b/mercurial/revset.py Tue Sep 25 16:05:21 2018 -0400 @@ -631,13 +631,11 @@ in the repo (whereas we want "::x *and* ::y"). """ - # only wants the heads of the set passed in - h = heads(repo, fullreposet(repo), x, anyorder) - if not h: + startrevs = getset(repo, fullreposet(repo), x, order=anyorder) + if not startrevs: return baseset() - for r in h: + for r in startrevs: subset &= dagop.revancestors(repo, baseset([r])) - return subset @predicate('contains(pattern)', weight=100) diff -r 572cd30eaffb -r cb5134f2318a tests/test-revset.t --- a/tests/test-revset.t Tue Sep 25 15:27:41 2018 -0400 +++ b/tests/test-revset.t Tue Sep 25 16:05:21 2018 -0400 @@ -1069,7 +1069,6 @@ 2 4 8 - 9 test ancestor variants of empty revision