Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revset.py @ 23827:4982fade9733
revset: simplify fullreposet.__and__ to call sort() with boolean flag
Note that sort() takes a boolean flag, so other.sort(reverse) was wrong.
It just worked fine because there is a top-level function, reverse().
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 10 Jan 2015 21:36:42 +0900 |
parents | 02f4560b69b7 |
children | 9b1d3bac61a7 |
line wrap: on
line diff
--- a/mercurial/revset.py Tue Jan 13 15:08:55 2015 -0500 +++ b/mercurial/revset.py Sat Jan 10 21:36:42 2015 +0900 @@ -3102,10 +3102,7 @@ # object. other = baseset(other - self._hiddenrevs) - if self.isascending(): - other.sort() - else: - other.sort(reverse) + other.sort(reverse=self.isdescending()) return other # tell hggettext to extract docstrings from these functions: