Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
24401:e6e023d57e94 | 24402:c2287f203ec4 |
---|---|
329 if maxchainlen is not None: | 329 if maxchainlen is not None: |
330 self.svfs.options['maxchainlen'] = maxchainlen | 330 self.svfs.options['maxchainlen'] = maxchainlen |
331 manifestcachesize = self.ui.configint('format', 'manifestcachesize') | 331 manifestcachesize = self.ui.configint('format', 'manifestcachesize') |
332 if manifestcachesize is not None: | 332 if manifestcachesize is not None: |
333 self.svfs.options['manifestcachesize'] = manifestcachesize | 333 self.svfs.options['manifestcachesize'] = manifestcachesize |
334 usetreemanifest = self.ui.configbool('experimental', 'treemanifest') | |
335 if usetreemanifest is not None: | |
336 self.svfs.options['usetreemanifest'] = usetreemanifest | |
334 | 337 |
335 def _writerequirements(self): | 338 def _writerequirements(self): |
336 reqfile = self.vfs("requires", "w") | 339 reqfile = self.vfs("requires", "w") |
337 for r in sorted(self.requirements): | 340 for r in sorted(self.requirements): |
338 reqfile.write("%s\n" % r) | 341 reqfile.write("%s\n" % r) |