mercurial/manifest.py
changeset 29959 483003c27938
parent 29941 1cc93a154723
child 29960 da75bc36202c
--- a/mercurial/manifest.py	Mon Sep 19 17:14:43 2016 -0400
+++ b/mercurial/manifest.py	Tue Sep 20 12:24:01 2016 -0700
@@ -957,6 +957,13 @@
     def __init__(self, opener, repo):
         self._repo = repo
 
+        usetreemanifest = False
+
+        opts = getattr(opener, 'options', None)
+        if opts is not None:
+            usetreemanifest = opts.get('treemanifest', usetreemanifest)
+        self._treeinmem = usetreemanifest
+
         # We'll separate this into it's own cache once oldmanifest is no longer
         # used
         self._mancache = repo.manifest._mancache
@@ -965,13 +972,6 @@
     def _revlog(self):
         return self._repo.manifest
 
-    @property
-    def _oldmanifest(self):
-        # _revlog is the same as _oldmanifest right now, but we eventually want
-        # to delete _oldmanifest while still allowing manifestlog to access the
-        # revlog specific apis.
-        return self._repo.manifest
-
     def __getitem__(self, node):
         """Retrieves the manifest instance for the given node. Throws a KeyError
         if not found.
@@ -984,7 +984,7 @@
                 isinstance(cachemf, treemanifestctx)):
                 return cachemf
 
-        if self._oldmanifest._treeinmem:
+        if self._treeinmem:
             m = treemanifestctx(self._revlog, '', node)
         else:
             m = manifestctx(self._revlog, node)