comparison mercurial/branchmap.py @ 40312:5644f7c8982e

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
author Martijn Pieters <mj@octobus.net>
date Fri, 31 Aug 2018 19:58:41 +0100
parents d99a588d8515
children 47c03042cd1d
comparison
equal deleted inserted replaced
40311:4aa04d009167 40312:5644f7c8982e
294 bheadset = set(cl.rev(node) for node in bheads) 294 bheadset = set(cl.rev(node) for node in bheads)
295 295
296 # This have been tested True on all internal usage of this function. 296 # This have been tested True on all internal usage of this function.
297 # run it again in case of doubt 297 # run it again in case of doubt
298 # assert not (set(bheadrevs) & set(newheadrevs)) 298 # assert not (set(bheadrevs) & set(newheadrevs))
299 newheadrevs.sort()
300 bheadset.update(newheadrevs) 299 bheadset.update(newheadrevs)
301 300
302 # This prunes out two kinds of heads - heads that are superseded by 301 # This prunes out two kinds of heads - heads that are superseded by
303 # a head in newheadrevs, and newheadrevs that are not heads because 302 # a head in newheadrevs, and newheadrevs that are not heads because
304 # an existing head is their descendant. 303 # an existing head is their descendant.