diff -r 5910db5d1913 -r 7ee2d859f720 mercurial/debugcommands.py --- a/mercurial/debugcommands.py Mon Oct 30 17:46:07 2017 -0400 +++ b/mercurial/debugcommands.py Mon Oct 30 17:08:16 2017 +0100 @@ -360,6 +360,16 @@ return _debugbundle2(ui, gen, all=all, **opts) _debugchangegroup(ui, gen, all=all, **opts) +@command('debugcapabilities', + [], _('PATH'), + norepo=True) +def debugcapabilities(ui, path, **opts): + """lists the capabilities of a remote peer""" + peer = hg.peer(ui, opts, path) + caps = peer.capabilities() + ui.write(('Main capabilities:\n')) + for c in sorted(caps): + ui.write((' %s\n') % c) @command('debugcheckstate', [], '') def debugcheckstate(ui, repo): """validate the correctness of the current dirstate"""