[PATCH 07 of 11] revset: use `subset &` in `follow`
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Tue Sep 23 17:47:53 CDT 2014
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1410976756 25200
# Wed Sep 17 10:59:16 2014 -0700
# Node ID 248f0c8c29fd8c341845c187cb19fcfceeef5e3d
# Parent b490e3c27abff630d7c5b6a69ae09d65394a4873
revset: use `subset &` in `follow`
This take advantage of the `fullreposet` smartness.
revset #0: follow(COPYING)
0) wall 0.002446 comb 0.000000 user 0.000000 sys 0.000000 (best of 735)
1) wall 0.000331 comb 0.000000 user 0.000000 sys 0.000000 (best of 5672)
diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -832,11 +832,11 @@ def _follow(repo, subset, x, name, follo
else:
return baseset([])
else:
s = _revancestors(repo, baseset([c.rev()]), followfirst)
- return subset.filter(s.__contains__)
+ return subset & s
def follow(repo, subset, x):
"""``follow([file])``
An alias for ``::.`` (ancestors of the working copy's first parent).
If a filename is specified, the history of the given file is followed,
More information about the Mercurial-devel
mailing list