--- 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