comparison mercurial/wireprototypes.py @ 36613:6e585bca962e

wireproto: add transport specific capabilities in the transport We add a method to the protocol handler interface that allows specific implementations to add their own capabilities. The SSH implementation is a no-op. The HTTP implementation adds the HTTP-specific capabilities. The end result is transport specific capabilities now live in the transport code instead of in some generic function in the wireproto module. Differential Revision: https://phab.mercurial-scm.org/D2512
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 27 Feb 2018 16:24:02 -0800
parents abc3b9801563
children 66de4555cefd
comparison
equal deleted inserted replaced
36612:e89959970a08 36613:6e585bca962e
135 """ 135 """
136 136
137 @abc.abstractmethod 137 @abc.abstractmethod
138 def client(self): 138 def client(self):
139 """Returns a string representation of this client (as bytes).""" 139 """Returns a string representation of this client (as bytes)."""
140
141 @abc.abstractmethod
142 def addcapabilities(self, repo, caps):
143 """Adds advertised capabilities specific to this protocol.
144
145 Receives the list of capabilities collected so far.
146
147 Returns a list of capabilities. The passed in argument can be returned.
148 """