[PATCH 5 of 8] configitems: register 'ui.interactive'
Yuya Nishihara
yuya at tcha.org
Fri Jun 23 15:26:20 UTC 2017
On Fri, 23 Jun 2017 17:05:17 +0200, Pierre-Yves David wrote:
> On 06/23/2017 05:03 PM, Yuya Nishihara wrote:
> > On Wed, 21 Jun 2017 10:55:06 +0200, Pierre-Yves David wrote:
> >> # HG changeset patch
> >> # User Pierre-Yves David <pierre-yves.david at octobus.net>
> >> # Date 1497695761 -7200
> >> # Sat Jun 17 12:36:01 2017 +0200
> >> # Node ID 26bc51ab6c2c49778e967807ec0b594fd7ac7d2e
> >> # Parent c718cdbf2b211faec1925a3728af5aedd7b9a69a
> >> # EXP-Topic config.register
> >> # Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
> >> # hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 26bc51ab6c2c
> >> 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.
> >>
> >> diff --git a/mercurial/configitems.py b/mercurial/configitems.py
> >> --- a/mercurial/configitems.py
> >> +++ b/mercurial/configitems.py
> >> @@ -36,6 +36,9 @@ def coreconfigitem(*args, **kwargs):
> >>
> >> # Registering actual config items
> >>
> >> +coreconfigitem('ui', 'interactive',
> >> + default=None,
> >> +)
> >> coreconfigitem('ui', 'quiet',
> >> default=False,
> >> )
> >> diff --git a/mercurial/ui.py b/mercurial/ui.py
> >> --- a/mercurial/ui.py
> >> +++ b/mercurial/ui.py
> >> @@ -1125,7 +1125,7 @@ class ui(object):
> >>
> >> This function refers to input only; for output, see `ui.formatted()'.
> >> '''
> >> - i = self.configbool("ui", "interactive", None)
> >> + i = self.configbool("ui", "interactive")
> >
> > v=None is ignored by configbool() so interactive operation would be disabled.
>
> This is a bit unclear to me. I understand something is broken but I'm
> not too sure what and how. Can you elaborate a bit?
This patch disables isatty() test. Per discussion on IRC, I've dropped
6bd12a49a715 from hg-committed. test-devel-warnings.t is also updated.
More information about the Mercurial-devel
mailing list