changeset 22833:6f4109aa6877

fullreposet: use `sort` to enforce the order The `ascending` and `descending` methods are useless.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 07 Oct 2014 01:41:26 -0700
parents 2f1d2a42f040
children 9e316ea0bf52
files mercurial/revset.py
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py	Tue Oct 07 01:48:34 2014 -0700
+++ b/mercurial/revset.py	Tue Oct 07 01:41:26 2014 -0700
@@ -3020,14 +3020,10 @@
             # we fallback to the old way (sad kitten)
             return super(fullreposet, self).__and__(other)
 
-        # preserve order:
-        #
-        # this is probably useless and harmful in multiple cases but matches
-        # the current behavior.
         if self.isascending():
-            other.ascending()
+            other.sort()
         else:
-            other.descending()
+            other.sort(reverse)
         return other
 
 # tell hggettext to extract docstrings from these functions: