revset: fixed sorting issue with spanset
When a spanset was being sorted it didn't take into account it's current
state (ascending or descending) and it reversed itself everytime the reverse
parameter was True.
This is not yet used but it will be as soon as the sort revset is changed to
directly use the structures sort method.
--- a/mercurial/revset.py Thu Mar 13 17:20:03 2014 -0700
+++ b/mercurial/revset.py Thu Mar 13 17:16:58 2014 -0700
@@ -2530,8 +2530,7 @@
return l[x]
def sort(self, reverse=False):
- # Basic implementation to be changed in future patches.
- if reverse:
+ if bool(reverse) != (self._start > self._end):
self.reverse()
def reverse(self):