# HG changeset patch # User Ronny Pfannschmidt # Date 1288693552 -3600 # Node ID 0071c8fc2fa6ba20cc348c155d4c7ea2f2e47038 # Parent 5c3e5cd141ea5b515568a9b6987bc4a760e8488e localrepo: make heads use the keyword args of the sorted builtin diff -r 5c3e5cd141ea -r 0071c8fc2fa6 mercurial/localrepo.py --- 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