# HG changeset patch # User Martin von Zweigbergk # Date 2019-12-12 06:23:42 # Node ID 6b6872822b32a76c66b0e95f5e5880be785558ac # Parent 86fe85364811ea3b233639dc3525c485d9ffe532 config: drop debug messages saying where config was read from `hg config --debug` includes lines like this: set config by: $EDITOR but also lines like this: $EDITOR: ui.editor=emacs -nw The `set config by` messages don't seem to provide much additional information over what we get from the `$EDITOR:`-type message. I could imagine wanting to see which values got overriden by a later entry, but that information is already not present. So let's just remove the first type of output. My next patch would otherwise amplify the redundant output (there would be one `set config by` for each line in `mergetools.rc`). Differential Revision: https://phab.mercurial-scm.org/D7627 diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2224,8 +2224,8 @@ def config(ui, repo, *values, **opts): if t == b'path': ui.debug(b'read config from: %s\n' % f) elif t == b'items': - for section, name, value, source in f: - ui.debug(b'set config by: %s\n' % source) + # Don't print anything for 'items'. + pass else: raise error.ProgrammingError(b'unknown rctype: %s' % t) untrusted = bool(opts.get(b'untrusted')) diff --git a/tests/test-hgrc.t b/tests/test-hgrc.t --- a/tests/test-hgrc.t +++ b/tests/test-hgrc.t @@ -197,9 +197,6 @@ plain hgrc with environment variables $ PAGER=p1 EDITOR=e1 VISUAL=e2 hg showconfig --debug - set config by: $EDITOR - set config by: $VISUAL - set config by: $PAGER read config from: $TESTTMP/hgrc repo: bundle.mainreporoot=$TESTTMP $PAGER: pager.pager=p1