ó
    6°hó4  ã                  ó\  • S SK Jr  S SKrS SKrS SKJr  SSKJrJr  SSKJ	r	  SSK
Jr  \R                  (       a  S SKrSSKJrJr  SS	KJr  S
rSrSrSr\\4r\SSS.SSSS.0r " S S5      r " S S5      r " S S5      r " S S5      r " S S5      r " S S5      rS4S jrS4S jrS  r S! r!S"S#S"S#S#S$S%S#S#S#S%S%S&.r" " S' S(\5      r# " S) S*5      r$ " S+ S,\%5      r&S- r'\RP                   " S. S/5      5       r)\RP                   " S0 S15      5       r*\RP                   " S2 S35      5       r+g)5é    )ÚannotationsN)ÚProtocolé   )ÚbinÚhex)Ú_)Úattr)ÚerrorÚutil)Úcompressions   ssh-v1s   exp-narrow-1s   exp-ellipses-1s   exp-ellipses-2s   ssh)s	   transports   versions   http-v1s   httpc                  ó   • \ rS rSrSrS rSrg)Úbytesresponseé6   z1A wire protocol response consisting of raw bytes.c                ó   • Xl         g ©N©Údata)Úselfr   s     Ú:/usr/lib/python3/dist-packages/mercurial/wireprototypes.pyÚ__init__Úbytesresponse.__init__9   s   € Ø�	ó    r   N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Ú__static_attributes__© r   r   r   r   6   s
   † Ù;õr   r   c                  ó   • \ rS rSrSrS rSrg)Úooberroré=   z‡wireproto reply: failure of a batch of operation

Something failed during a batch call. The error message is stored in
`self.message`.
c                ó   • Xl         g r   ©Úmessage)r   r&   s     r   r   Úooberror.__init__D   s   € Ø�r   r%   Nr   r    r   r   r"   r"   =   s   † ñõr   r"   c                  ó   • \ rS rSrSrS rSrg)ÚpushreséH   z~wireproto reply: success with simple integer return

The call was successful and returned an integer contained in `self.res`.
c                ó   • Xl         X l        g r   ©ÚresÚoutput©r   r-   r.   s      r   r   Úpushres.__init__N   ó   € ØŒØ�r   ©r.   r-   Nr   r    r   r   r)   r)   H   ó   † ñõ
r   r)   c                  ó   • \ rS rSrSrS rSrg)ÚpusherréS   z`wireproto reply: failure

The call failed. The `self.res` attribute contains the error message.
c                ó   • Xl         X l        g r   r,   r/   s      r   r   Úpusherr.__init__Y   r1   r   r2   Nr   r    r   r   r5   r5   S   r3   r   r5   c                  ó"   • \ rS rSrSrSS jrSrg)Ú	streamresé^   a-  wireproto reply: binary stream

The call was successful and the result is a stream.

Accepts a generator containing chunks of data to be sent to the client.

``prefer_uncompressed`` indicates that the data is expected to be
uncompressable and that the stream should therefore use the ``none``
engine.
Nc                ó   • Xl         X l        g r   ©ÚgenÚprefer_uncompressed)r   r>   r?   s      r   r   Ústreamres.__init__j   s   € ØŒØ#6Õ r   r=   )NFr   r    r   r   r:   r:   ^   s   † ñ	÷7r   r:   c                  ó"   • \ rS rSrSrSS jrSrg)Ústreamreslegacyéo   a&  wireproto reply: uncompressed binary stream

The call was successful and the result is a stream.

Accepts a generator containing chunks of data to be sent to the client.

Like ``streamres``, but sends an uncompressed data for "version 1" clients
using the application/mercurial-0.1 media type.
Nc                ó   • Xl         g r   ©r>   )r   r>   s     r   r   Ústreamreslegacy.__init__z   s   € Ø�r   rE   r   r   r    r   r   rB   rB   o   s   † ñ÷r   rB   c                ót   • U (       a+  U R                  U5       Vs/ s H  n[        U5      PM     sn$ / $ s  snf r   )Úsplitr   )ÚlÚsepÚvs      r   Ú
decodelistrL      s0   € ÞØ !§¡¨¤Ó-¢˜1”�A–¡Ñ-Ð-Ø€Iùò .s   ›5c                ó`   •  UR                  [        [        U 5      5      $ ! [         a    e f = fr   )ÚjoinÚmapr   Ú	TypeError)rI   rJ   s     r   Ú
encodelistrQ   …   s.   € ðØ�x‰xœœC ›Ó$Ð$øÜó Øðús   ‚! ¡-c                ó†   • U R                  SS5      R                  SS5      R                  SS5      R                  SS5      $ )	Nó   :ó   :có   ,ó   :oó   ;ó   :só   =ó   :e©Úreplace)Úplains    r   Úescapebatchargr^   �   s9   € à�‰�d˜EÓ"ß	‰��uÓ	ß	‰��uÓ	ß	‰��uÓ	ð	r   c                ó†   • U R                  SS5      R                  SS5      R                  SS5      R                  SS5      $ )	NrZ   rY   rX   rW   rV   rU   rT   rS   r[   )Úescapeds    r   Úunescapebatchargra   ˜   s9   € à�‰˜˜tÓ$ß	‰�˜Ó	ß	‰�˜Ó	ß	‰�˜Ó	ð	r   s   nodess   booleans   scsvs   csv)s   headss	   bookmarkss   commons
   obsmarkerss   phasess
   bundlecapss   listkeyss   cgs   cbattempteds   streams   includepatss   excludepatsc                  óF  • \ rS rSrSr\\R                  SS j5       5       r\R                  S 5       r	\R                  S 5       r
