D4738: revset: make commonancestors(x + x^) be ::(x^), not ::x

valentin.gatienbaron (Valentin Gatien-Baron) phabricator at mercurial-scm.org
Wed Sep 26 07:35:04 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGcb5134f2318a: revset: make commonancestors(x + x^) be ::(x^), not ::x (authored by valentin.gatienbaron, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D4738?vs=11355&id=11364#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4738?vs=11355&id=11364

REVISION DETAIL
  https://phab.mercurial-scm.org/D4738

AFFECTED FILES
  mercurial/revset.py
  tests/test-revset.t

CHANGE DETAILS

diff --git a/tests/test-revset.t b/tests/test-revset.t
--- a/tests/test-revset.t
+++ b/tests/test-revset.t
@@ -1069,7 +1069,6 @@
   2
   4
   8
-  9
 
 test ancestor variants of empty revision
 
diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -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)



To: valentin.gatienbaron, #hg-reviewers
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list