changeset 22530:faf4f63533ff

revset: use `subset &` in `bookmark` Speedup, Weeeeeee! revset #0: bookmark() 0) wall 0.002240 comb 0.000000 user 0.000000 sys 0.000000 (best of 571) 1) wall 0.000132 comb 0.000000 user 0.000000 sys 0.000000 (best of 14059)
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 17 Sep 2014 19:57:09 -0700
parents 5c53d7888aef
children 22ba2c0825da
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:59:40 2014 -0700
+++ b/mercurial/revset.py	Wed Sep 17 19:57:09 2014 -0700
@@ -468,7 +468,7 @@
         bms = set([repo[r].rev()
                    for r in repo._bookmarks.values()])
     bms -= set([node.nullrev])
-    return subset.filter(bms.__contains__)
+    return subset & bms
 
 def branch(repo, subset, x):
     """``branch(string or set)``