diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -443,6 +443,10 @@ class basefilectx(object): def _filerev(self): return self._filelog.rev(self._filenode) + @propertycache + def _repopath(self): + return self._path + class filectx(basefilectx): """A filecontext object makes access to data related to a particular filerevision convenient.""" @@ -492,10 +496,6 @@ class filectx(basefilectx): # considered when solving linkrev issue are on the table. return changectx(self._repo.unfiltered(), self._changeid) - @propertycache - def _repopath(self): - return self._path - def __nonzero__(self): try: self._filenode