version: enable pager if --verbose is specified
authorAugie Fackler <augie@google.com>
Mon, 06 Feb 2017 23:08:49 -0500
changeset 31047 8aaebe8e47ec
parent 31046 f5d27f5442a0
child 31048 23bcfdd76f96
version: enable pager if --verbose is specified `hg version` output is very short without --verbose, but with --verbose it tends to scroll off the user's screen.
mercurial/commands.py
--- a/mercurial/commands.py	Mon Feb 06 23:07:16 2017 -0500
+++ b/mercurial/commands.py	Mon Feb 06 23:08:49 2017 -0500
@@ -5415,6 +5415,8 @@
 @command('version', [] + formatteropts, norepo=True)
 def version_(ui, **opts):
     """output version and copyright information"""
+    if ui.verbose:
+        ui.pager('version')
     fm = ui.formatter("version", opts)
     fm.startitem()
     fm.write("ver", _("Mercurial Distributed SCM (version %s)\n"),