branchmap: remove redundant sort
authorMartijn Pieters <mj@octobus.net>
Fri, 31 Aug 2018 19:58:41 +0100
changeset 40312 5644f7c8982e
parent 40311 4aa04d009167
child 40313 ef0baff11aea
branchmap: remove redundant sort There is absoluty no benefit in sorting a list that's being merged into a set on the next line. The changelog.ancestors() call later on also doesn't benefit from a sorted sequence of revs. Differential Revision: https://phab.mercurial-scm.org/D5111
mercurial/branchmap.py
--- a/mercurial/branchmap.py	Thu Oct 11 03:15:04 2018 +0200
+++ b/mercurial/branchmap.py	Fri Aug 31 19:58:41 2018 +0100
@@ -296,7 +296,6 @@
             # This have been tested True on all internal usage of this function.
             # run it again in case of doubt
             # assert not (set(bheadrevs) & set(newheadrevs))
-            newheadrevs.sort()
             bheadset.update(newheadrevs)
 
             # This prunes out two kinds of heads - heads that are superseded by