D4436: httppeer: expose capabilities for each command
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Fri Aug 31 22:57:17 UTC 2018
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
This will help code using peers to sniff out exactly what servers
support.
REPOSITORY
rHG Mercurial
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
@@ -800,6 +800,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