Mercurial > hg
changeset 39628:a5de21c9e370
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
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 21 Aug 2018 15:33:11 -0700 |
parents | ee7ee0c516ca |
children | a86d21e70b2b |
files | mercurial/httppeer.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/httppeer.py Thu Sep 13 22:48:27 2018 -0700 +++ b/mercurial/httppeer.py Tue Aug 21 15:33:11 2018 -0700 @@ -805,6 +805,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):