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

login
register
mail settings
Submitter phabricator
Date Aug. 2, 2019, 9:50 a.m.
Message ID <differential-rev-PHID-DREV-llqrll3jcvmoen45sayw-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/41127/
State New
Headers show

Comments

phabricator - Aug. 2, 2019, 9:50 a.m.
navaneeth.suresh created this revision.
Herald added subscribers: mercurial-devel, mjpieters.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This patch fixes one of the issues in issue6014. This adds an `--all`
  flag to `hg showconfig` to show all known config options.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-config.t

CHANGE DETAILS




To: navaneeth.suresh, #hg-reviewers
Cc: mjpieters, mercurial-devel
phabricator - Aug. 2, 2019, 12:45 p.m.
This revision now requires changes to proceed.
av6 added inline comments.
av6 requested changes to this revision.

INLINE COMMENTS

> commands.py:1774
>  @command('config|showconfig|debugconfig',
> -    [('u', 'untrusted', None, _('show untrusted configuration options')),
> +    [('a', 'all', None, _('show all known configuration options')),
> +     ('u', 'untrusted', None, _('show untrusted configuration options')),

This needs a better description to differentiate this flag and the default mode (see line 1786).

> test-config.t:238
> +  progress.format=['topic', 'bar', 'number', 'estimate']
> +  devel-warn: config item requires an explicit default value: 'progress.width' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  progress.width=None

Certainly a good way to find all config options without default values, but in the final implementation of `showconfig -a` it should not produce any warnings (especially not developer warnings).

It's probably possible to add default values to some of the items this test found, but I think some of them are missing defaults by design (an obvious example being `alias..*`). In that case it might be better to just skip them.

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: av6, mjpieters, mercurial-devel
phabricator - Aug. 3, 2019, 6 a.m.
navaneeth.suresh added inline comments.
navaneeth.suresh marked an inline comment as done.

INLINE COMMENTS

> av6 wrote in commands.py:1774
> This needs a better description to differentiate this flag and the default mode (see line 1786).

Could you please suggest something better?

> av6 wrote in test-config.t:238
> Certainly a good way to find all config options without default values, but in the final implementation of `showconfig -a` it should not produce any warnings (especially not developer warnings).
> 
> It's probably possible to add default values to some of the items this test found, but I think some of them are missing defaults by design (an obvious example being `alias..*`). In that case it might be better to just skip them.

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.

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: av6, mjpieters, mercurial-devel
Pierre-Yves David - Aug. 3, 2019, 11:41 a.m.
Interesting feature for sure. Thanks for looking into it.

The `--all` flag might be a bit too generic/vague. Maybe --known, 
--registered  or --default ?

We should skip experimental and deprecated configuration unless 
--verbose is specified. And we should flag them as deprecated/experimental.

For config that has multiple alias, it could be a good idea to display 
this information too (probably with --verbose)

On 8/2/19 11:50 AM, navaneeth.suresh (Navaneeth Suresh) wrote:
> navaneeth.suresh created this revision.
> Herald added subscribers: mercurial-devel, mjpieters.
> Herald added a reviewer: hg-reviewers.
> 
> REVISION SUMMARY
>    This patch fixes one of the issues in issue6014. This adds an `--all`
>    flag to `hg showconfig` to show all known config options.
> 
> REPOSITORY
>    rHG Mercurial
> 
> REVISION DETAIL
>    https://phab.mercurial-scm.org/D6709
> 
> AFFECTED FILES
>    mercurial/commands.py
>    mercurial/ui.py
>    tests/test-config.t
> 
> CHANGE DETAILS
> 
> diff --git a/tests/test-config.t b/tests/test-config.t
> --- a/tests/test-config.t
> +++ b/tests/test-config.t
> @@ -222,3 +222,507 @@
>     > done
>     $ HGRCPATH=configs hg config section.key
>     99
> +
> +test --all flag
> +
> +  $ hg showconfig --all
> +  chgserver.idletimeout=3600
> +  chgserver.skiphash=False
> +  fsmonitor.warn_when_unused=True
> +  fsmonitor.warn_update_file_count=50000
> +  progress.assume-tty=False
> +  progress.clear-complete=True
> +  progress.refresh=0.1
> +  progress.debug=False
> +  progress.format=['topic', 'bar', 'number', 'estimate']
> +  devel-warn: config item requires an explicit default value: 'progress.width' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  progress.width=None
> +  progress.changedelay=1
> +  progress.estimateinterval=60.0
> +  progress.delay=3
> +  progress.disable=False
> +  sparse.missingwarning=True
> +  devel-warn: config item requires an explicit default value: 'alias..*' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  alias..*=None
> +  merge.followcopies=True
> +  merge.preferancestor=['*']
> +  merge.on-failure=continue
> +  merge.checkunknown=abort
> +  merge.checkignored=abort
> +  merge.strict-capability-check=False
> +  email.cc=None
> +  email.reply-to=None
> +  email.bcc=None
> +  email.charsets=[]
> +  email.from=None
> +  email.method=smtp
> +  email.to=None
> +  format.generaldelta=False
> +  format.usefncache=True
> +  format.obsstore-version=None
> +  devel-warn: config item requires an explicit default value: 'format.maxchainlen' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  format.maxchainlen=None
> +  format.internal-phase=False
> +  format.revlog-compression=$BUNDLE2_COMPRESSIONS$
> +  format.manifestcachesize=None
> +  format.bookmarks-in-store=False
> +  format.usestore=True
> +  format.chunkcachesize=None
> +  format.usegeneraldelta=True
> +  format.dotencode=True
> +  format.sparse-revlog=True
> +  profiling.nested=0
> +  profiling.output=None
> +  profiling.enabled=False
> +  devel-warn: config item requires an explicit default value: 'profiling.time-track' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  profiling.time-track=None
> +  profiling.freq=1000
> +  profiling.format=text
> +  profiling.statformat=hotpath
> +  profiling.type=stat
> +  profiling.showmax=0.999
> +  devel-warn: config item requires an explicit default value: 'profiling.showmin' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  profiling.showmin=None
> +  profiling.limit=30
> +  profiling.showtime=True
> +  profiling.sort=inlinetime
> +  cmdserver.max-repo-cache=0
> +  cmdserver.message-encodings=[]
> +  cmdserver.max-log-files=7
> +  cmdserver.track-log=['chgserver', 'cmdserver', 'repocache']
> +  cmdserver.max-log-size=1 MB
> +  cmdserver.log=None
> +  push.pushvars.server=False
> +  bookmarks.pushing=[]
> +  devel-warn: config item requires an explicit default value: 'pager.attend-.*' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  pager.attend-.*=None
> +  devel-warn: config item requires an explicit default value: 'pager.pager' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  pager.pager=None
> +  pager.ignore=[]
> +  web.deny_push=[]
> +  web.maxfiles=10
> +  devel-warn: config item requires an explicit default value: 'web.name' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  web.name=None
> +  web.contact=None
> +  web.allow-pull=True
> +  web.port=8000
> +  web.errorlog=-
> +  web.comparisoncontext=5
> +  web.archivesubrepos=False
> +  web.templates=None
> +  web.logourl=https://mercurial-scm.org/
> +  web.refreshinterval=20
> +  web.cacerts=None
> +  web.allowgz=False
> +  web.allowbz2=False
> +  web.collapse=False
> +  web.server-header=testing stub value
> +  web.labels=[]
> +  web.csp=None
> +  web.ipv6=False
> +  web.accesslog=-
> +  web.allow-archive=[]
> +  web.guessmime=False
> +  web.prefix=
> +  web.cache=True
> +  web.push_ssl=True
> +  web.allow-push=[]
> +  web.logoimg=hglogo.png
> +  web.allowzip=False
> +  web.description=
> +  web.view=served
> +  web.baseurl=None
> +  web.allow_read=[]
> +  web.hidden=False
> +  web.deny_read=[]
> +  web.certificate=None
> +  web.encoding=ascii
> +  web.staticurl=None
> +  web.address=localhost
> +  web.motd=
> +  web.maxchanges=10
> +  web.stripes=1
> +  web.style=paper
> +  web.descend=True
> +  web.maxshortchanges=60
> +  web.static=None
> +  hgweb-paths..*=[]
> +  devel-warn: accessing unregistered config item: 'hostsecurity..*:verifycertsfile$' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  hostsecurity..*:verifycertsfile$=<object object at 0x7f2adc19b0e0>
> +  devel-warn: accessing unregistered config item: 'hostsecurity..*:fingerprints$' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  hostsecurity..*:fingerprints$=<object object at 0x7f2adc19b0e0>
> +  hostsecurity.ciphers=None
> +  devel-warn: accessing unregistered config item: 'hostsecurity..*:ciphers$' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  hostsecurity..*:ciphers$=<object object at 0x7f2adc19b0e0>
> +  devel-warn: config item requires an explicit default value: 'hostsecurity.minimumprotocol' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  hostsecurity.minimumprotocol=None
> +  devel-warn: accessing unregistered config item: 'hostsecurity..*:minimumprotocol$' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  hostsecurity..*:minimumprotocol$=<object object at 0x7f2adc19b0e0>
> +  hostsecurity.disabletls10warning=False
> +  rewrite.update-timestamp=False
> +  rewrite.backup-bundle=True
> +  extdata..*=None
> +  devel-warn: config item requires an explicit default value: 'subrepos.git:allowed' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  subrepos.git:allowed=None
> +  devel-warn: config item requires an explicit default value: 'subrepos.hg:allowed' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  subrepos.hg:allowed=None
> +  devel-warn: config item requires an explicit default value: 'subrepos.svn:allowed' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  subrepos.svn:allowed=None
> +  devel-warn: config item requires an explicit default value: 'subrepos.allowed' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  subrepos.allowed=None
> +  storage.new-repo-backend=revlogv1
> +  storage.revlog.zstd.level=None
> +  storage.revlog.optimize-delta-parent-choice=True
> +  storage.revlog.reuse-external-delta=True
> +  storage.revlog.reuse-external-delta-parent=None
> +  storage.revlog.zlib.level=None
> +  diff.nobinary=False
> +  diff.ignoreblanklines=False
> +  diff.ignorewsamount=False
> +  diff.git=False
> +  diff.nodates=False
> +  diff.ignorews=False
> +  diff.word-diff=False
> +  diff.ignorewseol=False
> +  diff.showfunc=False
> +  diff.noprefix=False
> +  diff.unified=None
> +  debug.dirstate.delaywrite=0
> +  worker.numcpus=None
> +  worker.enabled=True
> +  worker.backgroundclosethreadcount=4
> +  devel-warn: config item requires an explicit default value: 'worker.backgroundclose' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  worker.backgroundclose=None
> +  worker.backgroundclosemaxqueue=384
> +  worker.backgroundcloseminfilecount=2048
> +  trusted.groups=[]
> +  trusted.users=[]
> +  defaults..*=None
> +  templates..*=None
> +  ui.askusername=False
> +  ui.clonebundles=True
> +  ui.portablefilenames=warn
> +  ui.pre-merge-tool-output-template=None
> +  ui.merge=internal:merge
> +  ui.strict=False
> +  ui.rollback=True
> +  ui.clonebundlefallback=False
> +  ui.relative-paths=legacy
> +  ui.promptecho=True
> +  ui.slash=True
> +  ui.traceback=False
> +  ui.interactive=False
> +  ui.ssh=ssh
> +  ui.archivemeta=True
> +  ui.timeout.warn=0
> +  ui.large-file-limit=10000000
> +  ui.timeout=600
> +  ui.debugger=None
> +  ui.logblockedtimes=False
> +  ui.quiet=False
> +  ui.supportcontact=None
> +  ui.ssherrorhint=None
> +  ui.interface=None
> +  ui.allowemptycommit=False
> +  ui.mergemarkertemplate={node|short} {ifeq(tags, "tip", "", ifeq(tags, "", "", "{tags} "))}{if(bookmarks, "{bookmarks} ")}{ifeq(branch, "default", "", "{branch} ")}- {author|user}: {desc|firstline}
> +  ui.verbose=False
> +  ui._usedassubrepo=False
> +  ui.debug=False
> +  ui.statuscopies=False
> +  ui.quietbookmarkmove=False
> +  ui.textwidth=78
> +  ui.formatjson=False
> +  ui.graphnodetemplate=None
> +  ui.formatted=None
> +  ui.commitsubrepos=False
> +  ui.message-output=stdio
> +  ui.fallbackencoding=None
> +  ui.forcecwd=None
> +  ui.signal-safe-lock=True
> +  ui.formatdebug=False
> +  ui.forcemerge=None
> +  ui.remotecmd=hg
> +  ui.paginate=True
> +  ui.nontty=False
> +  ui.report_untrusted=True
> +  ui.username=None
> +  ui.logtemplate=None
> +  ui.origbackuppath=None
> +  ui.patch=None
> +  ui.color=auto
> +  ui.clonebundleprefers=[]
> +  devel-warn: config item requires an explicit default value: 'ui.editor' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  ui.editor=None
> +  ui.style=
> +  ui.interface.chunkselector=None
> +  ui.mergemarkers=detailed
> +  ui.tweakdefaults=False
> +  shelve.maxbackups=10
> +  devel-warn: config item requires an explicit default value: 'templateconfig..*' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  templateconfig..*=None
> +  smtp.host=None
> +  smtp.tls=none
> +  smtp.username=None
> +  smtp.local_hostname=None
> +  smtp.password=None
> +  devel-warn: config item requires an explicit default value: 'smtp.port' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  smtp.port=None
> +  devel.warn-config-unknown=None
> +  devel.warn-empty-changegroup=False
> +  devel.disableloaddefaultcerts=False
> +  devel.servercafile=
> +  devel.debug.peer-request=False
> +  devel.check-locks=False
> +  devel.bundle.delta=
> +  devel.strip-obsmarkers=True
> +  devel.legacy.exchange=[]
> +  devel.default-date=0 0
> +  devel.debug.extensions=False
> +  devel.cache-vfs=None
> +  devel.all-warnings=true
> +  devel.warn-config=None
> +  devel.bundle2.debug=False
> +  devel.debug.copies=False
> +  devel.deprec-warn=False
> +  devel.warn-config-default=None
> +  devel.serverexactprotocol=
> +  devel.check-relroot=False
> +  devel.serverrequirecert=False
> +  devel.user.obsmarker=None
> +  devel-warn: config item requires an explicit default value: 'hooks..*' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  hooks..*=None
> +  paths..*=None
> +  paths.default=None
> +  paths.default-push=None
> +  share.pool=None
> +  share.poolnaming=identity
> +  commands.commit.interactive.noprefix=False
> +  commands.commit.interactive.nodates=False
> +  commands.resolve.explicit-re-merge=False
> +  commands.resolve.mark-check=none
> +  commands.status.terse=
> +  commands.commit.post-status=False
> +  commands.commit.interactive.ignorews=False
> +  commands.revert.interactive.ignorewseol=False
> +  commands.revert.interactive.showfunc=False
> +  commands.update.check=None
> +  commands.commit.interactive.ignorewsamount=False
> +  commands.resolve.confirm=False
> +  commands.status.verbose=False
> +  commands.commit.interactive.word-diff=False
> +  commands.commit.interactive.nobinary=False
> +  commands.grep.all-files=False
> +  commands.commit.interactive.git=False
> +  commands.revert.interactive.noprefix=False
> +  commands.status.relative=False
> +  commands.revert.interactive.word-diff=False
> +  commands.show.aliasprefix=[]
> +  commands.update.requiredest=False
> +  commands.revert.interactive.nobinary=False
> +  commands.commit.interactive.ignoreblanklines=False
> +  commands.revert.interactive.unified=None
> +  commands.revert.interactive.nodates=False
> +  commands.revert.interactive.ignorewsamount=False
> +  commands.commit.interactive.unified=None
> +  commands.commit.interactive.ignorewseol=False
> +  commands.revert.interactive.git=False
> +  commands.status.skipstates=[]
> +  commands.revert.interactive.ignoreblanklines=False
> +  commands.commit.interactive.showfunc=False
> +  commands.revert.interactive.ignorews=False
> +  commands.rebase.requiredest=False
> +  committemplate..*=None
> +  merge-tools..*\.premerge$=None
> +  merge-tools..*\.executable$=None
> +  merge-tools..*\.symlink$=None
> +  merge-tools..*\.fixeol$=None
> +  merge-tools..*=None
> +  merge-tools..*\.gui$=None
> +  merge-tools..*\.priority$=None
> +  merge-tools..*\.mergemarkertemplate$=None
> +  merge-tools..*\.mergemarkers$=None
> +  merge-tools..*\.args$=None
> +  merge-tools..*\.binary$=None
> +  merge-tools..*\.check$=None
> +  merge-tools..*\.checkchanged$=None
> +  bundle.mainreporoot=$TESTTMP
> +  server.preferuncompressed=False
> +  server.validate=False
> +  server.bundle1=True
> +  server.maxhttpheaderlen=1024
> +  server.streamunbundle=False
> +  server.zliblevel=-1
> +  server.pullbundle=False
> +  server.bundle1gd.push=None
> +  server.bundle1.push=None
> +  server.uncompressed=True
> +  server.bundle1gd=None
> +  server.disablefullbundle=False
> +  server.compressionengines=[]
> +  server.bundle2.stream=True
> +  server.concurrent-push-mode=strict
> +  server.bundle1.pull=None
> +  server.view=served
> +  server.bundle1gd.pull=None
> +  server.zstdlevel=3
> +  server.uncompressedallowsecret=False
> +  server.bookmarks-pushkey-compat=True
> +  convert.cvsps.fuzz=60
> +  convert.skiptags=False
> +  convert.git.extrakeys=[]
> +  devel-warn: config item requires an explicit default value: 'convert.p4.encoding' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  convert.p4.encoding=None
> +  convert.svn.startrev=0
> +  convert.svn.debugsvnlog=True
> +  convert.p4.startrev=0
> +  convert.hg.sourcename=None
> +  convert.git.committeractions=['messagedifferent']
> +  convert.cvsps.logencoding=None
> +  convert.git.remoteprefix=remote
> +  convert.git.findcopiesharder=False
> +  convert.svn.tags=None
> +  convert.bzr.saverev=True
> +  convert.hg.revs=None
> +  convert.git.similarity=50
> +  convert.git.renamelimit=400
> +  convert.git.saverev=True
> +  convert.hg.ignoreerrors=False
> +  convert.git.skipsubmodules=False
> +  convert.ignoreancestorcheck=False
> +  convert.hg.usebranchnames=True
> +  convert.hg.startrev=None
> +  convert.hg.tagsbranch=default
> +  convert.hg.saverev=False
> +  convert.svn.trunk=None
> +  convert.svn.branches=None
> +  convert.cvsps.mergeto=None
> +  convert.hg.clonebranches=False
> +  convert.localtimezone=False
> +  convert.cvsps.cache=True
> +  convert.cvsps.mergefrom=None
> +  convert.hg.preserve-hash=False
> +  annotate.nobinary=False
> +  annotate.ignoreblanklines=False
> +  annotate.ignorewsamount=False
> +  annotate.git=False
> +  annotate.nodates=False
> +  annotate.ignorews=False
> +  annotate.word-diff=False
> +  annotate.ignorewseol=False
> +  annotate.showfunc=False
> +  annotate.noprefix=False
> +  annotate.unified=None
> +  rebase.singletransaction=False
> +  rebase.experimental.inmemory=False
> +  http.timeout=None
> +  logtoprocess.command=None
> +  logtoprocess.develwarn=None
> +  logtoprocess.commandexception=None
> +  logtoprocess.uiblocked=None
> +  logtoprocess.commandfinish=None
> +  devel-warn: accessing unregistered config item: 'help.hidden-command\..*' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  help.hidden-command\..*=<object object at 0x7f2adc19b0e0>
> +  devel-warn: accessing unregistered config item: 'help.hidden-topic\..*' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  help.hidden-topic\..*=<object object at 0x7f2adc19b0e0>
> +  experimental.hook-track-tags=False
> +  experimental.evolution.effect-flags=True
> +  experimental.bundle2.pushback=False
> +  experimental.mmapindexthreshold=None
> +  experimental.evolution=[]
> +  experimental.update.atomic-file=False
> +  experimental.clientcompressionengines=[]
> +  experimental.evolution.allowdivergence=False
> +  experimental.copytrace=on
> +  experimental.web.api.http-v2=False
> +  experimental.bundlecomplevel=None
> +  experimental.httppeer.advertise-v2=False
> +  experimental.sparse-read.density-threshold=0.5
> +  experimental.editortmpinhg=False
> +  experimental.httppeer.v2-encoder-order=None
> +  experimental.graphshorten=False
> +  experimental.httppostargs=False
> +  experimental.server.stream-narrow-clones=False
> +  experimental.changegroup3=False
> +  experimental.directaccess=False
> +  experimental.worker.wdir-get-thread-safe=False
> +  experimental.server.manifestdata.recommended-batch-size=100000
> +  experimental.extendedheader.index=None
> +  experimental.copytrace.sourcecommitlimit=100
> +  experimental.sshserver.support-v2=False
> +  experimental.obsmarkers-exchange-debug=False
> +  experimental.bundle2-output-capture=False
> +  devel-warn: config item requires an explicit default value: 'experimental.archivemetatemplate' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  experimental.archivemetatemplate=None
> +  experimental.cleanup-as-archived=False
> +  experimental.nonnormalparanoidcheck=False
> +  experimental.evolution.exchange=None
> +  experimental.log.topo=False
> +  experimental.bundlecomplevel.zstd=None
> +  experimental.exportableenviron=[]
> +  experimental.revlogv2=None
> +  experimental.crecordtest=None
> +  experimental.web.apiserver=False
> +  experimental.copies.write-to=filelog-only
> +  experimental.extendedheader.similarity=False
> +  experimental.bundle2-advertise=True
> +  experimental.copies.read-from=filelog-only
> +  experimental.merge.checkpathconflicts=False
> +  experimental.removeemptydirs=True
> +  experimental.auto-publish=publish
> +  experimental.xdiff=False
> +  experimental.single-head-per-branch=False
> +  experimental.mergedriver=None
> +  experimental.revert.interactive.select-to-keep=False
> +  experimental.web.api.debugreflect=False
> +  devel-warn: config item requires an explicit default value: 'experimental.graphstyle.missing' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  experimental.graphstyle.missing=None
> +  devel-warn: config item requires an explicit default value: 'experimental.graphstyle.parent' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  experimental.graphstyle.parent=None
> +  experimental.copytrace.movecandidateslimit=100
> +  experimental.directaccess.revnums=False
> +  experimental.evolution.createmarkers=None
> +  experimental.nointerrupt-interactiveonly=True
> +  experimental.server.filesdata.recommended-batch-size=50000
> +  experimental.sshpeer.advertise-v2=False
> +  experimental.sparse-read=False
> +  experimental.revisions.disambiguatewithin=None
> +  experimental.evolution.allowunstable=None
> +  experimental.bundle2lazylocking=False
> +  experimental.evolution.report-instabilities=True
> +  experimental.bundlecomplevel.bzip2=None
> +  devel-warn: config item requires an explicit default value: 'experimental.graphstyle.grandparent' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  experimental.graphstyle.grandparent=None
> +  experimental.bundle-phases=False
> +  experimental.remotenames=False
> +  experimental.nointerrupt=False
> +  experimental.narrow=False
> +  experimental.evolution.bundle-obsmarker=False
> +  experimental.sparse-read.min-gap-size=65K
> +  experimental.extra-filter-revs=None
> +  experimental.maxdeltachainspan=-1
> +  experimental.evolution.track-operation=True
> +  experimental.treemanifest=False
> +  experimental.rebaseskipobsolete=True
> +  experimental.mergetempdirprefix=None
> +  experimental.bundlecomplevel.none=None
> +  experimental.revisions.prefixhexnode=False
> +  experimental.bundlecomplevel.gzip=None
> +  phases.new-commit=draft
> +  phases.checksubrepos=follow
> +  phases.publish=True
> +  patch.fuzz=2
> +  patch.eol=strict
> +  color..*=None
> +  devel-warn: config item requires an explicit default value: 'color.pagermode' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
> +  color.pagermode=None
> +  color.mode=auto
> +  censor.policy=abort
> +  extensions..*=None
> +  verify.skipflags=None
> +  auth.cookiefile=None
> +  hostfingerprints..*=[]
> +  http_proxy.user=None
> +  http_proxy.host=None
> +  http_proxy.no=[]
> +  http_proxy.passwd=None
> +  http_proxy.always=False
> diff --git a/mercurial/ui.py b/mercurial/ui.py
> --- a/mercurial/ui.py
> +++ b/mercurial/ui.py
> @@ -818,6 +818,13 @@
>               for name, value in self.configitems(section, untrusted):
>                   yield section, name, value
>   
> +    def walkallconfig(self, untrusted=False):
> +        """walk through all known config options in the registrar"""
> +        for section in self._knownconfig:
> +            for name, item in self._knownconfig[section].iteritems():
> +                value = self._config(section, name, untrusted=untrusted)
> +                yield section, name, value
> +
>       def plain(self, feature=None):
>           '''is plain mode active?
>   
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -1771,7 +1771,8 @@
>                  unknown=True, subrepos=opts.get('subrepos'))
>   
>   @command('config|showconfig|debugconfig',
> -    [('u', 'untrusted', None, _('show untrusted configuration options')),
> +    [('a', 'all', None, _('show all known configuration options')),
> +     ('u', 'untrusted', None, _('show untrusted configuration options')),
>        ('e', 'edit', None, _('edit user config')),
>        ('l', 'local', None, _('edit repository config')),
>        ('g', 'global', None, _('edit global config'))] + formatteropts,
> @@ -1869,7 +1870,10 @@
>       selentries = set(selentries)
>   
>       matched = False
> -    for section, name, value in ui.walkconfig(untrusted=untrusted):
> +    walkconfig = ui.walkconfig(untrusted=untrusted)
> +    if opts.get('all'):
> +        walkconfig = ui.walkallconfig(untrusted=untrusted)
> +    for section, name, value in walkconfig:
>           source = ui.configsource(section, name, untrusted)
>           value = pycompat.bytestr(value)
>           defaultvalue = pycompat.bytestr(ui.configdefault(section, name))
> 
> 
> 
> To: navaneeth.suresh, #hg-reviewers
> Cc: mjpieters, mercurial-devel
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
phabricator - Aug. 7, 2019, 2:16 p.m.
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
phabricator - Aug. 7, 2019, 2:23 p.m.
This revision now requires changes to proceed.
marmoute added inline comments.
marmoute requested changes to this revision.

INLINE COMMENTS

> pulkit wrote in test-config.t:228
> In cases when the default value and the value of config set are different, let's do something like `<current-output> (default=<default_value>)`

Displaying the default vs current is good idea, but the current proposal might be a bit odd:

If nothing is set we will have:

  annotate.ignoreblanklines=False

If something is set and is the same as the default we'll have

  annotate.ignoreblanklines=False

If something is set and is different from the repo we will have

  annotate.ignoreblanklines=True (default: False)

The first two cases can't be distinguish while they probably should, and the default value is displayed differently between the first and third case.

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

Note: we I think we should use `yes/no` instead of `True` and `False`.

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, marmoute
Cc: pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 8, 2019, 4:08 p.m.
navaneeth.suresh added a comment.


  @pulkit I couldn't figure out why the devel-warnings are coming. It's being shown for the following 
  items in `configitems.py`. IIUC, it should be visible when we are trying to read a config item which is
  not in the registered items.  But, we are iterating over registered items only.
  
    coreconfigitem('help', br'hidden-command\..*',
        default=False,
        generic=True,
    )
    coreconfigitem('help', br'hidden-topic\..*',
        default=False,
        generic=True,
    )
    coreconfigitem('hostsecurity', '.*:fingerprints$',
        default=list,
        generic=True,
    )
    coreconfigitem('hostsecurity', '.*:verifycertsfile$',
        default=None,
        generic=True,
    )
  
  Also, why would we want `walkregisteredconfig()` to return `section, name, value, defaultvalue` ?
  If we do that, then it would require modification in `ui.walkregisteredconfig()` and `commands.config()`.
  
  @av6 If you have a strong opinion on replacing `True/False` with `yes/no`, I can do that.

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, marmoute
Cc: pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 8, 2019, 4:25 p.m.
marmoute added a comment.


  In D6709#98479 <https://phab.mercurial-scm.org/D6709#98479>, @navaneeth.suresh wrote:
  
  > @pulkit I couldn't figure out why the devel-warnings are coming. It's being shown for the following 
  > items in `configitems.py`. IIUC, it should be visible when we are trying to read a config item which is
  > not in the registered items.  But, we are iterating over registered items only.
  
  There are "generic" config option. So it does not hold the option "name", but a regexp to match valid entry.
  
  > @av6 If you have a strong opinion on replacing `True/False` with `yes/no`, I can do that.
  
  Not sure is @av6 has a strong opinion, but I do :-)

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, marmoute
Cc: pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 9, 2019, 4:54 a.m.
navaneeth.suresh added a comment.


  In D6709#98493 <https://phab.mercurial-scm.org/D6709#98493>, @marmoute wrote:
  
  > In D6709#98479 <https://phab.mercurial-scm.org/D6709#98479>, @navaneeth.suresh wrote:
  >
  >> @pulkit I couldn't figure out why the devel-warnings are coming. It's being shown for the following 
  >> items in `configitems.py`. IIUC, it should be visible when we are trying to read a config item which is
  >> not in the registered items.  But, we are iterating over registered items only.
  >
  > There are "generic" config option. So it does not hold the option "name", but a regexp to match valid entry.
  
  Fixed.
  
  >> @av6 If you have a strong opinion on replacing `True/False` with `yes/no`, I can do that.
  >
  > Not sure is @av6 has a strong opinion, but I do :-)
  
  Fixed this too. Sorry I was supposed to type @marmoute instead of @av6. My bad.

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, marmoute
Cc: pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 9, 2019, 6:46 p.m.
pulkit added a comment.


  In D6709#98493 <https://phab.mercurial-scm.org/D6709#98493>, @marmoute wrote:
  
  > In D6709#98479 <https://phab.mercurial-scm.org/D6709#98479>, @navaneeth.suresh wrote:
  >
  >> @pulkit I couldn't figure out why the devel-warnings are coming. It's being shown for the following 
  >> items in `configitems.py`. IIUC, it should be visible when we are trying to read a config item which is
  >> not in the registered items.  But, we are iterating over registered items only.
  >
  > There are "generic" config option. So it does not hold the option "name", but a regexp to match valid entry.
  >
  >> @av6 If you have a strong opinion on replacing `True/False` with `yes/no`, I can do that.
  >
  > Not sure is @av6 has a strong opinion, but I do :-)
  
  I don't want to discuss whether `yes/no` are better or `True/False` but when showing the default value, let's show the exact same which is there even though they mean the same?

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, marmoute
Cc: pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 9, 2019, 6:52 p.m.
pulkit added inline comments.

INLINE COMMENTS

> commands.py:1888
>          fm.condwrite(ui.debugflag, 'source', '%s: ', source)
> +        fm.data(defaultvalue=defaultvalue)
>          if uniquesel:

unrequired change I guess

> marmoute wrote in test-config.t:228
> Displaying the default vs current is good idea, but the current proposal might be a bit odd:
> 
> If nothing is set we will have:
> 
>   annotate.ignoreblanklines=False
> 
> If something is set and is the same as the default we'll have
> 
>   annotate.ignoreblanklines=False
> 
> If something is set and is different from the repo we will have
> 
>   annotate.ignoreblanklines=True (default: False)
> 
> The first two cases can't be distinguish while they probably should, and the default value is displayed differently between the first and third case.

In the second case above,

How about something like:

  annotate.ignoreblanklines=False  (default: False)

i.e. we show `(default ..)` if the user has set that config option.

> test-config.t:990
> +  worker.backgroundclosemaxqueue=384
> +  worker.backgroundcloseminfilecount=2048
> +  worker.backgroundclosethreadcount=4

Can you add some tests for `hg config <some-config> --registered`?

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, marmoute
Cc: pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 10, 2019, 6:56 p.m.
marmoute added inline comments.

INLINE COMMENTS

> test-config.t:232
> +  annotate.git=no (default: False)
> +  annotate.ignoreblanklines=no (default: False)
> +  annotate.ignorews=no (default: False)

the `(default: False)` should be `(default: no)` too.

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, marmoute
Cc: pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 10, 2019, 7:02 p.m.
navaneeth.suresh added inline comments.
navaneeth.suresh added a subscriber: yuja.

INLINE COMMENTS

> marmoute wrote in test-config.t:232
> the `(default: False)` should be `(default: no)` too.

that change was there in my patch one revision before. i was asked by @pulkit to modify it as of now. would you recommend writing `no` to `fm.data()` also? the `defaultvalue` was not in `pycompat.bytestr()` after @yuja's suggestion. it would be better if we consider that as a string and change the function accordingly if we want to modify it. otherwise, it should print  `no` and store `False`, print `False` on `hg showconfig --Tjson` in `defaultvalue`.

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, marmoute
Cc: yuja, pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 11, 2019, 11:04 a.m.
marmoute added inline comments.

INLINE COMMENTS

> navaneeth.suresh wrote in test-config.t:232
> that change was there in my patch one revision before. i was asked by @pulkit to modify it as of now. would you recommend writing `no` to `fm.data()` also? the `defaultvalue` was not in `pycompat.bytestr()` after @yuja's suggestion. it would be better if we consider that as a string and change the function accordingly if we want to modify it. otherwise, it should print  `no` and store `False`, print `False` on `hg showconfig --Tjson` in `defaultvalue`.

We should be consistent when printing. And we should also be consistent when recording stuff in data.

I think it make sense to print human friendly version ('yes/no') and use the actual boolean value in data()/json

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, marmoute
Cc: yuja, pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 11, 2019, 1:06 p.m.
navaneeth.suresh added inline comments.

INLINE COMMENTS

> marmoute wrote in test-config.t:232
> We should be consistent when printing. And we should also be consistent when recording stuff in data.
> 
> I think it make sense to print human friendly version ('yes/no') and use the actual boolean value in data()/json

okay. then, i should revert it to the previous revision.

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, marmoute
Cc: yuja, pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 11, 2019, 5:57 p.m.
mharbison72 added a comment.


  Should we hide `devel.*` like we do `experimental` when `verbose` isn’t applied?  Presumably we don’t want regular users to know about them.

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, marmoute
Cc: mharbison72, yuja, pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 11, 2019, 6:13 p.m.
navaneeth.suresh added a comment.


  In D6709#98542 <https://phab.mercurial-scm.org/D6709#98542>, @mharbison72 wrote:
  
  > Should we hide `devel.*` like we do `experimental` when `verbose` isn’t applied?  Presumably we don’t want regular users to know about them.
  
  Done.

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, marmoute
Cc: mharbison72, yuja, pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 11, 2019, 7:38 p.m.
mharbison72 added a comment.


  I missed the `debug` one too, sorry. (Although I’m not sure why that also isn’t `devel.`, so maybe it isn’t a big deal. Curious what others think.)

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, marmoute
Cc: mharbison72, yuja, pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 15, 2019, 9:46 a.m.
marmoute added a comment.


  We will need more than just matching the categoie name to detect experimental/deprecated config. There are such option outside of the `experimental` section, and we still need to hide them by default. You can grep for `# experimental config:` to see some example.

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, marmoute
Cc: mharbison72, yuja, pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 15, 2019, 10 a.m.
pulkit added a comment.


  In D6709#98716 <https://phab.mercurial-scm.org/D6709#98716>, @marmoute wrote:
  
  > We will need more than just matching the categoie name to detect experimental/deprecated config. There are such option outside of the `experimental` section, and we still need to hide them by default. You can grep for `# experimental config:` to see some example.
  
  I only see one of them `rebase.experimental.inmemory`. I think it will be nice to have configs option correctly put inside `experimental` section instead of adding more filtering here.

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, marmoute
Cc: mharbison72, yuja, pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 15, 2019, 10:10 a.m.
marmoute added a comment.


  I get 28 of them.
  
  I think we need to add an `experimental` or `status` argument ot the config registration.
  
    > ag --nofilename '# experimental config:.*' -o | sort -u
    # experimental config: censor.policy
    # experimental config: cmdserver.max-repo-cache
    # experimental config: cmdserver.message-encodings
    # experimental config: commands.grep.all-files
    # experimental config: commands.status.skipstates
    # experimental config: convert.ignoreancestorcheck
    # experimental config: experimental.graphshorten
    # experimental config: experimental.graphstyle.*
    # experimental config: experimental.hook-track-tags
    # experimental config: format.chunkcachesize
    # experimental config: format.generaldelta
    # experimental config: format.internal-phase
    # experimental config: format.manifestcachesize
    # experimental config: format.maxchainlen
    # experimental config: fsmonitor.verbose
    # experimental config: merge.preferancestor
    # experimental config: patchbomb.publicurl
    # experimental config: perf.all-timing
    # experimental config: perf.parentscount
    # experimental config: perf.presleep
    # experimental config: perf.run-limits
    # experimental config: perf.stub
    # experimental config: repack.chainorphansbysize
    # experimental config: sparse.missingwarning
    # experimental config: storage.new-repo-backend
    # experimental config: storage.sqlite.compression
    # experimental config: web.view

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, marmoute
Cc: mharbison72, yuja, pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 15, 2019, 2:32 p.m.
navaneeth.suresh added a comment.


  In D6709#98718 <https://phab.mercurial-scm.org/D6709#98718>, @marmoute wrote:
  
  > I get 28 of them.
  > I think we need to add an `experimental` or `status` argument ot the config registration.
  
  Created D6728 <https://phab.mercurial-scm.org/D6728> to add an `experimental` argument to the config registrar and made it as a parent revision.

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, marmoute
Cc: mharbison72, yuja, pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 15, 2019, 3:13 p.m.
durin42 added a comment.
durin42 accepted this revision as: durin42.


  Looks good to me, but I want someone else to put eyes on it before it gets pushed.

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, marmoute, durin42
Cc: durin42, mharbison72, yuja, pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 16, 2019, 7:51 a.m.
av6 added a comment.


  It looks fine to me, one thing that could be improved is the output format of list values. For example, `progress.format`: its default value is shown to be `['topic', 'bar', 'number', 'estimate']`, but it doesn't match `hg help config.progress.format` (it says `default: topic bar number estimate`), and that is also not the format that users would need to use for the actual value in hgrc or using --config flag.

INLINE COMMENTS

> ui.py:825-826
> +            for name, item in sorted(data.iteritems()):
> +                if (item.default is not configitems.dynamicdefault and
> +                    not item.generic):
> +                    if ((section in ['debug', 'devel', 'experimental'] or

Nit: this condition could be made into another `if ...: continue` block just like the one below, making things less indented.

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, marmoute, durin42
Cc: durin42, mharbison72, yuja, pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 17, 2019, 1 p.m.
av6 added inline comments.

INLINE COMMENTS

> ui.py:832
> +                    # Omit config items with dynamicdefault, devel,
> +                    # experimental and generic config opts.
> +                    continue

Nit: originally I was fine with two different `if ...: continue` blocks here, and I still think it would be better. Not only the condition here is fairly complex and spans multiple lines (so not easy to read), but this comment is not quite correct. We always omit items with dynamic defaults and generic items, but experimental (& etc) items are only omitted unless --verbose is given. Two comments in two if-blocks with two separate conditions here would be more readable.

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, marmoute, durin42
Cc: durin42, mharbison72, yuja, pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 21, 2019, 4:48 a.m.
av6 added inline comments.

INLINE COMMENTS

> commands.py:1893
>          else:
> -            fm.write('name value', '%s=%s\n', entryname, value)
> -        fm.data(defaultvalue=defaultvalue)
> +            value_ = value
> +            for tfopt in [('True', 'yes'), ('False', 'no'), ('true', 'yes'),

Let's rename this variable to better reflect its intent. AFAIU, a better name would be `rawvalue` or `origvalue`.

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, marmoute, durin42
Cc: durin42, mharbison72, yuja, pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 23, 2019, 3:27 a.m.
av6 added a comment.
av6 accepted this revision.


  @marmoute did you want this flag marked as experimental or am I misremembering?

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, marmoute, durin42
Cc: durin42, mharbison72, yuja, pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 23, 2019, 7:01 p.m.
navaneeth.suresh added a comment.


  In D6709#99166 <https://phab.mercurial-scm.org/D6709#99166>, @av6 wrote:
  
  > @marmoute did you want this flag marked as experimental or am I misremembering?
  
  @av6 @marmoute told me to add `EXPERIMENTAL` in the output of the config options which are experimental but, not come under the section experimental.
  There are 28 of them. For example, `sparse.missingwarning(EXPERIMENTAL)=yes (default: None)`. We had this conversation in IRC. I think you are
  referring to that.

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, marmoute, durin42
Cc: durin42, mharbison72, yuja, pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 24, 2019, 5:24 a.m.
This revision now requires changes to proceed.
av6 added a comment.
av6 requested changes to this revision.


  I'm strongly -1 on adding qualifiers straight to the keys. The primary usage scenario here is scripts (as explained in issue6014) -- regular users lived without this feature for years and didn't care (enough to file a bug) about getting all config options, or their default values, //or// the experimental status (they could and still can read it in hg help config). `--registered` is needed for things like shell completions, and the output needs to be clear and parseable (and consistent with what regular showconfig shows).
  
  Even adding "(default: x)" to values already complicates the parsing process to get multiple config options in a script. Yeah, a script can get individual values one by one, but it can take ages because of the start-up time (again, this is important for interactive scripts like shell completions).
  
  Let's add a test to this patch that demonstrates that scripts can //easily// use this new functionality. Something like `$ hg showconfig --registered -T '{name}={value}\n' | egrep '^(color|diff)'`. Notice how this uses -T, which is recommended, but people writing scripts in the wild may not even use, and extra things in the output (i.e. anything other than just key and value) will trip their scripts up. Maaaybe if we put a strongly worded note in hg help showconfig about scripting and usage of -T, maybe then adding "(EXPERIMENTAL)" would make sense. But I think the current format of adding it to the key is weird and it would be better to add it to the end of the line, similar to what experimental CLI flags have in the output of `hg help -v command` (if at all, because, again, that is not how regular showconfig behaves and we do have both defaults and experimental statuses in hg help config).
  
  Sorry for coming up with this new condition only now, but I thought everyone was already on the same page.

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, marmoute, durin42
Cc: durin42, mharbison72, yuja, pulkit, marmoute, av6, mjpieters, mercurial-devel
phabricator - Aug. 24, 2019, 7:37 a.m.
navaneeth.suresh added a comment.


  @av6 I have updated the tests. @marmoute can we just get rid of `(EXPERIMENTAL)` in the output? If we want to do that, changes have to be made in `ui.walkregisteredconfig()`. But, that's a hack which appends to either name or value and as @av6 mentioned, the user will see it on using with `-T` which they might not wanted.

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, marmoute, durin42
Cc: durin42, mharbison72, yuja, pulkit, marmoute, av6, mjpieters, mercurial-devel

Patch

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -222,3 +222,507 @@ 
   > done
   $ HGRCPATH=configs hg config section.key
   99
+
+test --all flag
+
+  $ hg showconfig --all
+  chgserver.idletimeout=3600
+  chgserver.skiphash=False
+  fsmonitor.warn_when_unused=True
+  fsmonitor.warn_update_file_count=50000
+  progress.assume-tty=False
+  progress.clear-complete=True
+  progress.refresh=0.1
+  progress.debug=False
+  progress.format=['topic', 'bar', 'number', 'estimate']
+  devel-warn: config item requires an explicit default value: 'progress.width' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  progress.width=None
+  progress.changedelay=1
+  progress.estimateinterval=60.0
+  progress.delay=3
+  progress.disable=False
+  sparse.missingwarning=True
+  devel-warn: config item requires an explicit default value: 'alias..*' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  alias..*=None
+  merge.followcopies=True
+  merge.preferancestor=['*']
+  merge.on-failure=continue
+  merge.checkunknown=abort
+  merge.checkignored=abort
+  merge.strict-capability-check=False
+  email.cc=None
+  email.reply-to=None
+  email.bcc=None
+  email.charsets=[]
+  email.from=None
+  email.method=smtp
+  email.to=None
+  format.generaldelta=False
+  format.usefncache=True
+  format.obsstore-version=None
+  devel-warn: config item requires an explicit default value: 'format.maxchainlen' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  format.maxchainlen=None
+  format.internal-phase=False
+  format.revlog-compression=$BUNDLE2_COMPRESSIONS$
+  format.manifestcachesize=None
+  format.bookmarks-in-store=False
+  format.usestore=True
+  format.chunkcachesize=None
+  format.usegeneraldelta=True
+  format.dotencode=True
+  format.sparse-revlog=True
+  profiling.nested=0
+  profiling.output=None
+  profiling.enabled=False
+  devel-warn: config item requires an explicit default value: 'profiling.time-track' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  profiling.time-track=None
+  profiling.freq=1000
+  profiling.format=text
+  profiling.statformat=hotpath
+  profiling.type=stat
+  profiling.showmax=0.999
+  devel-warn: config item requires an explicit default value: 'profiling.showmin' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  profiling.showmin=None
+  profiling.limit=30
+  profiling.showtime=True
+  profiling.sort=inlinetime
+  cmdserver.max-repo-cache=0
+  cmdserver.message-encodings=[]
+  cmdserver.max-log-files=7
+  cmdserver.track-log=['chgserver', 'cmdserver', 'repocache']
+  cmdserver.max-log-size=1 MB
+  cmdserver.log=None
+  push.pushvars.server=False
+  bookmarks.pushing=[]
+  devel-warn: config item requires an explicit default value: 'pager.attend-.*' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  pager.attend-.*=None
+  devel-warn: config item requires an explicit default value: 'pager.pager' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  pager.pager=None
+  pager.ignore=[]
+  web.deny_push=[]
+  web.maxfiles=10
+  devel-warn: config item requires an explicit default value: 'web.name' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  web.name=None
+  web.contact=None
+  web.allow-pull=True
+  web.port=8000
+  web.errorlog=-
+  web.comparisoncontext=5
+  web.archivesubrepos=False
+  web.templates=None
+  web.logourl=https://mercurial-scm.org/
+  web.refreshinterval=20
+  web.cacerts=None
+  web.allowgz=False
+  web.allowbz2=False
+  web.collapse=False
+  web.server-header=testing stub value
+  web.labels=[]
+  web.csp=None
+  web.ipv6=False
+  web.accesslog=-
+  web.allow-archive=[]
+  web.guessmime=False
+  web.prefix=
+  web.cache=True
+  web.push_ssl=True
+  web.allow-push=[]
+  web.logoimg=hglogo.png
+  web.allowzip=False
+  web.description=
+  web.view=served
+  web.baseurl=None
+  web.allow_read=[]
+  web.hidden=False
+  web.deny_read=[]
+  web.certificate=None
+  web.encoding=ascii
+  web.staticurl=None
+  web.address=localhost
+  web.motd=
+  web.maxchanges=10
+  web.stripes=1
+  web.style=paper
+  web.descend=True
+  web.maxshortchanges=60
+  web.static=None
+  hgweb-paths..*=[]
+  devel-warn: accessing unregistered config item: 'hostsecurity..*:verifycertsfile$' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  hostsecurity..*:verifycertsfile$=<object object at 0x7f2adc19b0e0>
+  devel-warn: accessing unregistered config item: 'hostsecurity..*:fingerprints$' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  hostsecurity..*:fingerprints$=<object object at 0x7f2adc19b0e0>
+  hostsecurity.ciphers=None
+  devel-warn: accessing unregistered config item: 'hostsecurity..*:ciphers$' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  hostsecurity..*:ciphers$=<object object at 0x7f2adc19b0e0>
+  devel-warn: config item requires an explicit default value: 'hostsecurity.minimumprotocol' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  hostsecurity.minimumprotocol=None
+  devel-warn: accessing unregistered config item: 'hostsecurity..*:minimumprotocol$' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  hostsecurity..*:minimumprotocol$=<object object at 0x7f2adc19b0e0>
+  hostsecurity.disabletls10warning=False
+  rewrite.update-timestamp=False
+  rewrite.backup-bundle=True
+  extdata..*=None
+  devel-warn: config item requires an explicit default value: 'subrepos.git:allowed' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  subrepos.git:allowed=None
+  devel-warn: config item requires an explicit default value: 'subrepos.hg:allowed' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  subrepos.hg:allowed=None
+  devel-warn: config item requires an explicit default value: 'subrepos.svn:allowed' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  subrepos.svn:allowed=None
+  devel-warn: config item requires an explicit default value: 'subrepos.allowed' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  subrepos.allowed=None
+  storage.new-repo-backend=revlogv1
+  storage.revlog.zstd.level=None
+  storage.revlog.optimize-delta-parent-choice=True
+  storage.revlog.reuse-external-delta=True
+  storage.revlog.reuse-external-delta-parent=None
+  storage.revlog.zlib.level=None
+  diff.nobinary=False
+  diff.ignoreblanklines=False
+  diff.ignorewsamount=False
+  diff.git=False
+  diff.nodates=False
+  diff.ignorews=False
+  diff.word-diff=False
+  diff.ignorewseol=False
+  diff.showfunc=False
+  diff.noprefix=False
+  diff.unified=None
+  debug.dirstate.delaywrite=0
+  worker.numcpus=None
+  worker.enabled=True
+  worker.backgroundclosethreadcount=4
+  devel-warn: config item requires an explicit default value: 'worker.backgroundclose' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  worker.backgroundclose=None
+  worker.backgroundclosemaxqueue=384
+  worker.backgroundcloseminfilecount=2048
+  trusted.groups=[]
+  trusted.users=[]
+  defaults..*=None
+  templates..*=None
+  ui.askusername=False
+  ui.clonebundles=True
+  ui.portablefilenames=warn
+  ui.pre-merge-tool-output-template=None
+  ui.merge=internal:merge
+  ui.strict=False
+  ui.rollback=True
+  ui.clonebundlefallback=False
+  ui.relative-paths=legacy
+  ui.promptecho=True
+  ui.slash=True
+  ui.traceback=False
+  ui.interactive=False
+  ui.ssh=ssh
+  ui.archivemeta=True
+  ui.timeout.warn=0
+  ui.large-file-limit=10000000
+  ui.timeout=600
+  ui.debugger=None
+  ui.logblockedtimes=False
+  ui.quiet=False
+  ui.supportcontact=None
+  ui.ssherrorhint=None
+  ui.interface=None
+  ui.allowemptycommit=False
+  ui.mergemarkertemplate={node|short} {ifeq(tags, "tip", "", ifeq(tags, "", "", "{tags} "))}{if(bookmarks, "{bookmarks} ")}{ifeq(branch, "default", "", "{branch} ")}- {author|user}: {desc|firstline}
+  ui.verbose=False
+  ui._usedassubrepo=False
+  ui.debug=False
+  ui.statuscopies=False
+  ui.quietbookmarkmove=False
+  ui.textwidth=78
+  ui.formatjson=False
+  ui.graphnodetemplate=None
+  ui.formatted=None
+  ui.commitsubrepos=False
+  ui.message-output=stdio
+  ui.fallbackencoding=None
+  ui.forcecwd=None
+  ui.signal-safe-lock=True
+  ui.formatdebug=False
+  ui.forcemerge=None
+  ui.remotecmd=hg
+  ui.paginate=True
+  ui.nontty=False
+  ui.report_untrusted=True
+  ui.username=None
+  ui.logtemplate=None
+  ui.origbackuppath=None
+  ui.patch=None
+  ui.color=auto
+  ui.clonebundleprefers=[]
+  devel-warn: config item requires an explicit default value: 'ui.editor' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  ui.editor=None
+  ui.style=
+  ui.interface.chunkselector=None
+  ui.mergemarkers=detailed
+  ui.tweakdefaults=False
+  shelve.maxbackups=10
+  devel-warn: config item requires an explicit default value: 'templateconfig..*' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  templateconfig..*=None
+  smtp.host=None
+  smtp.tls=none
+  smtp.username=None
+  smtp.local_hostname=None
+  smtp.password=None
+  devel-warn: config item requires an explicit default value: 'smtp.port' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  smtp.port=None
+  devel.warn-config-unknown=None
+  devel.warn-empty-changegroup=False
+  devel.disableloaddefaultcerts=False
+  devel.servercafile=
+  devel.debug.peer-request=False
+  devel.check-locks=False
+  devel.bundle.delta=
+  devel.strip-obsmarkers=True
+  devel.legacy.exchange=[]
+  devel.default-date=0 0
+  devel.debug.extensions=False
+  devel.cache-vfs=None
+  devel.all-warnings=true
+  devel.warn-config=None
+  devel.bundle2.debug=False
+  devel.debug.copies=False
+  devel.deprec-warn=False
+  devel.warn-config-default=None
+  devel.serverexactprotocol=
+  devel.check-relroot=False
+  devel.serverrequirecert=False
+  devel.user.obsmarker=None
+  devel-warn: config item requires an explicit default value: 'hooks..*' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  hooks..*=None
+  paths..*=None
+  paths.default=None
+  paths.default-push=None
+  share.pool=None
+  share.poolnaming=identity
+  commands.commit.interactive.noprefix=False
+  commands.commit.interactive.nodates=False
+  commands.resolve.explicit-re-merge=False
+  commands.resolve.mark-check=none
+  commands.status.terse=
+  commands.commit.post-status=False
+  commands.commit.interactive.ignorews=False
+  commands.revert.interactive.ignorewseol=False
+  commands.revert.interactive.showfunc=False
+  commands.update.check=None
+  commands.commit.interactive.ignorewsamount=False
+  commands.resolve.confirm=False
+  commands.status.verbose=False
+  commands.commit.interactive.word-diff=False
+  commands.commit.interactive.nobinary=False
+  commands.grep.all-files=False
+  commands.commit.interactive.git=False
+  commands.revert.interactive.noprefix=False
+  commands.status.relative=False
+  commands.revert.interactive.word-diff=False
+  commands.show.aliasprefix=[]
+  commands.update.requiredest=False
+  commands.revert.interactive.nobinary=False
+  commands.commit.interactive.ignoreblanklines=False
+  commands.revert.interactive.unified=None
+  commands.revert.interactive.nodates=False
+  commands.revert.interactive.ignorewsamount=False
+  commands.commit.interactive.unified=None
+  commands.commit.interactive.ignorewseol=False
+  commands.revert.interactive.git=False
+  commands.status.skipstates=[]
+  commands.revert.interactive.ignoreblanklines=False
+  commands.commit.interactive.showfunc=False
+  commands.revert.interactive.ignorews=False
+  commands.rebase.requiredest=False
+  committemplate..*=None
+  merge-tools..*\.premerge$=None
+  merge-tools..*\.executable$=None
+  merge-tools..*\.symlink$=None
+  merge-tools..*\.fixeol$=None
+  merge-tools..*=None
+  merge-tools..*\.gui$=None
+  merge-tools..*\.priority$=None
+  merge-tools..*\.mergemarkertemplate$=None
+  merge-tools..*\.mergemarkers$=None
+  merge-tools..*\.args$=None
+  merge-tools..*\.binary$=None
+  merge-tools..*\.check$=None
+  merge-tools..*\.checkchanged$=None
+  bundle.mainreporoot=$TESTTMP
+  server.preferuncompressed=False
+  server.validate=False
+  server.bundle1=True
+  server.maxhttpheaderlen=1024
+  server.streamunbundle=False
+  server.zliblevel=-1
+  server.pullbundle=False
+  server.bundle1gd.push=None
+  server.bundle1.push=None
+  server.uncompressed=True
+  server.bundle1gd=None
+  server.disablefullbundle=False
+  server.compressionengines=[]
+  server.bundle2.stream=True
+  server.concurrent-push-mode=strict
+  server.bundle1.pull=None
+  server.view=served
+  server.bundle1gd.pull=None
+  server.zstdlevel=3
+  server.uncompressedallowsecret=False
+  server.bookmarks-pushkey-compat=True
+  convert.cvsps.fuzz=60
+  convert.skiptags=False
+  convert.git.extrakeys=[]
+  devel-warn: config item requires an explicit default value: 'convert.p4.encoding' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  convert.p4.encoding=None
+  convert.svn.startrev=0
+  convert.svn.debugsvnlog=True
+  convert.p4.startrev=0
+  convert.hg.sourcename=None
+  convert.git.committeractions=['messagedifferent']
+  convert.cvsps.logencoding=None
+  convert.git.remoteprefix=remote
+  convert.git.findcopiesharder=False
+  convert.svn.tags=None
+  convert.bzr.saverev=True
+  convert.hg.revs=None
+  convert.git.similarity=50
+  convert.git.renamelimit=400
+  convert.git.saverev=True
+  convert.hg.ignoreerrors=False
+  convert.git.skipsubmodules=False
+  convert.ignoreancestorcheck=False
+  convert.hg.usebranchnames=True
+  convert.hg.startrev=None
+  convert.hg.tagsbranch=default
+  convert.hg.saverev=False
+  convert.svn.trunk=None
+  convert.svn.branches=None
+  convert.cvsps.mergeto=None
+  convert.hg.clonebranches=False
+  convert.localtimezone=False
+  convert.cvsps.cache=True
+  convert.cvsps.mergefrom=None
+  convert.hg.preserve-hash=False
+  annotate.nobinary=False
+  annotate.ignoreblanklines=False
+  annotate.ignorewsamount=False
+  annotate.git=False
+  annotate.nodates=False
+  annotate.ignorews=False
+  annotate.word-diff=False
+  annotate.ignorewseol=False
+  annotate.showfunc=False
+  annotate.noprefix=False
+  annotate.unified=None
+  rebase.singletransaction=False
+  rebase.experimental.inmemory=False
+  http.timeout=None
+  logtoprocess.command=None
+  logtoprocess.develwarn=None
+  logtoprocess.commandexception=None
+  logtoprocess.uiblocked=None
+  logtoprocess.commandfinish=None
+  devel-warn: accessing unregistered config item: 'help.hidden-command\..*' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  help.hidden-command\..*=<object object at 0x7f2adc19b0e0>
+  devel-warn: accessing unregistered config item: 'help.hidden-topic\..*' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  help.hidden-topic\..*=<object object at 0x7f2adc19b0e0>
+  experimental.hook-track-tags=False
+  experimental.evolution.effect-flags=True
+  experimental.bundle2.pushback=False
+  experimental.mmapindexthreshold=None
+  experimental.evolution=[]
+  experimental.update.atomic-file=False
+  experimental.clientcompressionengines=[]
+  experimental.evolution.allowdivergence=False
+  experimental.copytrace=on
+  experimental.web.api.http-v2=False
+  experimental.bundlecomplevel=None
+  experimental.httppeer.advertise-v2=False
+  experimental.sparse-read.density-threshold=0.5
+  experimental.editortmpinhg=False
+  experimental.httppeer.v2-encoder-order=None
+  experimental.graphshorten=False
+  experimental.httppostargs=False
+  experimental.server.stream-narrow-clones=False
+  experimental.changegroup3=False
+  experimental.directaccess=False
+  experimental.worker.wdir-get-thread-safe=False
+  experimental.server.manifestdata.recommended-batch-size=100000
+  experimental.extendedheader.index=None
+  experimental.copytrace.sourcecommitlimit=100
+  experimental.sshserver.support-v2=False
+  experimental.obsmarkers-exchange-debug=False
+  experimental.bundle2-output-capture=False
+  devel-warn: config item requires an explicit default value: 'experimental.archivemetatemplate' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  experimental.archivemetatemplate=None
+  experimental.cleanup-as-archived=False
+  experimental.nonnormalparanoidcheck=False
+  experimental.evolution.exchange=None
+  experimental.log.topo=False
+  experimental.bundlecomplevel.zstd=None
+  experimental.exportableenviron=[]
+  experimental.revlogv2=None
+  experimental.crecordtest=None
+  experimental.web.apiserver=False
+  experimental.copies.write-to=filelog-only
+  experimental.extendedheader.similarity=False
+  experimental.bundle2-advertise=True
+  experimental.copies.read-from=filelog-only
+  experimental.merge.checkpathconflicts=False
+  experimental.removeemptydirs=True
+  experimental.auto-publish=publish
+  experimental.xdiff=False
+  experimental.single-head-per-branch=False
+  experimental.mergedriver=None
+  experimental.revert.interactive.select-to-keep=False
+  experimental.web.api.debugreflect=False
+  devel-warn: config item requires an explicit default value: 'experimental.graphstyle.missing' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  experimental.graphstyle.missing=None
+  devel-warn: config item requires an explicit default value: 'experimental.graphstyle.parent' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  experimental.graphstyle.parent=None
+  experimental.copytrace.movecandidateslimit=100
+  experimental.directaccess.revnums=False
+  experimental.evolution.createmarkers=None
+  experimental.nointerrupt-interactiveonly=True
+  experimental.server.filesdata.recommended-batch-size=50000
+  experimental.sshpeer.advertise-v2=False
+  experimental.sparse-read=False
+  experimental.revisions.disambiguatewithin=None
+  experimental.evolution.allowunstable=None
+  experimental.bundle2lazylocking=False
+  experimental.evolution.report-instabilities=True
+  experimental.bundlecomplevel.bzip2=None
+  devel-warn: config item requires an explicit default value: 'experimental.graphstyle.grandparent' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  experimental.graphstyle.grandparent=None
+  experimental.bundle-phases=False
+  experimental.remotenames=False
+  experimental.nointerrupt=False
+  experimental.narrow=False
+  experimental.evolution.bundle-obsmarker=False
+  experimental.sparse-read.min-gap-size=65K
+  experimental.extra-filter-revs=None
+  experimental.maxdeltachainspan=-1
+  experimental.evolution.track-operation=True
+  experimental.treemanifest=False
+  experimental.rebaseskipobsolete=True
+  experimental.mergetempdirprefix=None
+  experimental.bundlecomplevel.none=None
+  experimental.revisions.prefixhexnode=False
+  experimental.bundlecomplevel.gzip=None
+  phases.new-commit=draft
+  phases.checksubrepos=follow
+  phases.publish=True
+  patch.fuzz=2
+  patch.eol=strict
+  color..*=None
+  devel-warn: config item requires an explicit default value: 'color.pagermode' at: /tmp/hgtests.Ps_zAY/install/lib/python/mercurial/commands.py:1876 (config)
+  color.pagermode=None
+  color.mode=auto
+  censor.policy=abort
+  extensions..*=None
+  verify.skipflags=None
+  auth.cookiefile=None
+  hostfingerprints..*=[]
+  http_proxy.user=None
+  http_proxy.host=None
+  http_proxy.no=[]
+  http_proxy.passwd=None
+  http_proxy.always=False
diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -818,6 +818,13 @@ 
             for name, value in self.configitems(section, untrusted):
                 yield section, name, value
 
+    def walkallconfig(self, untrusted=False):
+        """walk through all known config options in the registrar"""
+        for section in self._knownconfig:
+            for name, item in self._knownconfig[section].iteritems():
+                value = self._config(section, name, untrusted=untrusted)
+                yield section, name, value
+
     def plain(self, feature=None):
         '''is plain mode active?
 
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1771,7 +1771,8 @@ 
                unknown=True, subrepos=opts.get('subrepos'))
 
 @command('config|showconfig|debugconfig',
-    [('u', 'untrusted', None, _('show untrusted configuration options')),
+    [('a', 'all', None, _('show all known configuration options')),
+     ('u', 'untrusted', None, _('show untrusted configuration options')),
      ('e', 'edit', None, _('edit user config')),
      ('l', 'local', None, _('edit repository config')),
      ('g', 'global', None, _('edit global config'))] + formatteropts,
@@ -1869,7 +1870,10 @@ 
     selentries = set(selentries)
 
     matched = False
-    for section, name, value in ui.walkconfig(untrusted=untrusted):
+    walkconfig = ui.walkconfig(untrusted=untrusted)
+    if opts.get('all'):
+        walkconfig = ui.walkallconfig(untrusted=untrusted)
+    for section, name, value in walkconfig:
         source = ui.configsource(section, name, untrusted)
         value = pycompat.bytestr(value)
         defaultvalue = pycompat.bytestr(ui.configdefault(section, name))