manifest: make cachesize a private attribute
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 30 Jun 2018 16:06:05 -0700
changeset 38510 561a450c7b64
parent 38509 5cfb01d5ff26
child 38511 879cbdde63df
manifest: make cachesize a private attribute AFAICT this isn't accessed outside the class. It is a private attribute and its naming should reflect that. Differential Revision: https://phab.mercurial-scm.org/D3868
mercurial/manifest.py
--- a/mercurial/manifest.py	Sat Jun 30 15:51:04 2018 -0700
+++ b/mercurial/manifest.py	Sat Jun 30 16:06:05 2018 -0700
@@ -1287,7 +1287,7 @@
         self._dirmancache = {}
         self._dirmancache[''] = util.lrucachedict(cachesize)
 
-        self.cachesize = cachesize
+        self._cachesize = cachesize
 
     def __getitem__(self, node):
         """Retrieves the manifest instance for the given node. Throws a
@@ -1333,7 +1333,7 @@
         if node != revlog.nullid:
             mancache = self._dirmancache.get(dir)
             if not mancache:
-                mancache = util.lrucachedict(self.cachesize)
+                mancache = util.lrucachedict(self._cachesize)
                 self._dirmancache[dir] = mancache
             mancache[node] = m
         return m