Mercurial > hg
changeset 12919:0071c8fc2fa6
localrepo: make heads use the keyword args of the sorted builtin
author | Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de> |
---|---|
date | Tue, 02 Nov 2010 11:25:52 +0100 |
parents | 5c3e5cd141ea |
children | 1fab4970354e |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu Nov 04 11:33:57 2010 -0500 +++ b/mercurial/localrepo.py Tue Nov 02 11:25:52 2010 +0100 @@ -1202,8 +1202,7 @@ def heads(self, start=None): heads = self.changelog.heads(start) # sort the output in rev descending order - heads = [(-self.changelog.rev(h), h) for h in heads] - return [n for (r, n) in sorted(heads)] + return sorted(heads, key=self.changelog.rev, reverse=True) def branchheads(self, branch=None, start=None, closed=False): '''return a (possibly filtered) list of heads for the given branch