navaneeth.suresh updated this revision to Diff 16218.

REPOSITORY
  rHG Mercurial

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

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-basic.t
  tests/test-completion.t
  tests/test-config.t
  tests/test-hgrc.t

CHANGE DETAILS

diff --git a/tests/test-hgrc.t b/tests/test-hgrc.t
--- a/tests/test-hgrc.t
+++ b/tests/test-hgrc.t
@@ -80,9 +80,9 @@
 
   $ hg showconfig --config ui.verbose=True --quiet
   bundle.mainreporoot=$TESTTMP
-  ui.verbose=False
-  ui.debug=False
-  ui.quiet=True
+  ui.verbose=no
+  ui.debug=no
+  ui.quiet=yes
 
   $ touch foobar/untracked
   $ cat >> foobar/.hg/hgrc <<EOF
@@ -160,12 +160,12 @@
   $TESTTMP/hgrc:13: alias.log=log -g
   repo: bundle.mainreporoot=$TESTTMP
   $TESTTMP/hgrc:11: defaults.identify=-n
-  $TESTTMP/hgrc:2: ui.debug=true
+  $TESTTMP/hgrc:2: ui.debug=yes
   $TESTTMP/hgrc:3: ui.fallbackencoding=ASCII
-  $TESTTMP/hgrc:4: ui.quiet=true
-  $TESTTMP/hgrc:5: ui.slash=true
-  $TESTTMP/hgrc:6: ui.traceback=true
-  $TESTTMP/hgrc:7: ui.verbose=true
+  $TESTTMP/hgrc:4: ui.quiet=yes
+  $TESTTMP/hgrc:5: ui.slash=yes
+  $TESTTMP/hgrc:6: ui.traceback=yes
+  $TESTTMP/hgrc:7: ui.verbose=yes
   $TESTTMP/hgrc:8: ui.style=~/.hgstyle
   $TESTTMP/hgrc:9: ui.logtemplate={node}
 
@@ -175,10 +175,10 @@
   $ hg showconfig --config ui.traceback=True --debug
   read config from: $TESTTMP/hgrc
   repo: bundle.mainreporoot=$TESTTMP
-  --config: ui.traceback=True
-  --verbose: ui.verbose=False
-  --debug: ui.debug=True
-  --quiet: ui.quiet=False
+  --config: ui.traceback=yes
+  --verbose: ui.verbose=no
+  --debug: ui.debug=yes
+  --quiet: ui.quiet=no
 
 with environment variables
 
@@ -190,9 +190,9 @@
   repo: bundle.mainreporoot=$TESTTMP
   $PAGER: pager.pager=p1
   $VISUAL: ui.editor=e2
-  --verbose: ui.verbose=False
-  --debug: ui.debug=True
-  --quiet: ui.quiet=False
+  --verbose: ui.verbose=no
+  --debug: ui.debug=yes
+  --quiet: ui.quiet=no
 
 plain mode with exceptions
 
@@ -212,30 +212,30 @@
   read config from: $TESTTMP/hgrc
   repo: bundle.mainreporoot=$TESTTMP
   $TESTTMP/hgrc:15: extensions.plain=./plain.py
-  --config: ui.traceback=True
-  --verbose: ui.verbose=False
-  --debug: ui.debug=True
-  --quiet: ui.quiet=False
+  --config: ui.traceback=yes
+  --verbose: ui.verbose=no
+  --debug: ui.debug=yes
+  --quiet: ui.quiet=no
   $ unset HGPLAIN
   $ hg showconfig --config ui.traceback=True --debug
   plain: True
   read config from: $TESTTMP/hgrc
   repo: bundle.mainreporoot=$TESTTMP
   $TESTTMP/hgrc:15: extensions.plain=./plain.py
-  --config: ui.traceback=True
-  --verbose: ui.verbose=False
-  --debug: ui.debug=True
-  --quiet: ui.quiet=False
+  --config: ui.traceback=yes
+  --verbose: ui.verbose=no
+  --debug: ui.debug=yes
+  --quiet: ui.quiet=no
   $ HGPLAINEXCEPT=i18n; export HGPLAINEXCEPT
   $ hg showconfig --config ui.traceback=True --debug
   plain: True
   read config from: $TESTTMP/hgrc
   repo: bundle.mainreporoot=$TESTTMP
   $TESTTMP/hgrc:15: extensions.plain=./plain.py
-  --config: ui.traceback=True
-  --verbose: ui.verbose=False
-  --debug: ui.debug=True
-  --quiet: ui.quiet=False
+  --config: ui.traceback=yes
+  --verbose: ui.verbose=no
+  --debug: ui.debug=yes
+  --quiet: ui.quiet=no
 
 source of paths is not mangled
 
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,737 @@
   > 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: )
+  chgserver.idletimeout=3600
+  chgserver.skiphash=no
+  cmdserver.log=None
+  cmdserver.max-log-files=7
+  cmdserver.max-log-size=1 MB
+  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.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.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.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
+  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.dotencode=yes
+  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.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
+  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
+  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.discovery.randomize=yes
+  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
+
+  $ 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/tests/test-basic.t b/tests/test-basic.t
--- a/tests/test-basic.t
+++ b/tests/test-basic.t
@@ -2,18 +2,18 @@
 
 #if no-extraextensions
   $ hg config
-  devel.all-warnings=true
+  devel.all-warnings=yes
   devel.default-date=0 0
   extensions.fsmonitor= (fsmonitor !)
   largefiles.usercache=$TESTTMP/.cache/largefiles
   lfs.usercache=$TESTTMP/.cache/lfs
-  ui.slash=True
-  ui.interactive=False
+  ui.slash=yes
+  ui.interactive=no
   ui.merge=internal:merge
   ui.mergemarkers=detailed
-  ui.promptecho=True
+  ui.promptecho=yes
   web.address=localhost
-  web\.ipv6=(?:True|False) (re)
+  web.ipv6=no
   web.server-header=testing stub value
 #endif
 
diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -820,6 +820,22 @@
             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"""
+        sectionignore = ['debug', 'devel', 'experimental']
+        for section, data in sorted(self._knownconfig.iteritems()):
+            for name, item in sorted(data.iteritems()):
+                if ((item.default is configitems.dynamicdefault or
+                     item.generic) or (section in sectionignore or
+                     item.experimental) and not self.verbose):
+                    # Omit config items with dynamicdefault, devel,
+                    # experimental and generic config opts.
+                    continue
+                value = self._config(section, name, untrusted=untrusted)
+                if value and isinstance(value, list):
+                    value = ' '.join(value)
+                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, pycompat.bytestr(defaultvalue))
+            else:
+                fm.write('name value', '%s=%s\n', entryname, value)
         matched = True
     fm.end()
     if matched:



To: navaneeth.suresh, #hg-reviewers, av6, marmoute, durin42
Cc: durin42, mharbison72, yuja, pulkit, marmoute, av6, mjpieters, 
mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to