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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
60 messages Options
123
Reply | Threaded
Open this post in threaded view
|

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

martinvonz (Martin von Zweigbergk)
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
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

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

martinvonz (Martin von Zweigbergk)
navaneeth.suresh updated this revision to Diff 16114.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16113&id=16114

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

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

AFFECTED FILES
  mercurial/commands.py
  mercurial/ui.py
  tests/test-completion.t
  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/tests/test-completion.t b/tests/test-completion.t
--- a/tests/test-completion.t
+++ b/tests/test-completion.t
@@ -252,7 +252,7 @@
   cat: output, rev, decode, include, exclude, template
   clone: noupdate, updaterev, rev, branch, pull, uncompressed, stream, ssh, remotecmd, insecure
   commit: addremove, close-branch, amend, secret, edit, force-close-branch, interactive, include, exclude, message, logfile, date, user, subrepos
-  config: untrusted, edit, local, global, template
+  config: all, untrusted, edit, local, global, template
   continue: dry-run
   copy: after, force, include, exclude, dry-run
   debugancestor:
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
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

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

martinvonz (Martin von Zweigbergk)
In reply to this post by martinvonz (Martin von Zweigbergk)
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
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

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

martinvonz (Martin von Zweigbergk)
In reply to this post by martinvonz (Martin von Zweigbergk)
navaneeth.suresh updated this revision to Diff 16117.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16114&id=16117

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

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

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

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

martinvonz (Martin von Zweigbergk)
In reply to this post by martinvonz (Martin von Zweigbergk)
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
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

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

Pierre-Yves David-2
In reply to this post by martinvonz (Martin von Zweigbergk)
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
> [hidden email]
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>

--
Pierre-Yves David
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

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

martinvonz (Martin von Zweigbergk)
In reply to this post by martinvonz (Martin von Zweigbergk)
navaneeth.suresh retitled this revision from "config: add --all flag to show all known configs" to "config: add --registered flag to show all known configs".
navaneeth.suresh edited the summary of this revision.
navaneeth.suresh marked an inline comment as done.
navaneeth.suresh updated this revision to Diff 16119.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16117&id=16119

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

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

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

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

martinvonz (Martin von Zweigbergk)
In reply to this post by martinvonz (Martin von Zweigbergk)
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
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

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

martinvonz (Martin von Zweigbergk)
In reply to this post by martinvonz (Martin von Zweigbergk)
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
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

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

martinvonz (Martin von Zweigbergk)
In reply to this post by martinvonz (Martin von Zweigbergk)
navaneeth.suresh updated this revision to Diff 16153.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16119&id=16153

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

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

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



To: navaneeth.suresh, #hg-reviewers, av6, marmoute
Cc: pulkit, marmoute, av6, mjpieters, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

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

martinvonz (Martin von Zweigbergk)
In reply to this post by martinvonz (Martin von Zweigbergk)
navaneeth.suresh updated this revision to Diff 16154.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16153&id=16154

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

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

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



To: navaneeth.suresh, #hg-reviewers, av6, marmoute
Cc: pulkit, marmoute, av6, mjpieters, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

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

martinvonz (Martin von Zweigbergk)
In reply to this post by martinvonz (Martin von Zweigbergk)
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
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

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

martinvonz (Martin von Zweigbergk)
In reply to this post by martinvonz (Martin von Zweigbergk)
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
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

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

martinvonz (Martin von Zweigbergk)
In reply to this post by martinvonz (Martin von Zweigbergk)
navaneeth.suresh updated this revision to Diff 16164.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16154&id=16164

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

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

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



To: navaneeth.suresh, #hg-reviewers, av6, marmoute
Cc: pulkit, marmoute, av6, mjpieters, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

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

martinvonz (Martin von Zweigbergk)
In reply to this post by martinvonz (Martin von Zweigbergk)
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
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

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

martinvonz (Martin von Zweigbergk)
In reply to this post by martinvonz (Martin von Zweigbergk)
navaneeth.suresh updated this revision to Diff 16165.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16164&id=16165

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

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

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



To: navaneeth.suresh, #hg-reviewers, av6, marmoute
Cc: pulkit, marmoute, av6, mjpieters, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

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

martinvonz (Martin von Zweigbergk)
In reply to this post by martinvonz (Martin von Zweigbergk)
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
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

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

martinvonz (Martin von Zweigbergk)
In reply to this post by martinvonz (Martin von Zweigbergk)
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
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

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

martinvonz (Martin von Zweigbergk)
In reply to this post by martinvonz (Martin von Zweigbergk)
navaneeth.suresh updated this revision to Diff 16167.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6709?vs=16165&id=16167

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

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

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



To: navaneeth.suresh, #hg-reviewers, av6, marmoute
Cc: pulkit, marmoute, av6, mjpieters, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

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

martinvonz (Martin von Zweigbergk)
In reply to this post by martinvonz (Martin von Zweigbergk)
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
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
123