Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHG7354fda50e8b: py3: handle keyword arguments correctly in obsolete.py
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
def makestore(ui, repo): | def makestore(ui, repo): | ||||
"""Create an obsstore instance from a repo.""" | """Create an obsstore instance from a repo.""" | ||||
# read default format for new obsstore. | # read default format for new obsstore. | ||||
# developer config: format.obsstore-version | # developer config: format.obsstore-version | ||||
defaultformat = ui.configint('format', 'obsstore-version') | defaultformat = ui.configint('format', 'obsstore-version') | ||||
# rely on obsstore class default when possible. | # rely on obsstore class default when possible. | ||||
kwargs = {} | kwargs = {} | ||||
if defaultformat is not None: | if defaultformat is not None: | ||||
kwargs['defaultformat'] = defaultformat | kwargs[r'defaultformat'] = defaultformat | ||||
readonly = not isenabled(repo, createmarkersopt) | readonly = not isenabled(repo, createmarkersopt) | ||||
store = obsstore(repo.svfs, readonly=readonly, **kwargs) | store = obsstore(repo.svfs, readonly=readonly, **kwargs) | ||||
if store and readonly: | if store and readonly: | ||||
ui.warn(_('obsolete feature not enabled but %i markers found!\n') | ui.warn(_('obsolete feature not enabled but %i markers found!\n') | ||||
% len(list(store))) | % len(list(store))) | ||||
return store | return store | ||||
def commonversion(versions): | def commonversion(versions): |