# HG changeset patch # User Lucas Moscovicz # Date 2014-03-14 00:16:58 # Node ID d7b7ec0459c6f42ce3f1c24c42f83f2858b9e805 # Parent da3124178fbb2660470e1a73b2f55da92e7b004e 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. diff --git a/mercurial/revset.py b/mercurial/revset.py --- a/mercurial/revset.py +++ b/mercurial/revset.py @@ -2530,8 +2530,7 @@ class spanset(object): 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):