D1070: config: graduate experimental.updatecheck to commands.update.check
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Sat Oct 14 16:49:00 EDT 2017
indygreg accepted this revision.
indygreg added a comment.
I'm not crazy about the code style. But since this code only lives for a release, I'm OK taking it. I'll accept this but will defer to someone else to queue it in case there are strong opinions about the style.
INLINE COMMENTS
> hg.py:761-766
> if updatecheck not in ('abort', 'none', 'linear', 'noconflict'):
> - # If not configured, or invalid value configured
> - updatecheck = 'linear'
> + # pre-4.4 compat on the old spelling of this config item
> + updatecheck = ui.config('experimental', 'updatecheck')
> + if updatecheck not in ('abort', 'none', 'linear', 'noconflict'):
> + # If not configured, or invalid value configured
> + updatecheck = 'linear'
How do you feel about this alternative approach?
updatecheck = ui.config('commands', 'update.check')
if updatecheck is None:
updatecheck = ui.config('experimental', 'updatecheck')
if updatecheck not in ('abort', ...):
updatecheck = 'linear'
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D1070
To: durin42, #hg-reviewers, lothiraldan, indygreg
Cc: indygreg, lothiraldan, morisgi, mercurial-devel
More information about the Mercurial-devel
mailing list