D4436: httppeer: expose capabilities for each command

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Tue Sep 4 18:28:36 UTC 2018


indygreg updated this revision to Diff 10761.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4436?vs=10693&id=10761

REVISION DETAIL
  https://phab.mercurial-scm.org/D4436

AFFECTED FILES
  mercurial/httppeer.py

CHANGE DETAILS

diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py
--- a/mercurial/httppeer.py
+++ b/mercurial/httppeer.py
@@ -806,6 +806,10 @@
         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):



To: indygreg, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list