##// END OF EJS Templates
revset: use more explicit argument names for baseset methods...
Lucas Moscovicz -
r20726:6eb9c4a9 default
parent child Browse files
Show More
@@ -2187,21 +2187,21 b' class baseset(list):'
2187 self._set = set(self)
2187 self._set = set(self)
2188 return self._set
2188 return self._set
2189
2189
2190 def __sub__(self, x):
2190 def __sub__(self, other):
2191 if isinstance(x, baseset):
2191 if isinstance(other, baseset):
2192 s = x.set()
2192 s = other.set()
2193 else:
2193 else:
2194 s = set(x)
2194 s = set(other)
2195 return baseset(self.set() - s)
2195 return baseset(self.set() - s)
2196
2196
2197 def __and__(self, x):
2197 def __and__(self, other):
2198 if isinstance(x, baseset):
2199 x = x.set()
2200 return baseset([y for y in self if y in x])
2201
2198
2202 def __add__(self, x):
2199 if isinstance(other, baseset):
2200 other = other.set()
2201 return baseset([y for y in self if y in other])
2202 def __add__(self, other):
2203 s = self.set()
2203 s = self.set()
2204 l = [r for r in x if r not in s]
2204 l = [r for r in other if r not in s]
2205 return baseset(list(self) + l)
2205 return baseset(list(self) + l)
2206
2206
2207 def isascending(self):
2207 def isascending(self):
@@ -2210,8 +2210,8 b' class baseset(list):'
2210 def isdescending(self):
2210 def isdescending(self):
2211 return False
2211 return False
2212
2212
2213 def filter(self, l):
2213 def filter(self, condition):
2214 return lazyset(self, l)
2214 return lazyset(self, condition)
2215
2215
2216 class lazyset(object):
2216 class lazyset(object):
2217 """Duck type for baseset class which iterates lazily over the revisions in
2217 """Duck type for baseset class which iterates lazily over the revisions in
General Comments 0
You need to be logged in to leave comments. Login now