# HG changeset patch # User Matt Mackall # Date 2009-11-07 20:07:45 # Node ID f153af9580fe547e74d2b805f9cc52763ce497e2 # Parent 1b1b33ae5a24467d3380a872b2ce3896f95e5f14 merge: first part of fix for issue1327 When there are no renames involved, we shortcut to the changeset ancestor. This resolves most cases. Note that Mercurial's rename philosophy elsewhere is that a file's name is signficant and rename data is only consulted when a file of the same name is absent. diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -451,6 +451,10 @@ class filectx(object): find the common ancestor file context, if any, of self, and fc2 """ + actx = self.changectx().ancestor(fc2.changectx()) + if self.path() in actx: + return actx[self.path()] + acache = {} # prime the ancestor cache for the working directory