mercurial/revset.py
changeset 22719 21fda9dcd4e8
parent 22718 7b123e5639f4
child 22720 4388f99c5512
equal deleted inserted replaced
22718:7b123e5639f4 22719:21fda9dcd4e8
  2434             v = c[x] = x in self._subset and self._condition(x)
  2434             v = c[x] = x in self._subset and self._condition(x)
  2435             return v
  2435             return v
  2436         return c[x]
  2436         return c[x]
  2437 
  2437 
  2438     def __iter__(self):
  2438     def __iter__(self):
       
  2439         return self._iterfilter(self._subset)
       
  2440 
       
  2441     def _iterfilter(self, it):
  2439         cond = self._condition
  2442         cond = self._condition
  2440         for x in self._subset:
  2443         for x in it:
  2441             if cond(x):
  2444             if cond(x):
  2442                 yield x
  2445                 yield x
  2443 
  2446 
  2444     def __and__(self, x):
  2447     def __and__(self, x):
  2445         return lazyset(self, x.__contains__)
  2448         return lazyset(self, x.__contains__)