##// END OF EJS Templates
revset: optimize baseset.__sub__ (issue4313)...
Gregory Szorc -
r21939:f486001f stable
parent child Browse files
Show More
@@ -21,3 +21,4 b' public()'
21 draft()
21 draft()
22 :10000 and draft()
22 :10000 and draft()
23 max(::(tip~20) - obsolete())
23 max(::(tip~20) - obsolete())
24 roots((0:tip)::)
@@ -2232,6 +2232,13 b' class baseset(list):'
2232 """Returns a new object with the substraction of the two collections.
2232 """Returns a new object with the substraction of the two collections.
2233
2233
2234 This is part of the mandatory API for smartset."""
2234 This is part of the mandatory API for smartset."""
2235 # If we are operating on 2 baseset, do the computation now since all
2236 # data is available. The alternative is to involve a lazyset, which
2237 # may be slow.
2238 if isinstance(other, baseset):
2239 other = other.set()
2240 return baseset([x for x in self if x not in other])
2241
2235 return self.filter(lambda x: x not in other)
2242 return self.filter(lambda x: x not in other)
2236
2243
2237 def __and__(self, other):
2244 def __and__(self, other):
General Comments 0
You need to be logged in to leave comments. Login now