changeset 22535:44f471102f3a

revset: use `subset &` in `follow` This takes 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)
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 17 Sep 2014 10:59:16 -0700
parents 6261b9c549a2
children 8040a44aab1c
files mercurial/revset.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py	Wed Sep 17 10:58:50 2014 -0700
+++ b/mercurial/revset.py	Wed Sep 17 10:59:16 2014 -0700
@@ -834,7 +834,7 @@
     else:
         s = _revancestors(repo, baseset([c.rev()]), followfirst)
 
-    return subset.filter(s.__contains__)
+    return subset & s
 
 def follow(repo, subset, x):
     """``follow([file])``