Comments
Patch
@@ -629,16 +629,21 @@ class basefilectx(object):
@propertycache
def _changeid(self):
+ return self._findchangerev()
+
+ def _findchangerev(self):
if r'_changeid' in self.__dict__:
- return self._changeid
+ changeid = self._changeid
elif r'_changectx' in self.__dict__:
- return self._changectx.rev()
+ changeid = self._changectx.rev()
elif r'_descendantrev' in self.__dict__:
# this file context was created from a revision with a known
# descendant, we can (lazily) correct for linkrev aliases
- return self._adjustlinkrev(self._descendantrev)
+ changeid = self._adjustlinkrev(self._descendantrev)
else:
- return self._filelog.linkrev(self._filerev)
+ changeid = self._filelog.linkrev(self._filerev)
+ self._changeid = changeid
+ return changeid
@propertycache
def _filenode(self):
@@ -870,7 +875,7 @@ class basefilectx(object):
else:
return self._adjustlinkrev(lazyrev, inclusive=True)
else:
- return self.rev()
+ return self._findchangerev()
def introfilectx(self):
"""Return filectx having identical contents, but pointing to the