D6709: config: add --registered flag to show all known configs

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Wed Aug 7 10:16:29 EDT 2019


pulkit added inline comments.

INLINE COMMENTS

> ui.py:821
>  
> +    def walkallconfig(self, untrusted=False):
> +        """walk through all known config options in the registrar"""

Since, we renamed the flag which was good idea, let's rename the function too.

Also, this should better return `section, name, value, default_value`.

> navaneeth.suresh wrote in test-config.t:238
> I have ignored the cases with `dynamicdefault`. But, there are three cases showing a `devel-warn: accessing unregistered config item` message. Couldn't figure out why it is coming.

Just for record, @av6 comment here is not done as there are still devel-warnings.

> test-config.t:228
> +
> +  $ hg showconfig --registered
> +  annotate.git=False

In cases when the default value and the value of config set are different, let's do something like `<current-output> (default=<default_value>)`

> test-config.t:827
> +  fsmonitor.warn_when_unused=True
> +  devel-warn: accessing unregistered config item: 'help.hidden-command\..*' at: /tmp/hgtests.7aNapb/install/lib/python/mercurial/commands.py:1876 (config)
> +  help.hidden-command\..*=<object object at 0x7fb14b00e0e0>

Can you look as why these devel-warning are coming up?

Since we are using `--registered`, having warnings related to unregistered config does not seems good.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6709/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6709

To: navaneeth.suresh, #hg-reviewers, av6
Cc: pulkit, marmoute, av6, mjpieters, mercurial-devel


More information about the Mercurial-devel mailing list