# HG changeset patch # User Pierre-Yves David # Date 2015-03-20 06:52:26 # Node ID 86de531e07e1468645560f7386e048989bfd9d6d # Parent dd01834a696f5e141933f80640ae0eea148ff42c adjustlinkrev: prepare source revs for ancestry only once We'll need some more complex initialisation to handle workingfilectx case. We do this small change in a different patch for clarity. diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -774,13 +774,13 @@ class basefilectx(object): # hack to reuse ancestor computation when searching for renames memberanc = getattr(self, '_ancestrycontext', None) iteranc = None + revs = [srcrev] if memberanc is None: - memberanc = iteranc = cl.ancestors([srcrev], lkr, - inclusive=inclusive) + memberanc = iteranc = cl.ancestors(revs, lkr, inclusive=inclusive) # check if this linkrev is an ancestor of srcrev if lkr not in memberanc: if iteranc is None: - iteranc = cl.ancestors([srcrev], lkr, inclusive=inclusive) + iteranc = cl.ancestors(revs, lkr, inclusive=inclusive) for a in iteranc: ac = cl.read(a) # get changeset data (we avoid object creation) if path in ac[3]: # checking the 'files' field.