Comments
Patch
@@ -2098,7 +2098,7 @@
the subset and contains a function which tests for membership in the
revset
"""
- def __init__(self, subset, condition):
+ def __init__(self, subset, condition=lambda x: True):
self._subset = subset
self._condition = condition
self._cache = {}
@@ -2122,8 +2122,14 @@
return lazyset(self, lambda r: r not in x)
def __add__(self, x):
- l = baseset([r for r in self])
- return l + baseset(x)
+ def iterates():
+ for r in self:
+ yield r
+ for r in x:
+ if r not in self:
+ yield r
+
+ return lazyset(generatorset(iterates()))
def __nonzero__(self):
for r in self: