Not sure why we're using an integer for a flag value here. I'm
pretty sure nothing relies on values being 1.
While we're here, convert to a dict literal.
hg-reviewers |
Not sure why we're using an integer for a flag value here. I'm
pretty sure nothing relies on values being 1.
While we're here, convert to a dict literal.
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/localrepo.py (4 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
Gregory Szorc | Sep 12 2018, 6:17 PM |
if self.ui.configbool('experimental', 'bundle2-advertise'): | if self.ui.configbool('experimental', 'bundle2-advertise'): | ||||
caps = set(caps) | caps = set(caps) | ||||
capsblob = bundle2.encodecaps(bundle2.getrepocaps(self, | capsblob = bundle2.encodecaps(bundle2.getrepocaps(self, | ||||
role='client')) | role='client')) | ||||
caps.add('bundle2=' + urlreq.quote(capsblob)) | caps.add('bundle2=' + urlreq.quote(capsblob)) | ||||
return caps | return caps | ||||
def _applyopenerreqs(self): | def _applyopenerreqs(self): | ||||
self.svfs.options = dict((r, 1) for r in self.requirements | self.svfs.options = {r: True for r in self.requirements | ||||
if r in self.openerreqs) | if r in self.openerreqs} | ||||
# experimental config: format.chunkcachesize | # experimental config: format.chunkcachesize | ||||
chunkcachesize = self.ui.configint('format', 'chunkcachesize') | chunkcachesize = self.ui.configint('format', 'chunkcachesize') | ||||
if chunkcachesize is not None: | if chunkcachesize is not None: | ||||
self.svfs.options['chunkcachesize'] = chunkcachesize | self.svfs.options['chunkcachesize'] = chunkcachesize | ||||
# experimental config: format.manifestcachesize | # experimental config: format.manifestcachesize | ||||
manifestcachesize = self.ui.configint('format', 'manifestcachesize') | manifestcachesize = self.ui.configint('format', 'manifestcachesize') | ||||
if manifestcachesize is not None: | if manifestcachesize is not None: | ||||
self.svfs.options['manifestcachesize'] = manifestcachesize | self.svfs.options['manifestcachesize'] = manifestcachesize |