revlog: access the nodemap through the index
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sat, 02 Nov 2019 15:25:31 +0100
changeset 43529 bf176127033a
parent 43528 90a0f631829e
child 43530 6e3e3e5446ba
revlog: access the nodemap through the index The `revlog.rev` method now access the nodemap through `self.index.nodemap`, instead of using the `_nodecache` attribute that we are trying to remove. This work is part of a refactoring to unify the revlog index and the nodemap. This unification prepare the use of a persistent nodemap. Differential Revision: https://phab.mercurial-scm.org/D7317
mercurial/revlog.py
--- a/mercurial/revlog.py	Sat Nov 02 15:21:28 2019 +0100
+++ b/mercurial/revlog.py	Sat Nov 02 15:25:31 2019 +0100
@@ -661,7 +661,7 @@
 
     def rev(self, node):
         try:
-            return self._nodecache[node]
+            return self.index.nodemap[node]
         except TypeError:
             raise
         except error.RevlogError: