comparison mercurial/httppeer.py @ 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 089fc0db0954
children a86d21e70b2b
comparison
equal deleted inserted replaced
39627:ee7ee0c516ca 39628:a5de21c9e370
802 return True 802 return True
803 803
804 # Other concepts. 804 # Other concepts.
805 if name in ('bundle2',): 805 if name in ('bundle2',):
806 return True 806 return True
807
808 # Alias command-* to presence of command of that name.
809 if name.startswith('command-'):
810 return name[len('command-'):] in self._descriptor['commands']
807 811
808 return False 812 return False
809 813
810 def requirecap(self, name, purpose): 814 def requirecap(self, name, purpose):
811 if self.capable(name): 815 if self.capable(name):