# HG changeset patch # User Gregory Szorc # Date 2018-08-21 22:33:11 # Node ID a5de21c9e3703f8e8eb064bd7d893ff2f703c66a # Parent ee7ee0c516ca9dfadbda5825635c23ed19f19286 httppeer: expose capabilities for each command This will help code using peers to sniff out exactly what servers support. Differential Revision: https://phab.mercurial-scm.org/D4436 diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py --- a/mercurial/httppeer.py +++ b/mercurial/httppeer.py @@ -805,6 +805,10 @@ class httpv2peer(object): if name in ('bundle2',): return True + # Alias command-* to presence of command of that name. + if name.startswith('command-'): + return name[len('command-'):] in self._descriptor['commands'] + return False def requirecap(self, name, purpose):