\R                  S 5       r\R                  S 5       r\R                  S 5       r\R                  S	 5       r\R                  S
 5       rSrg)Úbaseprotocolhandleré¼   a2  Abstract base class for wire protocol handlers.

A wire protocol handler serves as an interface between protocol command
handlers and the wire protocol transport layer. Protocol handlers provide
methods to read command arguments, redirect stdio for the duration of
the request, handle response types, etc.
c                ó   • g)z\The name of the protocol implementation.

Used for uniquely identifying the transport type.
Nr    ©r   s    r   ÚnameÚbaseprotocolhandler.nameÅ   ó   � r   c                ó   • g)zÑreturn the value for arguments in <args>

For version 1 transports, returns a list of values in the same
order they appear in ``args``. For version 2 transports, returns
a dict mapping argument name to value.
Nr    )r   Úargss     r   ÚgetargsÚbaseprotocolhandler.getargsÍ   ri   r   c                ó   • g)z»Returns the list of protocol-level capabilities of client

Returns a list of capabilities as declared by the client for
the current request (or connection for stateful protocol handlers).Nr    rf   s    r   ÚgetprotocapsÚ baseprotocolhandler.getprotocapsÖ   ri   r   c                ó   • g)zuProvide a generator for the raw payload.

The caller is responsible for ensuring that the full payload is
processed.
Nr    rf   s    r   Ú
getpayloadÚbaseprotocolhandler.getpayloadÝ   ri   r   c                ó   • g)a½  Context manager to possibly redirect stdio.

The context manager yields a file-object like object that receives
stdout and stderr output when the context manager is active. Or it
yields ``None`` if no I/O redirection occurs.

The intent of this context manager is to capture stdio output
so it may be sent in the response. Some transports support streaming
stdio to the client in real time. For these transports, stdio output
won't be captured.
Nr    rf   s    r   ÚmayberedirectstdioÚ&baseprotocolhandler.mayberedirectstdioå   ri   r   c                ó   • g)z:Returns a string representation of this client (as bytes).Nr    rf   s    r   ÚclientÚbaseprotocolhandler.clientó   ri   r   c                ó   • g)z¶Adds advertised capabilities specific to this protocol.

Receives the list of capabilities collected so far.

Returns a list of capabilities. The passed in argument can be returned.
Nr    )r   ÚrepoÚcapss      r   ÚaddcapabilitiesÚ#baseprotocolhandler.addcapabilities÷   ri   r   c                ó   • g)zãValidate that the client has permissions to perform a request.

The argument is the permission required to proceed. If the client
doesn't have that permission, the exception should raise or abort
in a protocol specific manner.
Nr    )r   Úperms     r   Ú	checkpermÚbaseprotocolhandler.checkperm   ri   r   r    N)ÚreturnÚbytes)r   r   r   r   r   ÚpropertyÚabcÚabstractmethodrg   rl   ro   rr   ru   rx   r}   r�   r   r    r   r   rc   rc   ¼   sã   † ñð Ø×Ñóó ó ðð 	×Ññó ðð 	×ÑñOó ðOð 	×Ññó ðð 	×Ññó ðð 	×ÑñIó ðIð 	×Ññó ðð 	×Ññó ór   rc   c                  ó>   • \ rS rSrSr     S	S jrS rS rS rSr	g)
Úcommandentryi
  z,Represents a declared wire protocol command.Nc                óp   • Xl         X l        U=(       d
    [        5       U l        X@l        XPl        X`l        g r   )Úfuncrk   ÚsetÚ
transportsÚ
permissionÚ
cachekeyfnÚextracapabilitiesfn)r   r‹   rk   r�   rŽ   r�   r�   s          r   r   Úcommandentry.__init__  s,   € ð Œ	ØŒ	Ø$×-¬«ˆŒØ$ŒØ$ŒØ#6Õ r   c                óT   • [        UU[        U R                  5      U R                  S9$ )a  Merge this instance with an incoming 2-tuple.

This is called when a caller using the old 2-tuple API attempts
to replace an instance. The incoming values are merged with
data not captured by the 2-tuple and a new instance containing
the union of the two objects is returned.
©rk   r�   rŽ   )r‰   rŒ   r�   rŽ   )r   r‹   rk   s      r   Ú_mergeÚcommandentry._merge  s*   € ô ØØÜ˜4Ÿ?™?Ó+Ø—‘ñ	
ð 	
r   c              #  óD   #   • U R                   v •  U R                  v •  g 7fr   )r‹   rk   rf   s    r   Ú__iter__Úcommandentry.__iter__-  s   é € Ø�i‰iŠØ�i‰i‹ùs   ‚ c                ó`   • US:X  a  U R                   $ US:X  a  U R                  $ [        S5      e)Nr   r   s    can only access elements 0 and 1)r‹   rk   Ú
IndexError)r   Úis     r   Ú__getitem__Úcommandentry.__getitem__1  s0   € Ø�‹6Ø—9‘9ÐØ�!‹VØ—9‘9ÐäÐ@ÓAÐAr   )rk   r�   r�   r‹   rŽ   r�   )r   Nó   pushNN)
r   r   r   r   r   r   r”   r—   rœ   r   r    r   r   r‰   r‰   
  s+   † Ù6ð
 ØØØØ ô7ò 
