comparison mercurial/repository.py @ 40171:dac438b7346e

httppeer: expose API descriptor on httpv2peer The API descriptor in wireprotov2 is much more expressive than space-delimited tokens and it will be difficult to define methods to query it in all of the ways we'll want to query it. So let's just declare defeat and expose the API descriptor on the peer instance. As part of this, we define a new interface for version 2 peers, fulfilling a TODO in the process. Differential Revision: https://phab.mercurial-scm.org/D4974
author Gregory Szorc <gregory.szorc@gmail.com>
date Wed, 03 Oct 2018 13:07:28 -0700
parents 8e398628a3f2
children 4821affc154f
comparison
equal deleted inserted replaced
40170:f7ff5b4fe745 40171:dac438b7346e
309 class ipeerbase(ipeerconnection, ipeercapabilities, ipeerrequests): 309 class ipeerbase(ipeerconnection, ipeercapabilities, ipeerrequests):
310 """Unified interface for peer repositories. 310 """Unified interface for peer repositories.
311 311
312 All peer instances must conform to this interface. 312 All peer instances must conform to this interface.
313 """ 313 """
314
315 class ipeerv2(ipeerconnection, ipeercapabilities, ipeerrequests):
316 """Unified peer interface for wire protocol version 2 peers."""
317
318 apidescriptor = interfaceutil.Attribute(
319 """Data structure holding description of server API.""")
314 320
315 @interfaceutil.implementer(ipeerbase) 321 @interfaceutil.implementer(ipeerbase)
316 class peer(object): 322 class peer(object):
317 """Base class for peer repositories.""" 323 """Base class for peer repositories."""
318 324