Mercurial > public > mercurial-scm > hg-stable
diff 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 |
line wrap: on
line diff
--- a/mercurial/repository.py Thu Oct 11 09:26:05 2018 +0200 +++ b/mercurial/repository.py Wed Oct 03 13:07:28 2018 -0700 @@ -312,6 +312,12 @@ All peer instances must conform to this interface. """ +class ipeerv2(ipeerconnection, ipeercapabilities, ipeerrequests): + """Unified peer interface for wire protocol version 2 peers.""" + + apidescriptor = interfaceutil.Attribute( + """Data structure holding description of server API.""") + @interfaceutil.implementer(ipeerbase) class peer(object): """Base class for peer repositories."""