comparison mercurial/revset.py @ 22724:abdb46cf3b38

lazyset: remove min/max This is now handled by abstractsmartset.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 02 Oct 2014 19:03:14 -0500
parents d4706faa2061
children 88e5483bfb20
comparison
equal deleted inserted replaced
22723:d4706faa2061 22724:abdb46cf3b38
2416 """ 2416 """
2417 self._subset = subset 2417 self._subset = subset
2418 self._condition = condition 2418 self._condition = condition
2419 self._cache = {} 2419 self._cache = {}
2420 2420
2421 def min(self):
2422 return min(self)
2423
2424 def max(self):
2425 return max(self)
2426
2427 def __contains__(self, x): 2421 def __contains__(self, x):
2428 c = self._cache 2422 c = self._cache
2429 if x not in c: 2423 if x not in c:
2430 v = c[x] = x in self._subset and self._condition(x) 2424 v = c[x] = x in self._subset and self._condition(x)
2431 return v 2425 return v