revset-branch: remove usage of `set()`
authorPierre-Yves David <pierre-yves.david@fb.com>
Wed, 08 Oct 2014 02:47:00 -0700
changeset 22867 5ee9b78ce805
parent 22866 6e739356f9bf
child 22868 88ad04bcdc74
revset-branch: remove usage of `set()` All smartset classes have fast lookup, so this function will be removed soon.
mercurial/revset.py
--- a/mercurial/revset.py	Wed Oct 08 02:45:53 2014 -0700
+++ b/mercurial/revset.py	Wed Oct 08 02:47:00 2014 -0700
@@ -497,8 +497,8 @@
     b = set()
     for r in s:
         b.add(repo[r].branch())
-    s = s.set()
-    return subset.filter(lambda r: r in s or repo[r].branch() in b)
+    c = s.__contains__
+    return subset.filter(lambda r: c(r) or repo[r].branch() in b)
 
 def bumped(repo, subset, x):
     """``bumped()``