mercurial/templatekw.py
changeset 34993 625d5ebce066
parent 34992 e2fc6cec0eff
child 35143 6fe99a8e266d
--- a/mercurial/templatekw.py	Sat Oct 21 17:31:13 2017 +0900
+++ b/mercurial/templatekw.py	Sat Oct 21 17:46:41 2017 +0900
@@ -885,6 +885,19 @@
     return showlist('instability', args['ctx'].instabilities(), args,
                     plural='instabilities')
 
+@templatekeyword('verbosity')
+def showverbosity(ui, **args):
+    """String. The current output verbosity in 'debug', 'quiet', 'verbose',
+    or ''."""
+    # see cmdutil.changeset_templater for priority of these flags
+    if ui.debugflag:
+        return 'debug'
+    elif ui.quiet:
+        return 'quiet'
+    elif ui.verbose:
+        return 'verbose'
+    return ''
+
 def loadkeyword(ui, extname, registrarobj):
     """Load template keyword from specified registrarobj
     """