diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -2397,6 +2397,22 @@ class _addset(object): return orderedlazyset(self, condition, ascending=self._ascending) return lazyset(self, condition) + def ascending(self): + if self._ascending is None: + self.sort() + self._ascending = True + else: + if not self._ascending: + self.reverse() + + def descending(self): + if self._ascending is None: + self.sort(reverse=True) + self._ascending = False + else: + if self._ascending: + self.reverse() + def _iterator(self): """Iterate over both collections without repeating elements