mercurial/debugcommands.py
changeset 34959 7ee2d859f720
parent 34645 75979c8d4572
child 34960 762ea8a1f5e7
--- 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"""