403 Forbidden


Disable Functions:
Path : /usr/lib64/python2.7/site-packages/mercurial/
File Upload :
Command :
Current File : //usr/lib64/python2.7/site-packages/mercurial/wireproto.pyo

�
}�^c@s�ddlZddlZddlZddlZddlmZddlmZmZddl	Z
ddlZddlZddl
Z
ddlZddlZiZdefd��YZdefd��YZdefd	��YZd
efd��YZd�Zd
d�Zd
d�Zd�Zd�Zd�Zdejfd��YZdefd��YZdefd��YZdefd��YZ defd��YZ!d�Z"d�Z#dd �Z$d!ed"<d#�Z%d!ed$<d%�Z&d!ed&<d'�Z'd!ed(<d)�Z(d!ed*<d+�Z)d!ed,<d-�Z	d!ed.<d/�Z*d!ed0<d1�Z+d!ed2<d3�Z,d!ed4<d5�Z-d!ed6<d7�Z.d!ed8<d9�Z/d!ed:<d;�Z0d!ed<<d=�Z1d>ed?<d@�Z2dA�Z3d!edB<dC�Z4d>edD<dE�Z5ie%dFfd"6e&dGfd$6e'dfd&6e(dHfd(6e)dfd*6e	dIfd,6e*dJfd.6e+dKfd06e,dLfd26e-dfd46e.dfd66e1dMfd<6e/dNfd86e0dOfd:6e2dPfd?6e4dfdB6e5d4fdD6Z6dS(Qi����N(t_(tbinthextfuturecBseZdZd�ZRS(s'placeholder for a value to be set latercCs1tj|d�r$tjd��n||_dS(Ntvaluesfuture is already set(tutiltsafehasattrterrort	RepoErrorR(tselfR((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pytsets(t__name__t
__module__t__doc__R
(((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyRstbatchercBs)eZdZd�Zd�Zd�ZRS(s'base class for batches of commands submittable in a single request

    All methods invoked on instances of this class are simply queued and
    return a a future for the result. Once you call submit(), all the queued
    calls are performed and the results set in their respective futures.
    cCs
g|_dS(N(tcalls(R	((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyt__init__"scs��fd�}|S(Ncs)t�}�jj�|||f�|S(N(RRtappend(targstoptstresref(tnameR	(s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pytcall%s	((R	RR((RR	s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyt__getattr__$scCsdS(N((R	((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pytsubmit*s(RRR
RRR(((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyRs		t
localbatchcBs eZdZd�Zd�ZRS(s"performs the queued calls directlycCstj|�||_dS(N(RRtlocal(R	R((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR/s
cCsFx?|jD]4\}}}}|jt|j|�||��q
WdS(N(RR
tgetattrR(R	RRRR((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR2s(RRR
RR(((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR-s	tremotebatchcBs)eZdZd�Zd�Zd�ZRS(s<batches the queued calls; uses as few roundtrips as possiblecCstj|�||_dS(sNremote must support _submitbatch(encbatch) and
        _submitone(op, encargs)N(RRtremote(R	R((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR8s
cCsgg}}x�|jD]�\}}}}t|j|�}t|dd�}|dk	r�||j||�}	|	j�\}
}|r�|j||
f�|j|	||f�q�|j|
�q|r�|j||�gg}}n|j|||��qW|r|j||�ndS(Nt	batchable(	RRRtNonetim_selftnextRR
t
_submitreq(R	treqtrspRRRRtmtdtbatchablefnRtencargsorrest	encresref((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR=s"
c	Cse|jj|�}xLt||�D];\}}|\}}}|j|�|j|j��q"WdS(N(Rt_submitbatchtzipR
R!(	R	R#R$t
encresultstencrestrRR(R((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR"Qs

(RRR
RRR"(((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR6s		cs#�fd�}t|d��|S(s�annotation for batchable methods

    Such methods must implement a coroutine as follows:

    @batchable
    def sample(self, one, two=None):
        # Handle locally computable results first:
        if not one:
            yield "a local result", None
        # Build list of encoded arguments suitable for your wire protocol:
        encargs = [('one', encode(one),), ('two', encode(two),)]
        # Create future for injection of encoded result:
        encresref = future()
        # Return encoded arguments and future:
        yield encargs, encresref
        # Assuming the future to be filled with the result from the batched
        # request now. Decode it:
        yield decode(encresref.value)

    The decorator returns a function which wraps this coroutine as a plain
    method, but adds the original method as an attribute called "batchable",
    which is used by remotebatch to split the call into separate encoding and
    decoding phases.
    cs[�||�}|j�\}}|s+|S|d}|j|j�j|��|j�S(Ni(R!R
t
_submitonet	func_name(RRRR'R(R	(tf(s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pytplainqs
R(tsetattr(R0R1((R0s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyRXst cCs |rtt|j|��SgS(N(tmapRtsplit(tltsep((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyt
decodelist~scCs|jtt|��S(N(tjoinR4R(R6R7((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyt
encodelist�scCs4|jdd�jdd�jdd�jdd�S(	Nt:s::t,s:,t;s:;t=s:=(treplace(R1((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyt	escapearg�s
cCs4|jdd�jdd�jdd�jdd�S(	Ns:=R>s:;R=s:,R<s::R;(R?(tescaped((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pytunescapearg�s
cKs|S(N((R((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyttodict�stwirepeercBs�eZd�Zd�Zd�Zed��Zed��Zed��Zed��Z	d�Z
d�Zed	��Zed
��Z
d�Zd�Zd
�Zddd�Zd�Zdddd�ZRS(cCs
t|�S(N(R(R	((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pytbatch�scCs~g}xJ|D]B\}}djd�|j�D��}|jd||f�q
W|jdddj|��}|jd�S(NR<css|]}d|VqdS(s%s=%sN((t.0tp((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pys	<genexpr>�ss%s %sREtcmdsR=(R9t	iteritemsRt_callR5(R	R#RHtoptargsdictRR$((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR)�scCs|j||�S(N(RJ(R	RKR((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR.�sccs�|jdtd��t�}tdtj|��|fV|j}|d jdd�\}}t|�r{t	|�Vn|j
tj|��dS(Ntlookupslook up remote revisiontkeyi����R3i(
t
requirecapRRRCtencodingt	fromlocalRR5tintRt_abortRR(R	RNR0tdtsuccesstdata((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyRM�s		ccsgt�}i|fV|j}yt|d �VWn0tk
rb|jtjtd�|��nXdS(Ni����sunexpected response:(RRR8t
ValueErrorRSRt
ResponseErrorR(R	R0RT((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pytheads�s		
ccs�t�}tdt|��|fV|j}y(g|D]}tt|��^q6VWn0tk
r�|jtj	t
d�|��nXdS(Ntnodessunexpected response:(RRCR:RtboolRRRWRSRRXR(R	RZR0RT((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pytknown�s		(
ccs�t�}i|fV|j}yli}xZ|j�D]L}|jdd�\}}tjtj|��}t|�}|||<q3W|VWn0t	k
r�|j
tjt
d�|��nXdS(NR3isunexpected response:(RRt
splitlinesR5RPttolocalturllibtunquoteR8t	TypeErrorRSRRXR(R	R0RTt	branchmapt
branchpartt
branchnametbranchheads((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyRb�s			
cCs�t|�}|jdd|�}y3g|j�D]}tt|��^q1}|SWn0tk
r�|jtjt	d�|��nXdS(NtbranchesRZsunexpected response:(
R:RJR]ttupleR8RWRSRRXR(R	RZtnRTtbtbr((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyRf�s+
cCs�d}g}x�tdt|�|�D]�}djg||||!D]}t|d�^qC�}|jdd|�}y!|jd�|j�D��Wq%tk
r�|jt	j
td�|��q%Xq%W|S(	NiiR3t-tbetweentpairscss'|]}|rt|�pgVqdS(N(R8(RFR6((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pys	<genexpr>�ssunexpected response:(txrangetlenR9R:RJtextendR]RWRSRRXR(R	RmRER-tiRGRhRT((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyRl�s6!
'c	
cs)|jd�stdfVnt�}|jjd||f�tdtj|�dtj|�dtj|�dtj|��|fV|j	}|j
dd�\}}ytt|��}Wn)t
k
r�tjtd	�|��nXx0|jt�D]}|jjtd
�|�q�W|VdS(Ntpushkeyspreparing pushkey for "%s:%s"
t	namespaceRNtoldtnews
is"push failed (unexpected response):sremote: (tcapabletFalseRRtuitdebugRCRPRQRR5R[RRRWRRXRR]tTruetstatus(	R	RsRNRtRuR0RTtoutputR6((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyRr�s$		
ccs�|jd�sidfVnt�}|jjd|�tdtj|��|fV|j}i}xE|j	�D]7}|j
d�\}}tj|�|tj|�<qsW|VdS(NRrspreparing listkeys for "%s"
Rss	(RvRRRxRyRCRPRQRR]R5R^(R	RsR0RTR-R6tktv((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pytlistkeyss		 cCs
|jd�S(Nt
stream_out(t_callstream(R	((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR�scCs:t|�}|jdd|�}tj|j|�d�S(NtchangegrouptrootstUN(R:R�tchangegroupmodt
unbundle10t_decompress(R	RZtkindRhR0((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR�scCsb|jdtd��t|�}t|�}|jdd|d|�}tj|j|�d�S(Ntchangegroupsubsetslook up remote changestbasesRYR�(RORR:R�R�R�R�(R	R�RYR�R0((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR�scCs�|jdtd��i}|dk	r;t|�|d<n|dk	rZt|�|d<n|jd|�}tj|j|�d�S(Nt	getbundleslook up remote changesRYtcommonR�(RORRR:R�R�R�R�(R	tsourceRYR�RR0((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR� scCs|dgkrQ|jd�rQtdtjdjt|���j�g�}nt|�}|jd|d|�\}}|dkr�tj	t
d�|��nyt|�}Wn)tk
r�tj	t
d�|��nXx0|j
t�D]}|jjt
d	�|�q�W|S(
sSend cg (a readable file-like object representing the
        changegroup to push, typically a chunkbuffer object) to the
        remote server as a bundle. Return an integer indicating the
        result of the push (see localrepository.addchangegroup()).tforcetunbundlehashthashedttunbundleRYspush failed:s"push failed (unexpected response):sremote: (RvR:Rtsha1R9tsortedtdigestt	_callpushRRXRRRRWR]RzRxR{(R	tcgRYR�tretR|R6((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR�*s -
cCsTi}|dk	r||d<n|dk	r8||d<n|jdd|d||�S(Ntthreetfourt
debugwireargstonettwo(RRJ(R	R�R�R�R�tfiveR((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR�Ds

N(RRRER)R.RRMRYR\RbRfRlRrRR�R�R�RR�R�R�(((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyRD�s"			

						
	t	streamrescBseZd�ZRS(cCs
||_dS(N(tgen(R	R�((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyRPs(RRR(((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR�OstpushrescBseZd�ZRS(cCs
||_dS(N(tres(R	R�((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyRTs(RRR(((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR�SstpusherrcBseZd�ZRS(cCs
||_dS(N(R�(R	R�((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyRXs(RRR(((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR�WstooberrorcBseZd�ZRS(cCs
||_dS(N(tmessage(R	R�((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR\s(RRR(((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR�[scCs>|jd�}t|\}}|j|�}||||�S(Ntserved(tfilteredtcommandstgetargs(trepotprototcommandtfunctspecR((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pytdispatch_scCski}x2|D]*}||kr
||||<||=q
q
W|rgtjjd|dj|�f�n|S(Ns&abort: %s got unexpected arguments %s
R<(tsyststderrtwriteR9(tcmdtkeystothersRR}((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pytoptionses
R�cs��fd�}|S(s#decorator for wire protocol commandcs|�ft�<|S(N(R�(R�(RR(s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pytregisterrs((RRR�((RRs9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pytwireprotocommandpstpullREcCs�|jd�}g}x�|jd�D]�}|jdd�\}}i}xE|jd�D]4}	|	rY|	jd�\}
}t|�||
<qYqYWt|\}}
tj|d�r�|jtj|d��n|
r�|
j�}i}xo|D]g}|d	krGi}x1|j	�D]#}||kr||||<qqW||d	<q�||||<q�W|||g|D]}||^qi�}n|||�}t
|t�r�|S|jt
|��q%Wdj|�S(
NR�R=R3iR<R>t	checkpermtpusht*(R�R5RBR�RRR�tpermissionstgetR�t
isinstanceR�RR@R9(R�R�RHR�R�tpairRKRtvalstaRhR~R�R�R�RVR}tstarRNtresult((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyREys:

,RlcCsog|jd�D]}t|d�^q}g}x.|j|�D]}|jt|�d�qAWdj|�S(NR3Rks
R�(R5R8RlRR:R9(R�R�RmRGR-Ri((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyRl�s
+RbcCsw|j�}g}xU|j�D]G\}}tjtj|��}t|�}|jd||f�qWdj|�S(Ns%s %ss
(	RbRIR_tquoteRPRQR:RR9(R�R�RbRYtbranchRZRdtbranchnodes((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyRb�sRfcCsPt|�}g}x.|j|�D]}|jt|�d�q"Wdj|�S(Ns
R�(R8RfRR:R9(R�R�RZR-Ri((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyRf�s
tcapabilitiescCs�dj�}t|j�r�|jjddt�rC|jd�n|j|j@}|td�ss|jd�q�|jddj	|��n|jd	dj	t
j��|jd
�dj	|�S(
NsMlookup changegroupsubset branchmap pushkey known getbundle unbundlehash batchtservertpreferuncompressedsstream-preferredtrevlogv1tstreams
streamreqs=%sR<sunbundle=%sshttpheader=1024R3(R�(R5t_allowstreamRxt
configboolRwRtrequirementstsupportedformatsR
R9R�tbundlepriority(R�R�tcapstrequiredformats((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR��s
R�cCs1t|�}|j|d�}t|j|��S(Ntserve(R8R�R�tgroupchunks(R�R�R�RZR�((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR��sR�cCs@t|�}t|�}|j||d�}t|j|��S(NR�(R8R�R�R�(R�R�R�RYR�((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR��sR�cCs+tdddg|�}|j|||�S(NR�R�R�(R�R�(R�R�R�R�R�R((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR��sR�cCsjtdddg|�}x*|j�D]\}}t|�||<q%W|jd|�}t|j|��S(NR�RYR�R�(R�RIR8R�R�R�(R�R�R�RR}R~R�((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR��s
RYcCs|j�}t|�dS(Ns
(RYR:(R�R�th((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyRY�sthellocCsdt||�S(sthe hello command returns a set of lines describing various
    interesting things about the server, in an RFC822-like format.
    Currently the only one defined is "capabilities", which
    consists of a line in the form:

    capabilities: space separated list of tokens
    scapabilities: %s
(R�(R�R�((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR��sRcCsf|jtj|��j�}djg|D].\}}dtj|�tj|�f^q+�}|S(Ns
s%s	%s(RRPR^titemsR9RQ(R�R�RsRTR}R~tt((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR�s	;RMcCsey/tj|�}||}|j�}d}Wn%tk
rV}t|�}d}nXd||fS(Niis%s %s
(RPR^Rt	Exceptiontstr(R�R�RNR}tcR-RUtinst((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyRMs


R\cCs&djd�|jt|��D��S(NR�css!|]}|rdpdVqdS(t1t0N((RFRi((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pys	<genexpr>s(R9R\R8(R�R�RZR�((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR\sR�RrcCsDt|�dkr^|jd�|kr^y |jd�tj|�}Wqmtk
rZqmXntj|�}tj|d�r|j�y=|j	tj|�tj|�tj|�|�p�t
}Wntjk
r�t
}nX|j�}dt
|�|fS|j	tj|�tj|�tj|�|�}dt
|�S(Nis
string-escapesutf-8trestores%s
%ss%s
(RotencodetdecodeRPR^tUnicodeDecodeErrorRRtredirectRrRwtAbortR�RR(R�R�RsRNRtRuR-R|((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyRrs&'



cCs|jddtdt�S(NR�tuncompressedt	untrusted(R�Rz(Rx((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR�1sR�cs�t|j�sdSg}d�y{|j�}z]|jjd�xF|jj�D]5\}}}|rQ|j||f��|7�qQqQWWd|j�XWntj	k
r�dSX�fd�}t
|||���S(sIf the server supports streaming clone, it advertises the "stream"
    capability with a value representing the version and flags of the repo
    it is serving. Client checks to see if it understands the format.

    The format is simple: the server writes out a line with the amount
    of files, then the total amount of bytes to be transferred (separated
    by a space). Then, for each file, the server first writes the filename
    and filesize (separated by the null character), then the file contents.
    s1
is	scanning
Ns2
c3sPdV|jjdt|��f�dt|��fV|j}|j}|jj}t|_y�x�|D]�\}}|r�|jjd||f�ndtj|�|fV|dkr�||�}z|j	|�}	Wd|j
�X|	Vqkx(tj||�d|�D]}
|
VqWqkWWnt
k
rB||_�nX||_dS(	s,stream out all metadata files in repository.s0
s%d files, %d bytes to transfer
s%d %d
ssending %s (%d bytes)
s%s%d
iNtlimit(RxRyRotsopenert	mustauditt	debugflagRwtstoret	encodedirtreadtcloseRt
filechunkiterR�(R�tentriesttotalR�toldauditR�RtsizetfpRVtchunk(ttotal_bytes(s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pytstreamerSs2			"
	(R�RxtlockRyR�twalkRtreleaseRt	LockErrorR�(R�R�R�R�RtenameR�R�((R�s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR�5s""R�csAt|����fd�}|j�|�s;td�Stjdd�\}}tj|d�}d}z�|j|��j�}z�|�s�td�S|j	d�t
j|d�}	y�j
|	d|j��}Wn*tjk
r}
tjjd	|
�nXWd|j�Xt|�SWd|j�tj|�XdS(
Ncs[�j�}tjdjt|���j�}�dgkpZ�|kpZ�d|gkS(NR�R�R�(RYRR�R9R�R�(RYt
heads_hash(R�ttheir_heads(s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pytcheck_heads{s$s=repository changed while preparing changes - please try againtprefixshg-unbundle-swb+is=repository changed while uploading changes - please try againR�s
abort: %s
(R8R�R�ttempfiletmkstemptostfdopentgetfileR�tseekR�t
readbundleRtaddchangegroupt_clientRR�R�R�R�R�R�R�tunlink(R�R�RYRtfdttempnameR�R-R�R�R�((R�R�s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyR�xs0
	

	


scmds *RmRZR�sbases headss	one two *R�snodes *RsRNsnamespace key old new(7R_RRR�ti18nRtnodeRRR�R�tpeerRRPRR�R�tobjectRRRRRR8R:R@RBRCtpeerrepositoryRDR�R�R�R�R�R�R�RERlRbRfR�R�R�R�RYR�RRMR\RrR�R�R�R�(((s9/usr/lib64/python2.7/site-packages/mercurial/wireproto.pyt<module>s�0<	"	&				�		
	*
	
		
	
	
	
	
	
	
	
	

	
	
	
		
	B
	.

















404 Not Found
[ LogOut ]