# HG changeset patch # User Lucas Moscovicz # Date 1391642648 28800 # Node ID 56ecc82fcd6717c4d928cad40afe6b791c36d554 # Parent a3ca1d032926bdd4824ae1135716112cb6b747f6 revset: added orderedlazyset class diff -r a3ca1d032926 -r 56ecc82fcd67 mercurial/revset.py --- a/mercurial/revset.py Thu Feb 27 23:17:37 2014 -0600 +++ b/mercurial/revset.py Wed Feb 05 15:24:08 2014 -0800 @@ -2210,6 +2210,14 @@ def set(self): return set([r for r in self]) +class orderedlazyset(lazyset): + """Subclass of lazyset which subset can be ordered either ascending or + descendingly + """ + def __init__(self, subset, condition, ascending=True): + super(orderedlazyset, self).__init__(subset, condition) + self._ascending = ascending + class generatorset(object): """Wrapper structure for generators that provides lazy membership and can be iterated more than once.