Mercurial > hg
changeset 36951:c92d1d3c58ee
debugbundle: do not display detailed part data in --quiet mode
This changeset makes `hg debugbundle` respect --quiet and only display data
about part headers.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Wed, 21 Feb 2018 17:16:56 +0100 |
parents | c18ae7a07019 |
children | b24cde12061b |
files | mercurial/debugcommands.py tests/test-debugbundle.t |
diffstat | 2 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/debugcommands.py Wed Mar 14 15:44:53 2018 -0400 +++ b/mercurial/debugcommands.py Wed Feb 21 17:16:56 2018 +0100 @@ -345,11 +345,14 @@ if part.type == 'changegroup': version = part.params.get('version', '01') cg = changegroup.getunbundler(version, part, 'UN') - _debugchangegroup(ui, cg, all=all, indent=4, **opts) + if not ui.quiet: + _debugchangegroup(ui, cg, all=all, indent=4, **opts) if part.type == 'obsmarkers': - _debugobsmarkers(ui, part, indent=4, **opts) + if not ui.quiet: + _debugobsmarkers(ui, part, indent=4, **opts) if part.type == 'phase-heads': - _debugphaseheads(ui, part, indent=4) + if not ui.quiet: + _debugphaseheads(ui, part, indent=4) @command('debugbundle', [('a', 'all', None, _('show all details')),
--- a/tests/test-debugbundle.t Wed Mar 14 15:44:53 2018 -0400 +++ b/tests/test-debugbundle.t Wed Feb 21 17:16:56 2018 +0100 @@ -35,6 +35,12 @@ 0e067c57feba1a5694ca4844f05588bb1bf82342 991a3460af53952d10ec8a295d3d2cc2e5fa9690 +Quiet output + + $ hg debugbundle --quiet bundle2.hg + Stream params: {} + changegroup -- {nbchanges: 2, version: 02} + Verbose output: $ hg debugbundle --all bundle.hg