comparison mercurial/context.py @ 40045:ccf4d808ec4c

context: fast path linkrev adjustement in trivial case If the search starts from the linkrev, there is nothing to adjust.
author Boris Feld <boris.feld@octobus.net>
date Thu, 04 Oct 2018 08:34:59 +0200
parents 43d3b09b3e5a
children 6ed53b194124
comparison
equal deleted inserted replaced
40044:6509fcec830c 40045:ccf4d808ec4c
732 repo = self._repo 732 repo = self._repo
733 cl = repo.unfiltered().changelog 733 cl = repo.unfiltered().changelog
734 mfl = repo.manifestlog 734 mfl = repo.manifestlog
735 # fetch the linkrev 735 # fetch the linkrev
736 lkr = self.linkrev() 736 lkr = self.linkrev()
737 if srcrev == lkr:
738 return lkr
737 # hack to reuse ancestor computation when searching for renames 739 # hack to reuse ancestor computation when searching for renames
738 memberanc = getattr(self, '_ancestrycontext', None) 740 memberanc = getattr(self, '_ancestrycontext', None)
739 iteranc = None 741 iteranc = None
740 if srcrev is None: 742 if srcrev is None:
741 # wctx case, used by workingfilectx during mergecopy 743 # wctx case, used by workingfilectx during mergecopy