Mercurial > hg > mercurial-source
changeset 33844:c41cbe98822c
configitems: register 'ui.interactive'
That item default value is a bit special (None) so this adds a second proof
that everything is still working fine.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 23 Jun 2017 17:19:29 +0200 |
parents | e70cbae4c4e6 |
children | e21b750c9b9e |
files | mercurial/configitems.py mercurial/ui.py tests/test-devel-warnings.t |
diffstat | 3 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -42,6 +42,9 @@ coreconfigitem('ui', 'clonebundleprefers', default=[], ) +coreconfigitem('ui', 'interactive', + default=None, +) coreconfigitem('ui', 'quiet', default=False, )
--- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -1139,7 +1139,7 @@ This function refers to input only; for output, see `ui.formatted()'. ''' - i = self.configbool("ui", "interactive", None) + i = self.configbool("ui", "interactive") if i is None: # some environments replace stdin without implementing isatty # usually those are non-interactive
--- a/tests/test-devel-warnings.t +++ b/tests/test-devel-warnings.t @@ -211,5 +211,6 @@ $ hg --config "extensions.buggyconfig=${TESTTMP}/buggyconfig.py" buggyconfig devel-warn: specifying a default value for a registered config item: 'ui.quiet' 'False' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob) + devel-warn: specifying a default value for a registered config item: 'ui.interactive' 'None' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob) $ cd ..