mercurial/debugcommands.py
changeset 35337 cfb403b92f43
parent 35336 c3e4f196b6e0
child 35338 bd326f3e0e14
--- a/mercurial/debugcommands.py	Thu Dec 07 16:19:46 2017 +0100
+++ b/mercurial/debugcommands.py	Thu Dec 07 16:05:20 2017 +0100
@@ -863,7 +863,10 @@
          [] + cmdutil.formatteropts,
         _(''))
 def debugformat(ui, repo, **opts):
-    """display format information about the current repository"""
+    """display format information about the current repository
+
+    Use --verbose to get extra information about current config value and
+    Mercurial default."""
     maxvariantlength = max(len(fv.name) for fv in upgrade.allformatvariant)
     maxvariantlength = max(len('format-variant'), maxvariantlength)
 
@@ -880,15 +883,22 @@
     fm.plain('format-variant')
     fm.plain(' ' * (maxvariantlength - len('format-variant')))
     fm.plain(' repo')
+    if ui.verbose:
+        fm.plain(' config default')
     fm.plain('\n')
     fm.startitem()
     for fv in upgrade.allformatvariant:
         repovalue = fv.fromrepo(repo)
+        configvalue = fv.fromconfig(repo)
 
         fm.write('name', makeformatname(fv.name), fv.name,
                  label='formatvariant.name')
         fm.write('repo', ' %3s', formatvalue(repovalue),
                  label='formatvariant.repo')
+        fm.condwrite(ui.verbose, 'config', ' %6s', formatvalue(configvalue),
+                     label='formatvariant.config')
+        fm.condwrite(ui.verbose, 'default', ' %7s', formatvalue(fv.default),
+                     label='formatvariant.default')
         fm.plain('\n')
 
 @command('debugfsinfo', [], _('[PATH]'), norepo=True)