changeset 20723:fb9852c46a42

revset: added reverse method to addset This method is needed to duck type generatorset.
author Lucas Moscovicz <lmoscovicz@fb.com>
date Thu, 13 Mar 2014 18:57:30 -0700
parents 6894223ebc38
children e9a64b3f2925
files mercurial/revset.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py	Thu Mar 13 13:29:04 2014 -0700
+++ b/mercurial/revset.py	Thu Mar 13 18:57:30 2014 -0700
@@ -2409,6 +2409,11 @@
     def set(self):
         return self
 
+    def reverse(self):
+        self._list.reverse()
+        if self._ascending is not None:
+            self._ascending = not self._ascending
+
 class _generatorset(object):
     """Wrap a generator for lazy iteration