mercurial/revset.py
changeset 20725 cf628b50afbb
parent 20724 e9a64b3f2925
child 20726 6eb9c4a9a12b
--- a/mercurial/revset.py	Tue Mar 11 17:03:43 2014 -0700
+++ b/mercurial/revset.py	Tue Mar 11 17:09:23 2014 -0700
@@ -2204,6 +2204,12 @@
         l = [r for r in x if r not in s]
         return baseset(list(self) + l)
 
+    def isascending(self):
+        return False
+
+    def isdescending(self):
+        return False
+
     def filter(self, l):
         return lazyset(self, l)
 
@@ -2270,6 +2276,12 @@
     def set(self):
         return set([r for r in self])
 
+    def isascending(self):
+        return False
+
+    def isdescending(self):
+        return False
+
     def filter(self, l):
         return lazyset(self, l)
 
@@ -2309,6 +2321,12 @@
                 self._subset.sort(reverse=reverse)
         self._ascending = not reverse
 
+    def isascending(self):
+        return self._ascending
+
+    def isdescending(self):
+        return not self._ascending
+
     def reverse(self):
         self._subset.reverse()
         self._ascending = not self._ascending
@@ -2621,6 +2639,12 @@
     def set(self):
         return self
 
+    def isascending(self):
+        return self._start < self._end
+
+    def isdescending(self):
+        return self._start > self._end
+
     def filter(self, l):
         if self._start <= self._end:
             return orderedlazyset(self, l)