changeset 39320:57301ba47e66

manifest: use public API for obtaining storage object We should not be accessing private attributes on the manifestlog, since its behavior is governed by an interface. Differential Revision: https://phab.mercurial-scm.org/D4392
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 15 Aug 2018 19:53:02 +0000
parents 862d23bc5749
children 52860f52ed13
files mercurial/manifest.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/manifest.py	Mon Aug 27 08:58:25 2018 -0700
+++ b/mercurial/manifest.py	Wed Aug 15 19:53:02 2018 +0000
@@ -1317,7 +1317,7 @@
             self = manifestrevlogref()
             if repo is None or self is None:
                 return
-            if repo.manifestlog._revlog is not self:
+            if repo.manifestlog.getstorage(b'') is not self:
                 # there's a different manifest in play now, abort
                 return
             self._fulltextcache.write()
@@ -1583,7 +1583,7 @@
         self._manifestdict = manifestdict()
 
     def _storage(self):
-        return self._manifestlog._revlog
+        return self._manifestlog.getstorage(b'')
 
     def new(self):
         return memmanifestctx(self._manifestlog)
@@ -1619,7 +1619,7 @@
         #self.linkrev = store.linkrev(rev)
 
     def _storage(self):
-        return self._manifestlog._revlog
+        return self._manifestlog.getstorage(b'')
 
     def node(self):
         return self._node
@@ -1689,7 +1689,7 @@
         self._treemanifest = treemanifest()
 
     def _storage(self):
-        return self._manifestlog._revlog
+        return self._manifestlog.getstorage(b'')
 
     def new(self, dir=''):
         return memtreemanifestctx(self._manifestlog, dir=dir)