diff mercurial/context.py @ 6286:90a4329a6b4a

filectx.ancestor: use fctx._repopath to cache filelogs (issue1035) _repopath may be different from _path for workingfilectx when there are renames involved.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sun, 16 Mar 2008 06:10:47 -0300
parents c0c4c7b1e8d3
children fb502719c75c a7582980d654
line wrap: on
line diff
--- a/mercurial/context.py	Sat Mar 15 12:42:41 2008 -0700
+++ b/mercurial/context.py	Sun Mar 16 06:10:47 2008 -0300
@@ -190,6 +190,9 @@
         elif name == '_filerev':
             self._filerev = self._filelog.rev(self._filenode)
             return self._filerev
+        elif name == '_repopath':
+            self._repopath = self._path
+            return self._repopath
         else:
             raise AttributeError, name
 
@@ -404,7 +407,7 @@
                 pl = [(n.path(), n.filenode()) for n in c.parents()]
                 acache[(c._path, None)] = pl
 
-        flcache = {self._path:self._filelog, fc2._path:fc2._filelog}
+        flcache = {self._repopath:self._filelog, fc2._repopath:fc2._filelog}
         def parents(vertex):
             if vertex in acache:
                 return acache[vertex]