# HG changeset patch
# User Augie Fackler <au...@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"),
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to