revset: use `subset &` in `ancestorspec`
authorPierre-Yves David <pierre-yves.david@fb.com>
Wed, 17 Sep 2014 10:57:47 -0700
changeset 22531 22ba2c0825da
parent 22530 faf4f63533ff
child 22532 0cf46b8298fe
revset: use `subset &` in `ancestorspec` This takes advantage of the `fullreposet` smartness. revset #0: tip~25 0) wall 0.004800 comb 0.010000 user 0.010000 sys 0.000000 (best of 259) 1) wall 0.002475 comb 0.000000 user 0.000000 sys 0.000000 (best of 717)
mercurial/revset.py
--- a/mercurial/revset.py	Wed Sep 17 19:57:09 2014 -0700
+++ b/mercurial/revset.py	Wed Sep 17 10:57:47 2014 -0700
@@ -376,7 +376,7 @@
         for i in range(n):
             r = cl.parentrevs(r)[0]
         ps.add(r)
-    return subset.filter(ps.__contains__)
+    return subset & ps
 
 def author(repo, subset, x):
     """``author(string)``