revset: use `subset &` in `outgoing`
authorPierre-Yves David <pierre-yves.david@fb.com>
Wed, 17 Sep 2014 10:59:40 -0700
changeset 22529 5c53d7888aef
parent 22528 b6dc3b79bb25
child 22530 faf4f63533ff
revset: use `subset &` in `outgoing` This should give us the same benefit as elsewhere. Result is simpler (and "faster"). Outgoing is dominated by the discovery so no benchmark is provided.
mercurial/revset.py
--- a/mercurial/revset.py	Wed Apr 30 16:56:48 2014 -0700
+++ b/mercurial/revset.py	Wed Sep 17 10:59:40 2014 -0700
@@ -1190,7 +1190,7 @@
     repo.ui.popbuffer()
     cl = repo.changelog
     o = set([cl.rev(r) for r in outgoing.missing])
-    return subset.filter(o.__contains__)
+    return subset & o
 
 def p1(repo, subset, x):
     """``p1([set])``