# HG changeset patch # User Boris Feld # Date 2018-10-04 06:34:59 # Node ID ccf4d808ec4c4a10349fc768d1ad2849069a2abf # Parent 6509fcec830cc3c0c087cfa274f76d85507808b8 context: fast path linkrev adjustement in trivial case If the search starts from the linkrev, there is nothing to adjust. diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -734,6 +734,8 @@ class basefilectx(object): mfl = repo.manifestlog # fetch the linkrev lkr = self.linkrev() + if srcrev == lkr: + return lkr # hack to reuse ancestor computation when searching for renames memberanc = getattr(self, '_ancestrycontext', None) iteranc = None