D4739: revset: remove part of the commonancestors() comment
valentin.gatienbaron (Valentin Gatien-Baron)
phabricator at mercurial-scm.org
Tue Sep 25 21:19:12 UTC 2018
valentin.gatienbaron created this revision.
Herald added subscribers: mercurial-devel, mjpieters.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
The reason is that:
- it shows up in "hg help revset", but it doesn't look like documentation targeted at users
- it doesn't make sense to me: it doesn't say what happens with < 2 revisions, and is not quite right because my understanding is that this revset was created precisely because "::x and ::y" was not quite the same (when x and y don't evaluate to singletons).
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D4739
AFFECTED FILES
mercurial/revset.py
CHANGE DETAILS
diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -626,12 +626,6 @@
@predicate('commonancestors(set)', safe=True)
def commonancestors(repo, subset, x):
"""Returns all common ancestors of the set.
-
- This method is for calculating "::x and ::y" (i.e. all the ancestors that
- are common to both x and y) in an easy and optimized way. We can't quite
- use "::head()" because that revset returns "::x + ::y + ..." for each head
- in the repo (whereas we want "::x *and* ::y").
-
"""
startrevs = getset(repo, fullreposet(repo), x)
if not startrevs:
To: valentin.gatienbaron, #hg-reviewers
Cc: mjpieters, mercurial-devel
More information about the Mercurial-devel
mailing list