Mercurial > hg
changeset 20733:adf4ec7e6f60
revset: added isascending and isdescending methods to _addset
This methods are intended to duck-type baseset, so we will still have _addset
as a private class but now we can return it without wrapping it into an
orderedlazyset or a lazyset.
These were the last methods to add for smartset compatibility.
author | Lucas Moscovicz <lmoscovicz@fb.com> |
---|---|
date | Fri, 14 Mar 2014 10:24:09 -0700 |
parents | 728438da3090 |
children | 4d27c30d58d5 |
files | mercurial/revset.py |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revset.py Fri Mar 14 10:23:54 2014 -0700 +++ b/mercurial/revset.py Fri Mar 14 10:24:09 2014 -0700 @@ -2519,6 +2519,12 @@ if bool(self._ascending) == bool(reverse): self.reverse() + def isascending(self): + return self._ascending is not None and self._ascending + + def isdescending(self): + return self._ascending is not None and not self._ascending + def reverse(self): self._list.reverse() if self._ascending is not None: