Patchwork D6963: config: show config options in a user-friendly format

login
register
mail settings
Submitter phabricator
Date Oct. 4, 2019, 7:24 p.m.
Message ID <differential-rev-PHID-DREV-35xx7ndwr2uhrxek3iuu-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/41958/
State New
Headers show

Comments

phabricator - Oct. 4, 2019, 7:24 p.m.
navaneeth.suresh created this revision.
Herald added subscribers: mercurial-devel, mjpieters.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This patch does the following things to display the output in a
  user-friendly format:
  
  - Replace bool by yes/no.
  - Converts list to string.
  
  I will be modifying this soon to handle list values in a better way.

REPOSITORY
  rHG Mercurial

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

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

CHANGE DETAILS




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

Patch

diff --git a/tests/test-config.t b/tests/test-config.t
--- a/tests/test-config.t
+++ b/tests/test-config.t
@@ -228,125 +228,125 @@ 
 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.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=False
+  annotate.word-diff=no
   auth.cookiefile=None
-  bookmarks.pushing=[]
+  bookmarks.pushing=
   bundle.mainreporoot=$TESTTMP
   chgserver.idletimeout=3600
-  chgserver.skiphash=False
+  chgserver.skiphash=no
   cmdserver.log=None
   cmdserver.max-log-files=7
   cmdserver.max-log-size=1 MB
-  cmdserver.track-log=[b'chgserver', b'cmdserver', b'repocache']
+  cmdserver.track-log=chgserver cmdserver repocache
   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.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=False
-  commands.commit.post-status=False
-  commands.rebase.requiredest=False
-  commands.resolve.confirm=False
-  commands.resolve.explicit-re-merge=False
+  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=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.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=False
-  commands.show.aliasprefix=[]
-  commands.status.relative=False
+  commands.revert.interactive.word-diff=no
+  commands.show.aliasprefix=
+  commands.status.relative=no
   commands.status.terse=
-  commands.status.verbose=False
+  commands.status.verbose=no
   commands.update.check=None
-  commands.update.requiredest=False
-  convert.bzr.saverev=True
-  convert.cvsps.cache=True
+  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=[b'messagedifferent']
-  convert.git.extrakeys=[]
-  convert.git.findcopiesharder=False
+  convert.git.committeractions=messagedifferent
+  convert.git.extrakeys=
+  convert.git.findcopiesharder=no
   convert.git.remoteprefix=remote
   convert.git.renamelimit=400
-  convert.git.saverev=True
+  convert.git.saverev=yes
   convert.git.similarity=50
-  convert.git.skipsubmodules=False
-  convert.hg.clonebranches=False
-  convert.hg.ignoreerrors=False
-  convert.hg.preserve-hash=False
+  convert.git.skipsubmodules=no
+  convert.hg.clonebranches=no
+  convert.hg.ignoreerrors=no
+  convert.hg.preserve-hash=no
   convert.hg.revs=None
-  convert.hg.saverev=False
+  convert.hg.saverev=no
   convert.hg.sourcename=None
   convert.hg.startrev=None
   convert.hg.tagsbranch=default
-  convert.hg.usebranchnames=True
-  convert.localtimezone=False
+  convert.hg.usebranchnames=yes
+  convert.localtimezone=no
   convert.p4.startrev=0
-  convert.skiptags=False
+  convert.skiptags=no
   convert.svn.branches=None
-  convert.svn.debugsvnlog=True
+  convert.svn.debugsvnlog=yes
   convert.svn.startrev=0
   convert.svn.tags=None
   convert.svn.trunk=None
-  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.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=False
+  diff.word-diff=no
   email.bcc=None
   email.cc=None
-  email.charsets=[]
+  email.charsets=
   email.from=None
   email.method=smtp
   email.reply-to=None
   email.to=None
-  format.bookmarks-in-store=False
-  format.dotencode=True
+  format.bookmarks-in-store=no
+  format.dotencode=yes
   format.obsstore-version=None
   format.revlog-compression=$BUNDLE2_COMPRESSIONS$
-  format.sparse-revlog=True
-  format.usefncache=True
-  format.usegeneraldelta=True
-  format.usestore=True
+  format.sparse-revlog=yes
+  format.usefncache=yes
+  format.usegeneraldelta=yes
+  format.usestore=yes
   fsmonitor.warn_update_file_count=50000
-  fsmonitor.warn_when_unused=True
+  fsmonitor.warn_when_unused=yes
   hostsecurity.ciphers=None
-  hostsecurity.disabletls10warning=False
+  hostsecurity.disabletls10warning=no
   http.timeout=None
-  http_proxy.always=False
+  http_proxy.always=no
   http_proxy.host=None
-  http_proxy.no=[]
+  http_proxy.no=
   http_proxy.passwd=None
   http_proxy.user=None
   logtoprocess.command=None
@@ -356,60 +356,60 @@ 
   logtoprocess.uiblocked=None
   merge.checkignored=abort
   merge.checkunknown=abort
-  merge.followcopies=True
+  merge.followcopies=yes
   merge.on-failure=continue
-  merge.strict-capability-check=False
-  pager.ignore=[]
+  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=True
-  profiling.enabled=False
+  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=True
+  profiling.showtime=yes
   profiling.sort=inlinetime
   profiling.statformat=hotpath
   profiling.type=stat
-  progress.assume-tty=False
+  progress.assume-tty=no
   progress.changedelay=1
-  progress.clear-complete=True
-  progress.debug=False
+  progress.clear-complete=yes
+  progress.debug=no
   progress.delay=3
-  progress.disable=False
+  progress.disable=no
   progress.estimateinterval=60.0
-  progress.format=[b'topic', b'bar', b'number', b'estimate']
+  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
+  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=True
-  server.compressionengines=[]
+  server.bundle2.stream=yes
+  server.compressionengines=
   server.concurrent-push-mode=strict
-  server.disablefullbundle=False
+  server.disablefullbundle=no
   server.maxhttpheaderlen=1024
-  server.preferuncompressed=False
-  server.pullbundle=False
-  server.streamunbundle=False
-  server.uncompressed=True
-  server.uncompressedallowsecret=False
-  server.validate=False
+  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
@@ -421,98 +421,98 @@ 
   smtp.password=None
   smtp.tls=none
   smtp.username=None
-  storage.revlog.optimize-delta-parent-choice=True
-  storage.revlog.reuse-external-delta=True
+  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=False
-  ui.allowemptycommit=False
-  ui.archivemeta=True
-  ui.askusername=False
-  ui.clonebundlefallback=False
-  ui.clonebundleprefers=[]
-  ui.clonebundles=True
+  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=False
-  ui.debug=False
+  ui.commitsubrepos=no
+  ui.debug=no
   ui.debugger=None
   ui.fallbackencoding=None
   ui.forcecwd=None
   ui.forcemerge=None
-  ui.formatdebug=False
-  ui.formatjson=False
+  ui.formatdebug=no
+  ui.formatjson=no
   ui.formatted=None
   ui.graphnodetemplate=None
-  ui.interactive=False
+  ui.interactive=no
   ui.interface=None
   ui.interface.chunkselector=None
   ui.large-file-limit=10000000
-  ui.logblockedtimes=False
+  ui.logblockedtimes=no
   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.nontty=no
   ui.origbackuppath=None
-  ui.paginate=True
+  ui.paginate=yes
   ui.patch=None
   ui.portablefilenames=warn
   ui.pre-merge-tool-output-template=None
-  ui.promptecho=True
-  ui.quiet=False
-  ui.quietbookmarkmove=False
+  ui.promptecho=yes
+  ui.quiet=no
+  ui.quietbookmarkmove=no
   ui.relative-paths=legacy
   ui.remotecmd=hg
-  ui.report_untrusted=True
-  ui.rollback=True
-  ui.signal-safe-lock=True
-  ui.slash=True
+  ui.report_untrusted=yes
+  ui.rollback=yes
+  ui.signal-safe-lock=yes
+  ui.slash=yes
   ui.ssh=ssh
   ui.ssherrorhint=None
-  ui.statuscopies=False
-  ui.strict=False
+  ui.statuscopies=no
+  ui.strict=no
   ui.style=
   ui.supportcontact=None
   ui.textwidth=78
   ui.timeout=600
   ui.timeout.warn=0
-  ui.traceback=False
-  ui.tweakdefaults=False
+  ui.traceback=no
+  ui.tweakdefaults=no
   ui.username=None
-  ui.verbose=False
+  ui.verbose=no
   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.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=True
+  web.cache=yes
   web.certificate=None
-  web.collapse=False
+  web.collapse=no
   web.comparisoncontext=5
   web.contact=None
   web.csp=None
-  web.deny_push=[]
-  web.deny_read=[]
-  web.descend=True
+  web.deny_push=
+  web.deny_read=
+  web.descend=yes
   web.description=
   web.encoding=ascii
   web.errorlog=-
-  web.guessmime=False
-  web.hidden=False
-  web.ipv6=False
-  web.labels=[]
+  web.guessmime=no
+  web.hidden=no
+  web.ipv6=no
+  web.labels=
   web.logoimg=hglogo.png
   web.logourl=https://mercurial-scm.org/
   web.maxchanges=10
@@ -521,7 +521,7 @@ 
   web.motd=
   web.port=8000
   web.prefix=
-  web.push_ssl=True
+  web.push_ssl=yes
   web.refreshinterval=20
   web.server-header=testing stub value
   web.static=None
@@ -532,238 +532,238 @@ 
   worker.backgroundclosemaxqueue=384
   worker.backgroundcloseminfilecount=2048
   worker.backgroundclosethreadcount=4
-  worker.enabled=True
+  worker.enabled=yes
   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.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=False
+  annotate.word-diff=no
   auth.cookiefile=None
-  bookmarks.pushing=[]
+  bookmarks.pushing=
   bundle.mainreporoot=$TESTTMP
   censor.policy=abort
   chgserver.idletimeout=3600
-  chgserver.skiphash=False
+  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=[b'chgserver', b'cmdserver', b'repocache']
+  cmdserver.message-encodings=
+  cmdserver.track-log=chgserver cmdserver repocache
   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.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=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.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=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.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=False
-  commands.show.aliasprefix=[]
-  commands.status.relative=False
-  commands.status.skipstates=[]
+  commands.revert.interactive.word-diff=no
+  commands.show.aliasprefix=
+  commands.status.relative=no
+  commands.status.skipstates=
   commands.status.terse=
-  commands.status.verbose=False
+  commands.status.verbose=no
   commands.update.check=None
-  commands.update.requiredest=False
-  convert.bzr.saverev=True
-  convert.cvsps.cache=True
+  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=[b'messagedifferent']
-  convert.git.extrakeys=[]
-  convert.git.findcopiesharder=False
+  convert.git.committeractions=messagedifferent
+  convert.git.extrakeys=
+  convert.git.findcopiesharder=no
   convert.git.remoteprefix=remote
   convert.git.renamelimit=400
-  convert.git.saverev=True
+  convert.git.saverev=yes
   convert.git.similarity=50
-  convert.git.skipsubmodules=False
-  convert.hg.clonebranches=False
-  convert.hg.ignoreerrors=False
-  convert.hg.preserve-hash=False
+  convert.git.skipsubmodules=no
+  convert.hg.clonebranches=no
+  convert.hg.ignoreerrors=no
+  convert.hg.preserve-hash=no
   convert.hg.revs=None
-  convert.hg.saverev=False
+  convert.hg.saverev=no
   convert.hg.sourcename=None
   convert.hg.startrev=None
   convert.hg.tagsbranch=default
-  convert.hg.usebranchnames=True
-  convert.ignoreancestorcheck=False
-  convert.localtimezone=False
+  convert.hg.usebranchnames=yes
+  convert.ignoreancestorcheck=no
+  convert.localtimezone=no
   convert.p4.startrev=0
-  convert.skiptags=False
+  convert.skiptags=no
   convert.svn.branches=None
-  convert.svn.debugsvnlog=True
+  convert.svn.debugsvnlog=yes
   convert.svn.startrev=0
   convert.svn.tags=None
   convert.svn.trunk=None
   debug.dirstate.delaywrite=0
-  devel.all-warnings=true
+  devel.all-warnings=yes
   devel.bundle.delta=
-  devel.bundle2.debug=False
+  devel.bundle2.debug=no
   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.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
-  devel.deprec-warn=False
-  devel.disableloaddefaultcerts=False
-  devel.discovery.randomize=True
-  devel.legacy.exchange=[]
+  devel.deprec-warn=no
+  devel.disableloaddefaultcerts=no
+  devel.discovery.randomize=yes
+  devel.legacy.exchange=
   devel.servercafile=
   devel.serverexactprotocol=
-  devel.serverrequirecert=False
-  devel.strip-obsmarkers=True
+  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=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
+  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=False
+  diff.word-diff=no
   email.bcc=None
   email.cc=None
-  email.charsets=[]
+  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.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=False
-  experimental.cleanup-as-archived=False
-  experimental.clientcompressionengines=[]
+  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=False
-  experimental.directaccess.revnums=False
-  experimental.editortmpinhg=False
-  experimental.evolution=[]
-  experimental.evolution.allowdivergence=False
+  experimental.directaccess=no
+  experimental.directaccess.revnums=no
+  experimental.editortmpinhg=no
+  experimental.evolution=
+  experimental.evolution.allowdivergence=no
   experimental.evolution.allowunstable=None
-  experimental.evolution.bundle-obsmarker=False
+  experimental.evolution.bundle-obsmarker=no
   experimental.evolution.createmarkers=None
-  experimental.evolution.effect-flags=True
+  experimental.evolution.effect-flags=yes
   experimental.evolution.exchange=None
-  experimental.evolution.report-instabilities=True
-  experimental.evolution.track-operation=True
-  experimental.exportableenviron=[]
+  experimental.evolution.report-instabilities=yes
+  experimental.evolution.track-operation=yes
+  experimental.exportableenviron=
   experimental.extendedheader.index=None
-  experimental.extendedheader.similarity=False
+  experimental.extendedheader.similarity=no
   experimental.extra-filter-revs=None
-  experimental.graphshorten=False
-  experimental.hook-track-tags=False
-  experimental.httppeer.advertise-v2=False
+  experimental.graphshorten=no
+  experimental.hook-track-tags=no
+  experimental.httppeer.advertise-v2=no
   experimental.httppeer.v2-encoder-order=None
-  experimental.httppostargs=False
-  experimental.log.topo=False
+  experimental.httppostargs=no
+  experimental.log.topo=no
   experimental.maxdeltachainspan=-1
-  experimental.merge.checkpathconflicts=False
+  experimental.merge.checkpathconflicts=no
   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.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=False
+  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=False
-  experimental.single-head-per-branch=False
-  experimental.sparse-read=False
+  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=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
-  format.bookmarks-in-store=False
+  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=True
-  format.generaldelta=False
-  format.internal-phase=False
+  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=True
-  format.usefncache=True
-  format.usegeneraldelta=True
-  format.usestore=True
+  format.sparse-revlog=yes
+  format.usefncache=yes
+  format.usegeneraldelta=yes
+  format.usestore=yes
   fsmonitor.warn_update_file_count=50000
-  fsmonitor.warn_when_unused=True
+  fsmonitor.warn_when_unused=yes
   hostsecurity.ciphers=None
-  hostsecurity.disabletls10warning=False
+  hostsecurity.disabletls10warning=no
   http.timeout=None
-  http_proxy.always=False
+  http_proxy.always=no
   http_proxy.host=None
-  http_proxy.no=[]
+  http_proxy.no=
   http_proxy.passwd=None
   http_proxy.user=None
   logtoprocess.command=None
@@ -773,61 +773,61 @@ 
   logtoprocess.uiblocked=None
   merge.checkignored=abort
   merge.checkunknown=abort
-  merge.followcopies=True
+  merge.followcopies=yes
   merge.on-failure=continue
-  merge.preferancestor=[b'*']
-  merge.strict-capability-check=False
-  pager.ignore=[]
+  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=True
-  profiling.enabled=False
+  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=True
+  profiling.showtime=yes
   profiling.sort=inlinetime
   profiling.statformat=hotpath
   profiling.type=stat
-  progress.assume-tty=False
+  progress.assume-tty=no
   progress.changedelay=1
-  progress.clear-complete=True
-  progress.debug=False
+  progress.clear-complete=yes
+  progress.debug=no
   progress.delay=3
-  progress.disable=False
+  progress.disable=no
   progress.estimateinterval=60.0
-  progress.format=[b'topic', b'bar', b'number', b'estimate']
+  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
+  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=True
-  server.compressionengines=[]
+  server.bundle2.stream=yes
+  server.compressionengines=
   server.concurrent-push-mode=strict
-  server.disablefullbundle=False
+  server.disablefullbundle=no
   server.maxhttpheaderlen=1024
-  server.preferuncompressed=False
-  server.pullbundle=False
-  server.streamunbundle=False
-  server.uncompressed=True
-  server.uncompressedallowsecret=False
-  server.validate=False
+  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
@@ -839,100 +839,100 @@ 
   smtp.password=None
   smtp.tls=none
   smtp.username=None
-  sparse.missingwarning=True
+  sparse.missingwarning=yes
   storage.new-repo-backend=revlogv1
-  storage.revlog.optimize-delta-parent-choice=True
-  storage.revlog.reuse-external-delta=True
+  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=False
-  ui.allowemptycommit=False
-  ui.archivemeta=True
-  ui.askusername=False
-  ui.clonebundlefallback=False
-  ui.clonebundleprefers=[]
-  ui.clonebundles=True
+  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=False
-  ui.debug=False
+  ui.commitsubrepos=no
+  ui.debug=no
   ui.debugger=None
   ui.fallbackencoding=None
   ui.forcecwd=None
   ui.forcemerge=None
-  ui.formatdebug=False
-  ui.formatjson=False
+  ui.formatdebug=no
+  ui.formatjson=no
   ui.formatted=None
   ui.graphnodetemplate=None
-  ui.interactive=False
+  ui.interactive=no
   ui.interface=None
   ui.interface.chunkselector=None
   ui.large-file-limit=10000000
-  ui.logblockedtimes=False
+  ui.logblockedtimes=no
   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.nontty=no
   ui.origbackuppath=None
-  ui.paginate=True
+  ui.paginate=yes
   ui.patch=None
   ui.portablefilenames=warn
   ui.pre-merge-tool-output-template=None
-  ui.promptecho=True
-  ui.quiet=False
-  ui.quietbookmarkmove=False
+  ui.promptecho=yes
+  ui.quiet=no
+  ui.quietbookmarkmove=no
   ui.relative-paths=legacy
   ui.remotecmd=hg
-  ui.report_untrusted=True
-  ui.rollback=True
-  ui.signal-safe-lock=True
-  ui.slash=True
+  ui.report_untrusted=yes
+  ui.rollback=yes
+  ui.signal-safe-lock=yes
+  ui.slash=yes
   ui.ssh=ssh
   ui.ssherrorhint=None
-  ui.statuscopies=False
-  ui.strict=False
+  ui.statuscopies=no
+  ui.strict=no
   ui.style=
   ui.supportcontact=None
   ui.textwidth=78
   ui.timeout=600
   ui.timeout.warn=0
-  ui.traceback=False
-  ui.tweakdefaults=False
+  ui.traceback=no
+  ui.tweakdefaults=no
   ui.username=None
-  ui.verbose=True
+  ui.verbose=yes
   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.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=True
+  web.cache=yes
   web.certificate=None
-  web.collapse=False
+  web.collapse=no
   web.comparisoncontext=5
   web.contact=None
   web.csp=None
-  web.deny_push=[]
-  web.deny_read=[]
-  web.descend=True
+  web.deny_push=
+  web.deny_read=
+  web.descend=yes
   web.description=
   web.encoding=ascii
   web.errorlog=-
-  web.guessmime=False
-  web.hidden=False
-  web.ipv6=False
-  web.labels=[]
+  web.guessmime=no
+  web.hidden=no
+  web.ipv6=no
+  web.labels=
   web.logoimg=hglogo.png
   web.logourl=https://mercurial-scm.org/
   web.maxchanges=10
@@ -941,7 +941,7 @@ 
   web.motd=
   web.port=8000
   web.prefix=
-  web.push_ssl=True
+  web.push_ssl=yes
   web.refreshinterval=20
   web.server-header=testing stub value
   web.static=None
@@ -953,7 +953,7 @@ 
   worker.backgroundclosemaxqueue=384
   worker.backgroundcloseminfilecount=2048
   worker.backgroundclosethreadcount=4
-  worker.enabled=True
+  worker.enabled=yes
   worker.numcpus=None
 
   $ hg showconfig ui.color --registered
@@ -961,22 +961,22 @@ 
 
   $ hg showconfig --registered -T '{name}={value}\n' | egrep '^(color|diff)'
   color.mode=auto
-  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.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=False
+  diff.word-diff=no
 
   $ hg showconfig --debug --registered | grep 'cmdserver'
   none: cmdserver.log=None
   none: cmdserver.max-log-files=7
   none: cmdserver.max-log-size=1 MB
   none: cmdserver.max-repo-cache(EXPERIMENTAL)=0 (default: None)
-  none: cmdserver.message-encodings(EXPERIMENTAL)=[] (default: None)
-  none: cmdserver.track-log=[b'chgserver', b'cmdserver', b'repocache']
+  none: cmdserver.message-encodings(EXPERIMENTAL)= (default: None)
+  none: cmdserver.track-log=chgserver cmdserver repocache
diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -792,6 +792,8 @@ 
                 itemdefault = item.default()
             else:
                 itemdefault = item.default
+            if isinstance(itemdefault, list):
+                itemdefault = ' '.join(itemdefault)
         return itemdefault
 
     def hasconfig(self, section, name, untrusted=False):
@@ -833,6 +835,8 @@ 
                     # --verbose is specified.
                     continue
                 value = self._config(section, name, untrusted=untrusted)
+                if isinstance(value, list):
+                    value = ' '.join(value)
                 if self.debugflag:
                     if item.experimental or 'experimental' in name:
                         name = ''.join([name, '(EXPERIMENTAL)'])
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1890,8 +1890,14 @@ 
             fm.data(name=entryname)
             fm.write('value', '%s\n', value)
         else:
+            origvalue = 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) and ui.debugflag):
+                origvalue != pycompat.bytestr(defaultvalue) and ui.debugflag):
+                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: