diff mercurial/localrepo.py @ 24402:c2287f203ec4

treemanifest: add configuration for using treemanifest type This change adds boolean configuration option experimental.treemanifest. When the option is enabled, manifests are parsed into the new treemanifest type. Tests can be now run using treemanifest by switching the config option default in localrepo._applyrequirements(). Tests pass even when made to randomly choose between manifestdict and treemanifest, suggesting that the two types produce identical manifests (so e.g. a manifest revlog entry written from a treemanifest can be parsed by the manifestdict code).
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 19 Mar 2015 11:07:57 -0700
parents 03163826b4e6
children f247fbfe07f3
line wrap: on
line diff
--- a/mercurial/localrepo.py	Thu Mar 19 11:08:42 2015 -0700
+++ b/mercurial/localrepo.py	Thu Mar 19 11:07:57 2015 -0700
@@ -331,6 +331,9 @@
         manifestcachesize = self.ui.configint('format', 'manifestcachesize')
         if manifestcachesize is not None:
             self.svfs.options['manifestcachesize'] = manifestcachesize
+        usetreemanifest = self.ui.configbool('experimental', 'treemanifest')
+        if usetreemanifest is not None:
+            self.svfs.options['usetreemanifest'] = usetreemanifest
 
     def _writerequirements(self):
         reqfile = self.vfs("requires", "w")