mercurial/context.py
branchstable
changeset 23983 ff070a53ee74
parent 23981 24b57c3899f8
child 23984 2896f53509a7
--- 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)