D5800: config: introduce a new value for ui.relative-paths getting old behavior
yuja (Yuya Nishihara)
phabricator at mercurial-scm.org
Sat Feb 2 21:13:26 EST 2019
yuja added a comment.
Looks good, but I find it isn't easy to parse the meaning of
`getuipathfn(repo, forcevalue=True)`. Perhaps it can be spelled as
`forcerelative=True`.
> +def getuipathfn(repo, legacyvalue=False, forcevalue=None):
> + if forcevalue is not None:
> + relative = forcevalue
> + else:
> + config = repo.ui.config('ui', 'relative-paths')
> + if config == 'legacy':
> + relative = legacyvalue
> + else:
> + relative = stringutil.parsebool(config)
If we want to report an invalid boolean value, we still need to use
`ui.configbool()`.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5800
To: martinvonz, #hg-reviewers
Cc: yuja, mercurial-devel
More information about the Mercurial-devel
mailing list