ò õBr   r‰   c                  ó2   ^ • \ rS rSrSrU 4S jrS rSrU =r$ )Úcommanddicti:  z±Container for registered wire protocol commands.

It behaves like a dict. But __setitem__ is overwritten to allow silent
coercion of values from 2-tuples for API compatibility.
c                óB  >• [        U[        5      (       a  Oz[        U[        5      (       aZ  [        U5      S:w  a  [	        S5      eX;   a  X   R                  US   US   5      nO+[        US   US   [        [        5      SS9nO[	        S5      e[        TU ]%  X5      $ )Né   s+   command tuples must have exactly 2 elementsr   r   rž   r“   s:   command entries must be commandentry instances or 2-tuples)
Ú
isinstancer‰   ÚtupleÚlenÚ
ValueErrorr”   rŒ   Ú
TRANSPORTSÚsuperÚ__setitem__)r   ÚkrK   Ú	__class__s      €r   r©   Úcommanddict.__setitem__A  s¢   ø€ Ü�aœ×&Ñ&Øä˜œ5×!Ñ!Ü�1‹v˜‹{Ü Ð!OÓPÐPð ‹yØ‘G—N‘N 1 Q¡4¨¨1©Ó.‘ô !Ø�a‘DØ˜1™Ü"¤:›Ø&ñ	‘ô ðóð ô
 ‰wÑ" 1Ó(Ð(r   c                ó˜   • UR                   [        ;   d   eU R                  U5      nU(       d  gUR                   UR                  ;  a  gg)z?Determine if a command is available for the requested protocol.FT)rg   r§   Úgetr�   )r   ÚcommandÚprotoÚentrys       r   ÚcommandavailableÚcommanddict.commandavailable_  s@   € à�z‰zœZÓ'Ð'Ð'à—‘˜Ó!ˆæØà�:‰:˜U×-Ñ-Ó-Øàr   r    )	r   r   r   r   r   r©   r²   r   Ú__classcell__)r«   s   @r   r    r    :  s   ø† ñõ)÷<ð r   r    c           	     óÐ  ^• U[         R                  [         R                  4;   d   e[         R                  R	                  U5      nU[         R                  :X  a  U R                  SS5      mSnOU R                  SS5      mSnT(       dK  U[        R                  :X  a  SOSnU Vs/ s H%  n[        UR                  5       U5      S	:”  d  M#  UPM'     sn$ U Vs1 s H  oUR                  5       iM     nnT Vs1 s H  oUU;  d  M
  UiM     nnU(       a<  [        R                  " [        S
5      USR                  [        U5      5      4-  5      eU Vs/ s H  oUR                  5       T;   d  M  UPM     nn[        UU4S jS9nU(       dE  [        R                  " [        S5      U-  [        S5      SR                  [        U5      5      -  S9eU$ s  snf s  snf s  snf s  snf )z?Obtain the list of supported compression engines for a request.s   servers   compressionenginess   server.compressionenginess   experimentals   clientcompressionenginess%   experimental.clientcompressionenginesÚserverpriorityÚclientpriorityr   s,   invalid compression engine defined in %s: %ss   , c                óB   >• TR                  U R                  5       5      $ r   )Úindexrg   )ÚeÚconfigenginess    €r   Ú<lambda>Ú&supportedcompengines.<locals>.<lambda>™  s   ø€  =×#6Ñ#6°q·v±v³xÔ#@r   )Úkeys?   %s config option does not specify any known compression enginess   usable compression engines: %s)Úhint)r   Ú
CLIENTROLEÚ
SERVERROLEÚcompenginesÚsupportedwireenginesÚ
configlistr   ÚgetattrÚwireprotosupportrg   r
   ÚAbortr   rN   Úsorted)	ÚuiÚrolerÂ   Úconfigr	   rº   Ú
validnamesÚinvalidnamesr»   s	           @r   ÚsupportedcompenginesrÎ   n  sÍ  ø€ à”K×*Ñ*¬K×,BÑ,BÐCÓCÐCÐCä×)Ñ)×>Ñ>¸tÓD€Kð Œ{×%Ñ%Ó%ØŸ™ iÐ1FÓGˆØ-‰ð Ÿ™ØÐ8ó
ˆð :ˆö Ø#'¬4¯?©?Ó#:ÑÐ@Pˆá"ó
Ú"�!¤g¨a×.@Ñ.@Ó.BÀDÓ&IÈAÑ&M�A‘{ñ
ð 	
ñ %0Ó0¢K˜q—&‘&–(¡K€JÐ0Ù,ÓDš}˜!¸Ñ0C—A™}€LÐDÞÜ�kŠkÜÐ=Ó>Ø�u—z‘z¤&¨Ó"6Ó7Ð8ñ9ó
ð 	
ñ
 *ÓGšk˜¯V©V«X¸Ñ-F—1™k€KÐGÜØÔ@ñ€Kö Ü�kŠkÜð'óð ñ	ô
 Ð4Ó5Ø�j‰jœ 
Ó+Ó,ñ-ñ
ð 	
ð ÐùòA
ùò 1ùÚDùò Hs*   Â'"GÃGÃGÃ9	GÄGÅG#Å0G#c                  ó:   • \ rS rSrSr\R                  " 5       rSrg)Úencodedresponseiª  a#  Represents response data that is already content encoded.

Wire protocol version 2 only.

Commands typically emit Python objects that are encoded and sent over the
wire. If commands emit an object of this type, the encoding step is bypassed
and the content from this object is used instead.
r    N)	r   r   r   r   r   r	   Úibr   r   r    r   r   rÐ   rÐ   ª  s   † ñð �7Š7‹9ƒDr   rÐ   c                  óü   • \ rS rSrSr\R                  " 5       r\R                  " 5       r\R                  " SS9r	\R                  " SS9r
\R                  " SS9r\R                  " SS9r\R                  " SS9rSrg)Úalternatelocationresponsei¸  zÛRepresents a response available at an alternate location.

Instances are sent in place of actual response objects when the server
is sending a "content redirect" response.

Only compatible with wire protocol version 2.
N)Údefaultr    )r   r   r   r   r   r	   rÑ   ÚurlÚ	mediatypeÚsizeÚ
fullhashesÚfullhashseedÚserverdercertsÚservercadercertsr   r    r   r   rÓ   rÓ   ¸  sf   † ñð �'Š'‹)€CØ—’“	€IØ�7Š7˜4Ñ €DØ—’ Ñ&€JØ—7’7 4Ñ(€LØ—W’W TÑ*€NØ—w’w tÑ,Ór   rÓ   c                  ó:   • \ rS rSrSr\R                  " 5       rSrg)ÚindefinitebytestringresponseiË  z¦Represents an object to be encoded to an indefinite length bytestring.

Instances are initialized from an iterable of chunks, with each chunk being
a bytes instance.
r    N)	r   r   r   r   r   r	   rÑ   Úchunksr   r    r   r   rÝ   rÝ   Ë  s   † ñð �WŠW‹YƒFr   rÝ   )ó    ),Ú
__future__r   r†   Útypingr   Únoder   r   Úi18nr   Ú
thirdpartyr	   ÚTYPE_CHECKINGÚ r
   r   Úutilsr   ÚSSHV1Ú	NARROWCAPÚELLIPSESCAP1ÚELLIPSESCAPÚSUPPORTED_ELLIPSESCAPr§   r   r"   r)   r5   r:   rB   rL   rQ   r^   ra   ÚGETBUNDLE_ARGUMENTSrc   r‰   Údictr    rÎ   ÚsrÐ   rÓ   rÝ   r    r   r   Ú<module>rð      s†  ðõ #ã 
Û õ÷õ Ý ð 
××ã÷õ ð 	€à€	Ø €Ø€Ø% {Ð3Ð ð 
ØØñð ØØñð	€
÷ñ ÷ñ ÷ñ ÷ñ ÷7ñ 7÷"ñ ô ôòòð* ØØØØØØØØØØØñÐ ô K˜(ô K÷\-Bñ -Bô`1�$ô 1òh9ðx ‡�÷
ð 
ó ð
ð ‡�÷-ð -ó ð-ð$ ‡�÷ð ó ñr   