revset: use `subset &` in `bisect`
authorPierre-Yves David <pierre-yves.david@fb.com>
Wed, 17 Sep 2014 10:57:57 -0700
changeset 22532 0cf46b8298fe
parent 22531 22ba2c0825da
child 22533 5b65429721d5
revset: use `subset &` in `bisect` This takes advantage of the `fullreposet` smartness. revset #0: bisect(range) 0) wall 0.014007 comb 0.010000 user 0.010000 sys 0.000000 (best of 115) 1) wall 0.005556 comb 0.010000 user 0.010000 sys 0.000000 (best of 235)
mercurial/revset.py
--- a/mercurial/revset.py	Wed Sep 17 10:57:47 2014 -0700
+++ b/mercurial/revset.py	Wed Sep 17 10:57:57 2014 -0700
@@ -426,7 +426,7 @@
     # i18n: "bisect" is a keyword
     status = getstring(x, _("bisect requires a string")).lower()
     state = set(hbisect.get(repo, status))
-    return subset.filter(state.__contains__)
+    return subset & state
 
 # Backward-compatibility
 # - no help entry so that we do not advertise it any more