Mercurial > hg
changeset 9750:f153af9580fe
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.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sat, 07 Nov 2009 14:07:45 -0600 |
parents | 1b1b33ae5a24 |
children | f8ca4035a949 |
files | mercurial/context.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Thu Nov 05 16:40:48 2009 -0500 +++ b/mercurial/context.py Sat Nov 07 14:07:45 2009 -0600 @@ -451,6 +451,10 @@ 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