Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 31047:8aaebe8e47ec
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.
author | Augie Fackler <augie@google.com> |
---|---|
date | Mon, 06 Feb 2017 23:08:49 -0500 |
parents | f5d27f5442a0 |
children | 16d7db8f752c |
comparison
equal
deleted
inserted
replaced
31046:f5d27f5442a0 | 31047:8aaebe8e47ec |
---|---|
5413 return hg.verify(repo) | 5413 return hg.verify(repo) |
5414 | 5414 |
5415 @command('version', [] + formatteropts, norepo=True) | 5415 @command('version', [] + formatteropts, norepo=True) |
5416 def version_(ui, **opts): | 5416 def version_(ui, **opts): |
5417 """output version and copyright information""" | 5417 """output version and copyright information""" |
5418 if ui.verbose: | |
5419 ui.pager('version') | |
5418 fm = ui.formatter("version", opts) | 5420 fm = ui.formatter("version", opts) |
5419 fm.startitem() | 5421 fm.startitem() |
5420 fm.write("ver", _("Mercurial Distributed SCM (version %s)\n"), | 5422 fm.write("ver", _("Mercurial Distributed SCM (version %s)\n"), |
5421 util.version()) | 5423 util.version()) |
5422 license = _( | 5424 license = _( |