Mercurial > hg
changeset 20718:d7b7ec0459c6
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.
author | Lucas Moscovicz <lmoscovicz@fb.com> |
---|---|
date | Thu, 13 Mar 2014 17:16:58 -0700 |
parents | da3124178fbb |
children | cce8fbedc82a |
files | mercurial/revset.py |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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):