# HG changeset patch # User Stanislau Hlebik <st...@fb.com> # Date 1486981916 28800 # Mon Feb 13 02:31:56 2017 -0800 # Node ID 30fd6051a7e441aac16b5ba7b4a19aa3731576f0 # Parent 8bc5ae6cf51408dbd1b789555196f031bfef19d4 localrepo: avoid unnecessary sorting
headrevs output already sorted, no need to sort it again. diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -1854,7 +1854,7 @@ def heads(self, start=None): if start is None: cl = self.changelog - headrevs = sorted(cl.headrevs(), reverse=True) + headrevs = reversed(cl.headrevs()) return [cl.node(rev) for rev in headrevs] heads = self.changelog.heads(start) _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel