HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //lib64/python2.7/site-packages/mercurial/wireprotov2server.pyc
�
1�3\c@@s�ddlmZddlZddlZddlZddlmZddlmZm	Z	ddl
mZmZm
Z
mZmZmZmZmZmZmZddlmZmZmZdZejZej�ZdZd	�Zd
�Z d�Z!d�Z"d
�Z#d�Z$ej%ej&�de'fd��Y�Z(d�Z)d�Z*d�Z+ddddd�Z-de.d�Z/d�Z0d�Z1e-ddd�d��Z2e-ddd�d��Z3e-dd iid!d"6id#d"6d$gd%6gd&6d'6id(d"6e4d)6d*d+hd&6d,d*d-d+hd.6d/6dd�d0��Z5d1e6fd2��YZ7d3�Z8d4�Z9d5�Z:e-d6d iid7d"6d8�d)6e;d&6d96id!d"6d:gd&6d%6id(d"6e4d)6d*d+hd&6d*d+d;hd.6d/6id<d"6d=d&6d>6ddd?e/d6dd@e;��dA��Z<dB�Z=e-dCd iid7d"6dD�d)6e;d&6d96id(d"6e4d)6d*d+hd&6dEd;d*d+hd.6d/6idFd"6dG�d)6idHgdI6d&6dJ6id!d"6id#d"6d$gd%6gd&6d'6ddd?e/dCdd@e;�dKe=�dL��Z>e-dMd iid7d"6dN�d)6e.d&6dO6dd�dP��Z?e-dQd iid!d"6e@d)6dRgd&6d%6dd�dS��ZAe-dTd iid<d"6dUd&6dV6dd�dW��ZBe-dXd iid<d"6dYd&6dZ6dd�d[��ZCd\�ZDe-d]d iid!d"6d:gd&6d%6id7d"6d^�d)6e;d&6d96id(d"6e4d)6d*d+hd&6d*d+hd.6d/6id<d"6d_d&6d`6ddd?e/d]dd@e;�dKeD�da��ZEe-dbd iid<d"6dUd&6dV6id<d"6dZd&6dZ6id<d"6dcd&6dc6id<d"6ddd&6dd6dd�de��ZFe-dfd iid!d"6dgdhgd&6di6id!d"6dj�d)6idHgdI6d&6dJ6dd�dk��ZGdS(li(tabsolute_importNi(t_(thextnullid(
t	discoverytencodingterrortmatcht
narrowspectpycompattstreamclonetutiltwireprotoframingtwireprototypes(tcborutilt
interfaceutilt
stringutils&application/mercurial-exp-framing-0006cC@sKddlm}|sCd|_d|jd<|jtd��dSt|�dkr�d|_d|jd<|jtd�|j�dS|d	d
!\}}|dkr�d|_d|jd<|jtd
�|�dS|jdkrd|_d|jd<|jtd��dSy&||||dkr3dnd�Wnl|j	k
r�}|j
|jtj
|��|_x$|jD]\}	}
|
|j|	<q{W|jd�dSX|dkr�t|jj|j||�dSdh}|tkr(||kr(d|_d|jd<|jtd�|�dS|j}|j}
t||
�}tj||�r�||kr�d|_d|jd<|jtd�|�dS|jjd�tkr�d|_d|jd<|jtd�t�dS|jjd�tkr+d|_d|jd<|jtd�t�dSt|
||||||�dS(Ni(tcommons200 OKs
text/plainsContent-TypesHTTP version 2 API handlers
404 Not Foundsdo not know how to process %s
iitrotrwsunknown permission: %stPOSTs405 Method Not AllowedtAllowscommands require POST requeststpulltpushspermission deniedtdebugreflecttmultirequests"unknown wire protocol command: %s
s!invalid wire protocol command: %stAccepts406 Not Acceptables1client MUST specify Accept header with value: %s
s415 Unsupported Media Types4client MUST send Content-Type header with value: %s
(RR(thgwebRtstatustheaderstsetbodybytesRtlentdispatchpathtmethodt
ErrorResponset
statusmessagetcodeR	tbytestrt_processhttpv2reflectrequesttrepotuitCOMMANDSthttpv2protocolhandlertcommandavailabletgettFRAMINGTYPEt_processhttpv2request(trctxtreqtrest	checkpermturlpartsthgwebcommont
permissiontcommandtetktvt
extracommandsR'R(tproto((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pythandlehttpv2request/s|	
	
	
	
&!
		
			
	
	
c
C@sjddl}|jdd�sKd|_d|jd<|jtd��dStj|�}g}x�tr�tj	|j
�}|s�|jd	�Pn|jd
|j|j
|j|jf�|j|�\}}	|j|j||	fdtdd��qcW|j�\}}	||	d<|j|j|	dtdd��d|_d|jd<|jdj|��dS(sxReads unified frame protocol request and dumps out state to client.

    This special endpoint can be used to help debug the wire protocol.

    Instead of routing the request through the normal dispatch mechanism,
    we instead read all frames, decode them, and feed them into our state
    tracker. We then dump the log of all that activity back out to the
    client.
    iNtexperimentalsweb.api.debugreflects
404 Not Founds
text/plainsContent-Types"debugreflect service not availablesreceived: <no frame>sreceived: %d %d %d %st	sort_keyst
separatorss, s: tactions200 OKs
(s, s: (s, s: (tjsont
configboolRRRRRt
serverreactortTruet	readframetbodyfhtappendttypeidtflagst	requestidtpayloadtonframerecvtdumpst
oninputeoftjoin(
R(R'R0R1RAtreactortstatestframeR@tmeta((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyR&�s2
	
	

"	
cC@s�tj|dt�}t}d}	x�trtj|j�}
|
sFPn|j|
�\}}|dkrmq$q$|dkr�|	s�|j�}	nt	||||||||	|d|�	}
|
r�dSt}q$|dkrd|_
d|jd	<|j|d
d�dSt
jd|��q$W|j�\}}|d
kred|_
t|jd	<|j|d�n"|dkrtnt
jd|��dS(s�Post-validation handler for HTTPv2 requests.

    Called when the HTTP request contains unified frame-based protocol
    frames for evaluation.
    tdeferoutputt	wantframet
runcommandtissubsequentNRs200 OKs
text/plainsContent-Typetmessages
s)unhandled action from frame processor: %st
sendframestframegentnoop(RRCRDtFalsetNoneRERFRLtmakeoutputstreamt_httpv2runcommandRRRRtProgrammingErrorRNR-t
setbodygen(R(R'R0R1t
authedpermt
reqcommandR;RPtseencommandt	outstreamRRR@RSt
sentoutput((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyR.�sF					
	
	c
C@s�t||d|d�}
|dkr�tj|d|
�spd|_d|jd<|jtd�|d�tS|dks�t�t|d}|j	dks�t�|dkrh|j	dkrhd|_d|jd<|jtd
�|d�tSnp|	r+d|_d|jd<|jtd��tS||dkrhd|_d|jd<|jtd��tSd|_t
|jd<y@t||
|d|d�}|j||d|�\}
}Wn�t
jk
r�}|j||d|j|j�\}
}nEtk
rB}|j||dtd�tj|��\}
}nX|
dkrd|j|d�tS|
dkrttSt
jd|
��dS(s�Dispatch a wire protocol command made from HTTPv2 requests.

    The authenticated permission (``authedperm``) along with the original
    command from the URL (``reqcommand``) are passed in.
    targsRR6s200 OKs
text/plainsContent-Types'wire protocol command not available: %sRRRRs
403 Forbiddens/insufficient permissions to execute command: %ss.multiple commands cannot be issued to this URLs*command in frame must match command in URLtredirectRJs#exception when invoking command: %sRYRZR[s unhandled event from reactor: %sN(RR(RR(R*R)R+RRRRRDtAssertionErrorR5R-tdispatchtoncommandresponsereadyobjectsRtWireprotoCommandErrortoncommanderrorRXtmessageargst	Exceptiont
onservererrorRtforcebytestrRaR\R`(R(R'R0R1RbRcRPReR6RWR;twirecommandtobjsR@RSR7((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyR_�s`	
	
	
	
	
%
		cC@s
|jd�S(Ntserved(tfiltered(R'R;R6((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pytgetdispatchrepoZsc

#@s�t��|��t|}|j�|j}�j|������fd�}|js{x|�D]}|VqhWdS|r�|d}|d}	ng}g}	t��|�tjd|d|	�}
|
s�x|�D]}|Vq�WdS|
��|j��|
��}|dks)|
j
|�rFx|�D]}|Vq3WdS|
j�}|rvx|dD]}|VqcWdSx0|�D]%}x|
j|�D]}|Vq�Wq�Wx|
j
�D]}|Vq�WWdQXdS(sfRun a wire protocol command.

    Returns an iterable of objects that will be sent to the client.
    c@s���tj���S(N(R	t	strkwargs((RgtfuncR;R'(sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyt<lambda>ntNttargetsthashestredirecttargetstredirecthashesRs(RvR)RxRgtgetargst
cachekeyfntmakeresponsecacherRtstreamencodeR]tsetcachekeytlookuptonobjectt
onfinished(
R'R;R6RhtentrytspectcallcommandtoR}R~tcachertcachekeytcached((RgRxR;R'sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyRj]sN
				

					
R*cB@skeZd	d�Zed��Zd�Zd�Zd�Ze	j
d��Zd�Zd�Z
d�ZRS(
cC@s||_||_||_dS(N(t_reqt_uit_args(tselfR0R(Rg((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyt__init__�s		cC@stS(N(tHTTP_WIREPROTO_V2(R�((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pytname�sc@s*t|j�t��}|rDtjddjt|����n�fd��D�t|j�}|r�tjddjt|����ni}x�t�j��D]w\}}||jkr�|d�||<q�n|j|}|ddkrt|t�rt|�}n|||<q�W|S(Ns#unsupported argument to command: %ss, c@s$h|]}�|dr|�qS(trequired((t.0ta(Rg(sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pys	<setcomp>�s	smissing required arguments: %stdefaultttypetset(	R�R�RRlROtsortedtitemst
isinstancetlist(R�RgtextratmissingtdataR8RSR9((RgsA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyR�s&#
cC@st�S(N(R�(R�((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pytgetprotocaps�scC@s
t�dS(N(tNotImplementedError(R�((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyt
getpayload�scC@s
t�dS(N(R�(R�((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pytmayberedirectstdio�scC@s
t�dS(N(R�(R�((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pytclient�scC@s|S(N((R�R'tcaps((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pytaddcapabilities�scC@s
t�dS(N(R�(R�tperm((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyR2�sN(t__name__t
__module__R]R�tpropertyR�RR�R�t
contextlibtcontextmanagerR�R�R�R2(((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyR*�s	%				cC@st||j�}t||�S(N(R*R(t_capabilitiesv2(R0R'R;((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pythttpv2apidescriptor�scC@siid6tgd6ttj�d6}xtj�D]
\}}i}x~|jj�D]m\}}i|dd6|dd6||<|ds�|d�||d<n|drV|d||d<qVqVW|dkr�tj|�r�q4ni|d	6|j	gd
6|d|<|j
r4|j
||�}|d|j|�q4q4Wt|j
|j@�|d<t||�}	|	r
igd6d
dgd6|d<x{|	D]p}
i|
dd6|
dd6|
dd6}x+dD]#}||
kr�|
|||<q�q�W|ddj|�q�Wn|j||�S(s�Obtain the set of capabilities for version 2 transports.

    These capabilities are distinct from the capabilities for version 1
    transports.
    tcommandstframingmediatypestpathfilterprefixesR�R�R�tvalidvaluestrawstorefiledataRgtpermissionstrawrepoformatsR{tsha256tsha1R|RhR�tprotocolturistsnirequiredttlsversions(R�R�(R-R�RtVALID_PREFIXESR)R�RgR
tallowservergenerationR5textracapabilitiesfntupdateR�trequirementstsupportedformatstgetadvertisedredirecttargetsRGR�(R'R;R�R6R�RgtargRSt	extracapsR{ttargettkey((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyR��sP


		

cC@sgS(s�Obtain a list of content redirect targets.

    Returns a list containing potential redirect targets that will be
    advertised in capabilities data. Each dict MUST have the following
    keys:

    name
       The name of this redirect target. This is the identifier clients use
       to refer to a target. It is transferred as part of every command
       request.

    protocol
       Network protocol used by this target. Typically this is the string
       in front of the ``://`` in a URL. e.g. ``https``.

    uris
       List of representative URIs for this target. Clients can use the
       URIs to test parsing for compatibility or for ordering preference
       for which target to use.

    The following optional keys are recognized:

    snirequired
       Bool indicating if Server Name Indication (SNI) is required to
       connect to this target.

    tlsversions
       List of bytes indicating which TLS versions are supported by this
       target.

    By default, clients reflect the target order advertised by servers
    and servers will use the first client-advertised target when picking
    a redirect target. So targets should be advertised in the order the
    server prefers they be used.
    ((R'R;((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyR�/s$Rc@s�d�tjj�D���dkr;tjd���n�dkrPi�nt�t�sqtjd��nx�j�D]\}}|dkr�tjd��nt|t�s�tjd��nd	|kr�tjd
|�f��n|d	dkr$tjd|�|d	f��nd|krLtjd|�f��nd|k|d<|jdd��|jdd�q~W������fd�}|S(s]Decorator to declare a wire protocol command.

    ``name`` is the name of the wire protocol command being provided.

    ``args`` is a dict defining arguments accepted by the command. Keys are
    the argument name. Values are dicts with the following keys:

       ``type``
          The argument data type. Must be one of the following string
          literals: ``bytes``, ``int``, ``list``, ``dict``, ``set``,
          or ``bool``.

       ``default``
          A callable returning the default value for this argument. If not
          specified, ``None`` will be the default value.

       ``example``
          An example value for this argument.

       ``validvalues``
          Set of recognized values for this argument.

    ``permission`` defines the permission type needed to run this command.
    Can be ``push`` or ``pull``. These roughly map to read-write and read-only,
    respectively. Default is to assume command requires ``push`` permissions
    because otherwise commands not declaring their permissions could modify
    a repository that is supposed to be read-only.

    ``cachekeyfn`` defines an optional callable that can derive the
    cache key for this request.

    ``extracapabilitiesfn`` defines an optional callable that defines extra
    command capabilities/parameters that are advertised next to the command
    in the capabilities data structure describing the server. The callable
    receives as arguments the repository and protocol objects. It returns
    a dict of extra fields to add to the command descriptor.

    Wire protocol commands are generators of objects to be serialized and
    sent to the client.

    If a command raises an uncaught exception, this will be translated into
    a command error.

    All commands can opt in to being cacheable by defining a function
    (``cachekeyfn``) that is called to derive a cache key. This function
    receives the same arguments as the command itself plus a ``cacher``
    argument containing the active cacher for the request and returns a bytes
    containing the key in a cache the response to this command may be cached
    under.
    cS@s,h|]"\}}|ddkr|�qS(tversioni((R�R8R9((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pys	<setcomp>�s		RRsCinvalid wire protocol permission; got %s; expected "push" or "pull"s:arguments for version 2 commands must be declared as dictst*s1* argument name not allowed on version 2 commandss@arguments for version 2 commands must declare metadata as a dictR�s6%s argument for command %s does not declare type fieldtbytestintR�tdictR�tbools/%s argument for command %s has illegal type: %stexamples9%s argument for command %s does not declare example fieldR�R�cS@sdS(N(R](((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyRy�RzR�c@sW�tkr"tjd���ntj|d�d�d�d�d��t�<|S(Ns+%s command already registered for version 2Rgt
transportsR5R�R�(R)RR`R
tcommandentry(Rx(RgR�R�R�R5R�(sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pytregister�s	
(RRN(R�R�R�R�R�R�(	R
t
TRANSPORTSR�RR`R]R�R�t
setdefault(R�RgR5R�R�R�RSR�((RgR�R�R�R5R�sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pytwireprotocommandUs84	
				c@sO�stjd��n�dkr6tjd��n���fd�}|S(szConstruct a cache key derivation function with common features.

    By default, the cache key is a hash of:

    * The command name.
    * A global cache version number.
    * A local cache version number (passed via ``localversion``).
    * All the arguments passed to the command.
    * The media type used.
    * Wire protocol version string.
    * The repository path.
    s(only allargs=True is currently supporteds$must set localversion argument valuec@s�t�}|jdkrdSitd6�d6tj��d6td6td6|jd6}�rutj	|�|d<n|j
|�tj�}x$t
j|�D]}|j|�q�Wtj|j��S(	NRt
globalversiontlocalversionR6t	mediatypeR�R'Rg(R)R5R]tGLOBAL_CACHE_VERSIONR	tsysbytesR-R�troottbyteskwargstadjustcachekeystatethashlibR�RR�R�t	hexdigest(R'R;R�RgR�tstatethashertchunk(tallargsR6R�(sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyR��s"



N(RR`R](R6R�R�R�((R�R6R�sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pytmakecommandcachekeyfn�s
5cC@sdS(s�Construct a cacher for a cacheable command.

    Returns an ``iwireprotocolcommandcacher`` instance.

    Extensions can monkeypatch this function to provide custom caching
    backends.
    N(R](R'R;R6RgtobjencoderfnR}R~((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyR�
s	c
C@s�|j}|j}t�}g}t|t�sBtjd��nxM|D]E}d|krmtjd��n|d}|dkr�d|kr�tjd��nx�|dD]/}||kr�|j|�|j|�q�q�WqI|dkr�x2dD]*}	|	|kr�tjd	|	f��q�q�Wxh|j	d
|d|dd�D]>}
|j
|
�}||krE|j|�|j|�qEqEWqI|dkryx2dD]*}	|	|kr�tjd|	f��q�q�W|ds�tjd��n|d
rg|d
D]}||�r�|^q�}n	tg}xetj
|||d�jD]/}||krC|j|�|j|�qCqCWqItjd|f��qIW|S(s8Resolve nodes from a revisions specifier data structure.s%revisions must be defined as an arrayR�s*type key not present in revision specifiertchangesetexplicittnodess=nodes key not present in changesetexplicit revision specifiertchangesetexplicitdepthtdepths?%s key not present in changesetexplicitdepth revision specifiersancestors(%ln, %d)itchangesetdagrangetrootstheadss:%s key not present in changesetdagrange revision specifiers.heads key in changesetdagrange cannot be emptys#unknown revision specifier type: %s(R�R�(R�R�(t	changelogthasnodeR�R�R�RRlRGtaddtrevstnodeRRtoutgoingR�(
R't	revisionstclt	clhasnodetseenR�R�ttypR�R�trevtnR((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pytresolvenodessd			







,	#
t	branchmapR5Rcc@sd�|j�j�D�VdS(NcS@s(i|]\}}|tj|��qS((Rt	fromlocal(R�R8R9((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pys
<dictcomp>_s	(R�t	iteritems(R'R;((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pytbranchmapv2]stcapabilitiescc@st||�VdS(N(R�(R'R;((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pytcapabilitiesv2bst
changesetdataRgR�R�R�s	abcdef...R�R�R�R�R�tparentstrevisiont	bookmarkstphaseR�tfieldscc@s.|j}t||�}|j�}|rF|jddtdd�nit|�d6Vd|krgni}x9|jj�D](\}}	|j|	t	��j
|�q}Wx3|D]+}	i|	d6}
d|kr�|j|	�|
d<nd|kr!|rd	|
d<q!||	}|j�|
d<nd
|krW|	|krWt
||	�|
d
<||	=ng}g}
d|kr�|j|	dt�}|jdt|�f�|
j|�n|r�||
d
<n|
Vx|
D]}|Vq�Wq�Wd
|kr*x<t
|j��D]%\}	}i|	d6t
|�d
6Vq�WndS(Ntpreoutgoingtthrowtsourcetservet
totalitemsRR�RtpublicRRtrawtfieldsfollowing(R�R�t
publishingthookRDRt
_bookmarksR�R�R�R�RtphasestrR�RRGR�(R'R;R�RR�R�Rt
nodebookmarkstmarkR�tdtctxt
followingmetat
followingdatatrevisiondataR�tmarks((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyRfsR		 







tFileAccessErrorcB@seZdZd�ZRS(s.Represents an error accessing a specific file.cC@s||_||_||_dS(N(tpathtmsgRg(R�RRRg((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyR��s		(R�R�t__doc__R�(((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyR�scC@s7|j|�}t|�s3t|d|f��n|S(s�Obtain a file storage object for use with wire protocol.

    Exists as a standalone function so extensions can monkeypatch to add
    access control.
    sunknown file: %s(tfileRR(R'R;Rtfl((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pytgetfilestore�scc@sS|jj}x@|D]8}i|jd6}d|krN|j|jg|d<nd|kr�|j|d|j�}||j��|d<ng}g}	d|kr|jdk	r�|jdt	|j�f�|	j|j�q|j
|d<|jdt	|j�f�|	j|j�n|r0||d<n|Vx|	D]}
|
Vq<WqWdS(	NR�RtlinknodetfileidRt
deltabasenodetdeltaR(R�R�tp1nodetp2nodetfilectxtintrorevRR]RGRtbasenodeR%(R'RR�RtclnodeRRtfctxRRR�((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pytemitfilerevisions�s.




c	C@s�|raxXdD]M}xD|j|g�D]0}|jd�s&tjd||f��q&q&Wq
Wn|r�tj|jdd|jdg�d|jdg��}ntj|jd�}tj|j�|�S(	s,Construct a matcher from a path filter dict.tincludetexcludespath:srootfilesin:s<%s pattern must begin with `path:` or `rootfilesin:`; got %sRz(R.R/(spath:srootfilesin:(	R,t
startswithRRltmatchmodRR�tintersectmatcherstnarrowmatch(R't
pathfilterR�tpatterntmatcher((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pytmakefilematchers
tfiledataR�cC@stS(N(R\(((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyRyRzthaveparentss
0123456...R"R�sfoo.txtRR�R�cc@s�yt|||�}Wn+tk
rC}tj|j|j��nXxQ|D]I}y|j|�WqKtjk
r�tjdt|�f��qKXqKW|j	|dd|kd|�}	it
|�d6Vx"t|||	|�D]}
|
Vq�WdS(Nsunknown file node: %sRRtassumehaveparentrevisionsR(R!RRRlRRgR�tLookupErrorRt
emitrevisionsRR-(R'R;R9R�RRtstoreR7R�R�R�((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyR8s"!
		cC@s |jjdd�}i|d6S(NR=s'server.filesdata.recommended-batch-sizetrecommendedbatchsize(R(t	configint(R'R;t	batchsize((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pytfilesdatacapabilitiesTs	t	filesdatacC@stS(N(R\(((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyRy`RztfirstchangesetR�cC@sdS(N(R](((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyRylRzs
path:testsR.R4R�c#@s�|j�t||�}t||��t�}tjt�}x+|D]#}	||	}
|j|
j��qFWt�fd�|D��}|rLt�fd�|D��}x|D]�}yt	|||�}
Wn+t
k
r�}tj|j
|j��nXxF|
D]>}|
j|�}||kr||j|
j|��qqWq�Wndxa|D]Y}	||	j�}x@|j�j�D],\}}�|�r|||j|�q|q|WqSWit|�d6td�|j�D��d6Vx�t|j��D]�\}}yt	|||�}
Wn+t
k
rA}tj|j
|j��nXi|d6t|�d6V|
j|dd|kd	|�}x"t||||�D]}|Vq�Wq�WdS(
Nc3@s!|]}�|�r|VqdS(N((R�tp(tfilematcher(sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pys	<genexpr>�sc3@s|]}�j|�VqdS(N(R�(R�R�(R�(sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pys	<genexpr>�st
totalpathscs@s|]}t|�VqdS(N(R(R�R9((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pys	<genexpr>�sRRRRR:(R�R�R7R�tcollectionstdefaultdictR�tfilesR�R!RRRlRRgtlinkrevR�R�tmanifestctxtreadR�RtsumtvaluesR<R-(R'R;R9RR4R�R�tchangedpathstfnodesR�RtoutgoingclrevsRR=R7R�RJtmctxtfnodet	filenodesR�((R�REsA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyRB[sR)		



(

	R�cC@stS(N(R\(((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyRy�Rzt
publiconlycc@s'|r|jd�}n|j�VdS(Nt	immutable(RuR�(R'R;RU((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pytheadsv2�stknowntdeadbeefcc@s+djd�|j|�D��}|VdS(NRzcs@s!|]}|rdndVqdS(t1t0N((R�R�((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pys	<genexpr>�s(RORX(R'R;R�tresult((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pytknownv2�s"tlistkeystnst	namespacecc@s7|jtj|��}d�|j�D�}|VdS(NcS@s1i|]'\}}tj|�tj|��qS((RR�(R�R8R9((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pys
<dictcomp>�s	(R^RttolocalR�(R'R;R`tkeys((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyt
listkeysv2�s
R�tfooR�cc@s'tj|�}|j|�}|VdS(N(RRaR�(R'R;R�R�((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pytlookupv2�s
cC@s |jjdd�}i|d6S(NR=s*server.manifestdata.recommended-batch-sizeR>(R(R?(R'R;R@((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pytmanifestdatacapabilitiess	tmanifestdatacC@stS(N(R\(((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyRyRzRzttreecc@s�|jj|�}xK|D]C}y|j|�Wqtjk
r[tjd|f��qXqW|j|dd|kd|�}it|�d6Vx|D]�}	i|	jd6}
d|kr�|	j	|	j
g|
d<ng}g}d|krg|	jdk	r+|j
dt|	j�f�|j
|	j�qg|	j|
d<|j
d	t|	j�f�|j
|	j�n|rz||
d
<n|
Vx|D]}
|
Vq�Wq�WdS(Nsunknown node: %sRRR:RR�RR$R%R(tmanifestlogt
getstorageR�RR;RlR<RR�R&R'RR]RGR*R%(R'R;R9R�RRhR=R�R�RRRRR�((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyRgs>
	




tpushkeytoldtnewcc@s?|jtj|�tj|�tj|�tj|��VdS(N(RkRRa(R'R;R`R�RlRm((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyt	pushkeyv2TsR�R�RiRIcC@sdS(N(R](((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyRyzRzc#@s�tj��s!tjd��nt|�}ddh}||}|rptjddjt|��f��n�j��t�j	j
��}WdQXg}d}xv|D]n\�}	�d|kr��jd�r�n!d|kr��jd�r�nq�|jd	��f�|�7}q�Wit
|�d
6|d6VxW|D]O\}
��i|
d6�d
6�d6V���fd�}tj|��Vq=WdS(Nsstream clone is disabledR�Risunknown file type: %ss, it00changelogt
00manifestR=t	filecountt	totalsizetlocationRtsizec3@sJ�j�ddt��,}x"tj|d��D]}|Vq1WWdQXdS(Ntrbt	auditpathtlimit(tsvfsR\Rt
filechunkiter(tfhR�(R�R'Rt(sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pytgetfiledata�s(R
R�RRlR�ROR�tlockR�R=ttopfilesR0RGRR
tindefinitebytestringresponse(R'R;RIR4tallowedfilestunsupportedR}t	sendfilesRrtencodednameRsR{((R�R'RtsA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyR�qs>
	

		(Ht
__future__RRGR�R�ti18nRR�RRRzRRRRR1RR	R
RRR
tutilsRRRR-R�tcommanddictR)R�R<R&R.R_RvRjtimplementertbaseprotocolhandlertobjectR*R�R�R�R]R�R\R�R�R�R�RR�RRoRR!R-R7RDR8RARBRWR�R]RcReRfRgRnR�(((sA/usr/lib64/python2.7/site-packages/mercurial/wireprotov2server.pyt<module>sXF		^	0	>	_		EC		D	&	jJ		H
M		(	

!	

	
H
		

0