revset: drop isinstance(baseset) in spanset.__sub__
authorPierre-Yves David <pierre-yves.david@fb.com>
Wed, 01 Oct 2014 15:50:54 -0500
changeset 22690 d7ab5684711f
parent 22689 372f507f6676
child 22691 d8a08b68f754
revset: drop isinstance(baseset) in spanset.__sub__ As baseset now has a fast __contains___ operator, this `baseset.set()` dance is no longer needed. No regressions are visible in the benchmark.
mercurial/revset.py
--- a/mercurial/revset.py	Wed Oct 01 15:50:40 2014 -0500
+++ b/mercurial/revset.py	Wed Oct 01 15:50:54 2014 -0500
@@ -2817,8 +2817,6 @@
                               ascending=self.isascending())
 
     def __sub__(self, x):
-        if isinstance(x, baseset):
-            x = x.set()
         filterfunc = x.__contains__
         return orderedlazyset(self, lambda r: not filterfunc(r),
                               ascending=self.isascending())