Mercurial > hg-stable
comparison mercurial/revset.py @ 20751:91a3d50f0e3a
revset: changed orderedlazyset to also extend _orderedsetmixin
Now orderedlazyset can use the lazy min and max implementation.
author | Lucas Moscovicz <lmoscovicz@fb.com> |
---|---|
date | Thu, 13 Mar 2014 11:36:45 -0700 |
parents | d4f2f2d74210 |
children | 6744f4621434 |
comparison
equal
deleted
inserted
replaced
20750:d4f2f2d74210 | 20751:91a3d50f0e3a |
---|---|
2365 return False | 2365 return False |
2366 | 2366 |
2367 def filter(self, l): | 2367 def filter(self, l): |
2368 return lazyset(self, l) | 2368 return lazyset(self, l) |
2369 | 2369 |
2370 class orderedlazyset(lazyset): | 2370 class orderedlazyset(_orderedsetmixin, lazyset): |
2371 """Subclass of lazyset which subset can be ordered either ascending or | 2371 """Subclass of lazyset which subset can be ordered either ascending or |
2372 descendingly | 2372 descendingly |
2373 """ | 2373 """ |
2374 def __init__(self, subset, condition, ascending=True): | 2374 def __init__(self, subset, condition, ascending=True): |
2375 super(orderedlazyset, self).__init__(subset, condition) | 2375 super(orderedlazyset, self).__init__(subset, condition) |