comparison mercurial/copies.py @ 45673:7990e7d957b0

copies: move `merged` testing sooner previously `is_merged` was an expensive callback. Now that all this data is pre-computed, this is is a simple membership testing. So it is probably cheaper than the membership testing. Differential Revision: https://phab.mercurial-scm.org/D9141
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 01 Oct 2020 09:45:00 +0200
parents f877b3628015
children ff7e0ca666e8
comparison
equal deleted inserted replaced
45672:f877b3628015 45673:7990e7d957b0
395 changes is not None 395 changes is not None
396 and other[1] is None 396 and other[1] is None
397 and dest in changes.salvaged 397 and dest in changes.salvaged
398 ): 398 ):
399 minor[dest] = value 399 minor[dest] = value
400 elif changes is not None and dest in changes.merged:
401 minor[dest] = value
400 elif not isancestor(new_tt, other_tt): 402 elif not isancestor(new_tt, other_tt):
401 minor[dest] = value
402 elif changes is not None and dest in changes.merged:
403 minor[dest] = value 403 minor[dest] = value
404 404
405 405
406 def _revinfo_getter_extra(repo): 406 def _revinfo_getter_extra(repo):
407 """return a function that return multiple data given a <rev>"i 407 """return a function that return multiple data given a <rev>"i