mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
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.
This commit is contained in:
parent
c5a9f97171
commit
dd9f8534d9
@ -2519,6 +2519,12 @@ class _addset(object):
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user