[PATCH 19 of 19 pager] version: enable pager if --verbose is specified
Augie Fackler
raf at durin42.com
Sun Feb 19 18:13:10 EST 2017
# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1486440529 18000
# Mon Feb 06 23:08:49 2017 -0500
# Node ID 2a054d530fa6763f0cf97a6e7193870ff8f2378b
# Parent 190fc3b8c22dff15bf147ea74cc507757327251e
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.
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -5413,6 +5413,8 @@ def verify(ui, repo):
@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"),
More information about the Mercurial-devel
mailing list