Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 24526:cd50f3717639
manifestv2: add (unused) config option
With tree manifests, hashes will change anyway, so now is a good time
to also take up the old plans of a new manifest format. While there
should be little or no reason to use tree manifests with the current
manifest format (v1) once the new format (v2) is supported, we'll try
to keep the two dimensions (flat/tree and v1/v2) separate.
In preparation for adding a the new format, let's add configuration
for it and propagate that configuration to the manifest revlog
subclass. The new configuration ("experimental.manifestv2") says in
what format to write the manifest data. We may later add other
configuration to choose how to hash it, either keeping the v1 hash for
BC or hashing the v2 content.
See http://mercurial.selenic.com/wiki/ManifestV2Plan for more details.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 27 Mar 2015 16:19:44 -0700 |
parents | 76b0b0fed2e3 |
children | 919f8ce040be |
comparison
equal
deleted
inserted
replaced
24525:e118f74d246f | 24526:cd50f3717639 |
---|---|
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') | 334 usetreemanifest = self.ui.configbool('experimental', 'treemanifest') |
335 if usetreemanifest is not None: | 335 if usetreemanifest is not None: |
336 self.svfs.options['usetreemanifest'] = usetreemanifest | 336 self.svfs.options['usetreemanifest'] = usetreemanifest |
337 usemanifestv2 = self.ui.configbool('experimental', 'manifestv2') | |
338 if usemanifestv2 is not None: | |
339 self.svfs.options['usemanifestv2'] = usemanifestv2 | |
337 | 340 |
338 def _writerequirements(self): | 341 def _writerequirements(self): |
339 reqfile = self.vfs("requires", "w") | 342 reqfile = self.vfs("requires", "w") |
340 for r in sorted(self.requirements): | 343 for r in sorted(self.requirements): |
341 reqfile.write("%s\n" % r) | 344 reqfile.write("%s\n" % r) |