Mercurial > hg
comparison mercurial/localrepo.py @ 25839:1f8287b41935
localrepo: mark format options
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 25 Jun 2015 17:50:27 -0500 |
parents | 22049b565d57 |
children | 25897d778738 |
comparison
equal
deleted
inserted
replaced
25838:31137258ae8b | 25839:1f8287b41935 |
---|---|
256 self.vfs.append( | 256 self.vfs.append( |
257 "00changelog.i", | 257 "00changelog.i", |
258 '\0\0\0\2' # represents revlogv2 | 258 '\0\0\0\2' # represents revlogv2 |
259 ' dummy changelog to prevent using the old repo layout' | 259 ' dummy changelog to prevent using the old repo layout' |
260 ) | 260 ) |
261 # experimental config: format.generaldelta | |
261 if self.ui.configbool('format', 'generaldelta', False): | 262 if self.ui.configbool('format', 'generaldelta', False): |
262 self.requirements.add("generaldelta") | 263 self.requirements.add("generaldelta") |
263 if self.ui.configbool('experimental', 'treemanifest', False): | 264 if self.ui.configbool('experimental', 'treemanifest', False): |
264 self.requirements.add("treemanifest") | 265 self.requirements.add("treemanifest") |
265 if self.ui.configbool('experimental', 'manifestv2', False): | 266 if self.ui.configbool('experimental', 'manifestv2', False): |
339 return caps | 340 return caps |
340 | 341 |
341 def _applyopenerreqs(self): | 342 def _applyopenerreqs(self): |
342 self.svfs.options = dict((r, 1) for r in self.requirements | 343 self.svfs.options = dict((r, 1) for r in self.requirements |
343 if r in self.openerreqs) | 344 if r in self.openerreqs) |
345 # experimental config: format.chunkcachesize | |
344 chunkcachesize = self.ui.configint('format', 'chunkcachesize') | 346 chunkcachesize = self.ui.configint('format', 'chunkcachesize') |
345 if chunkcachesize is not None: | 347 if chunkcachesize is not None: |
346 self.svfs.options['chunkcachesize'] = chunkcachesize | 348 self.svfs.options['chunkcachesize'] = chunkcachesize |
349 # experimental config: format.maxchainlen | |
347 maxchainlen = self.ui.configint('format', 'maxchainlen') | 350 maxchainlen = self.ui.configint('format', 'maxchainlen') |
348 if maxchainlen is not None: | 351 if maxchainlen is not None: |
349 self.svfs.options['maxchainlen'] = maxchainlen | 352 self.svfs.options['maxchainlen'] = maxchainlen |
353 # experimental config: format.manifestcachesize | |
350 manifestcachesize = self.ui.configint('format', 'manifestcachesize') | 354 manifestcachesize = self.ui.configint('format', 'manifestcachesize') |
351 if manifestcachesize is not None: | 355 if manifestcachesize is not None: |
352 self.svfs.options['manifestcachesize'] = manifestcachesize | 356 self.svfs.options['manifestcachesize'] = manifestcachesize |
353 | 357 |
354 def _writerequirements(self): | 358 def _writerequirements(self): |
430 return phases.phasecache(self, self._phasedefaults) | 434 return phases.phasecache(self, self._phasedefaults) |
431 | 435 |
432 @storecache('obsstore') | 436 @storecache('obsstore') |
433 def obsstore(self): | 437 def obsstore(self): |
434 # read default format for new obsstore. | 438 # read default format for new obsstore. |
439 # developer config: format.obsstore-version | |
435 defaultformat = self.ui.configint('format', 'obsstore-version', None) | 440 defaultformat = self.ui.configint('format', 'obsstore-version', None) |
436 # rely on obsstore class default when possible. | 441 # rely on obsstore class default when possible. |
437 kwargs = {} | 442 kwargs = {} |
438 if defaultformat is not None: | 443 if defaultformat is not None: |
439 kwargs['defaultformat'] = defaultformat | 444 kwargs['defaultformat'] = defaultformat |