diff -r 3e102a8dd52c -r e8c8d81eb864 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Fri Jun 16 16:56:16 2017 -0700 +++ b/mercurial/debugcommands.py Thu Jun 22 10:10:02 2017 -0700 @@ -311,6 +311,15 @@ cmdutil.showmarker(fm, m) fm.end() +def _debugphaseheads(ui, data, indent=0): + """display version and markers contained in 'data'""" + indent_string = ' ' * indent + headsbyphase = bundle2._readphaseheads(data) + for phase in phases.allphases: + for head in headsbyphase[phase]: + ui.write(indent_string) + ui.write('%s %s\n' % (hex(head), phases.phasenames[phase])) + def _debugbundle2(ui, gen, all=None, **opts): """lists the contents of a bundle2""" if not isinstance(gen, bundle2.unbundle20): @@ -327,6 +336,8 @@ _debugchangegroup(ui, cg, all=all, indent=4, **opts) if part.type == 'obsmarkers': _debugobsmarkers(ui, part, indent=4, **opts) + if part.type == 'phase-heads': + _debugphaseheads(ui, part, indent=4) @command('debugbundle', [('a', 'all', None, _('show all details')),