Mercurial > hg-stable
changeset 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 | b2358bc1407c |
children | 8b79fdaa9f85 |
files | mercurial/revset.py |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
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: