Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/debugcommands.py @ 37836:d618558e4e8b stable
debugbundle: also display if a part is mandatory or advisory
Most parts are mandatory but when introducing new parts, they should be
advisory if included by default or old clients won't be able to process it.
Differential Revision: https://phab.mercurial-scm.org/D3480
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Tue, 08 May 2018 11:39:38 +0200 |
parents | 0e9ddab2bac2 |
children | ead71b15efd5 |
comparison
equal
deleted
inserted
replaced
37835:1f65d7d46545 | 37836:d618558e4e8b |
---|---|
350 ui.write(('Stream params: %s\n' % _quasirepr(gen.params))) | 350 ui.write(('Stream params: %s\n' % _quasirepr(gen.params))) |
351 parttypes = opts.get(r'part_type', []) | 351 parttypes = opts.get(r'part_type', []) |
352 for part in gen.iterparts(): | 352 for part in gen.iterparts(): |
353 if parttypes and part.type not in parttypes: | 353 if parttypes and part.type not in parttypes: |
354 continue | 354 continue |
355 ui.write('%s -- %s\n' % (part.type, _quasirepr(part.params))) | 355 msg = '%s -- %s (mandatory: %r)\n' |
356 ui.write((msg % (part.type, _quasirepr(part.params), part.mandatory))) | |
356 if part.type == 'changegroup': | 357 if part.type == 'changegroup': |
357 version = part.params.get('version', '01') | 358 version = part.params.get('version', '01') |
358 cg = changegroup.getunbundler(version, part, 'UN') | 359 cg = changegroup.getunbundler(version, part, 'UN') |
359 if not ui.quiet: | 360 if not ui.quiet: |
360 _debugchangegroup(ui, cg, all=all, indent=4, **opts) | 361 _debugchangegroup(ui, cg, all=all, indent=4, **opts) |