revset: use `subset &` in `filelog`
authorPierre-Yves David <pierre-yves.david@fb.com>
Wed, 17 Sep 2014 10:58:50 -0700
changeset 22534 6261b9c549a2
parent 22533 5b65429721d5
child 22535 44f471102f3a
revset: use `subset &` in `filelog` This takes advantage of the `fullreposet` smartness. revset #0: file(COPYING) 0) wall 3.179066 comb 3.180000 user 3.140000 sys 0.040000 (best of 3) 1) wall 2.723699 comb 2.730000 user 2.690000 sys 0.040000 (best of 4)
mercurial/revset.py
--- a/mercurial/revset.py	Wed Sep 17 10:58:39 2014 -0700
+++ b/mercurial/revset.py	Wed Sep 17 10:58:50 2014 -0700
@@ -811,7 +811,7 @@
                 for fr in fl:
                     s.add(fl.linkrev(fr))
 
-    return subset.filter(s.__contains__)
+    return subset & s
 
 def first(repo, subset, x):
     """``first(set, [n])``