filectx: if we have a _descendantrev, use it to adjust linkrev
This lets us use _adjustlinkrev lazily.
--- a/mercurial/context.py Sun Feb 01 16:25:12 2015 -0600
+++ b/mercurial/context.py Sun Feb 01 16:26:35 2015 -0600
@@ -633,6 +633,11 @@
return self._changeid
elif '_changectx' in self.__dict__:
return self._changectx.rev()
+ elif '_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._path, self._filelog,
+ self._filenode, self._descendantrev)
else:
return self._filelog.linkrev(self._filerev)