MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 216.73.216.185
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /lib64/python2.7/site-packages/hgext/largefiles/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //lib64/python2.7/site-packages/hgext/largefiles/proto.pyc
�
Hq�Qc@s�ddlZddlZddlmZmZmZmZddlmZm	Z	ddl
mZddlZdZ
dZdZdZd�Zd�Zd�Zd	�Zd
�Zd�Zd�Zd
�ZdS(i����N(terrorthttppeertutilt	wireproto(t	batchabletfuture(t_sa
This repository uses the largefiles extension.

Please enable it in your Mercurial config file.
cCs|j�tj||�}tjtjj|��tj|d|j	j
�}z�yk|j|�|jj
d�|tj|j�kr�tdtd���n|j�tj||�Wn@tk
r}|jjtd�||jf�tjd�SXWd|j�Xtjd�S(sLPut a largefile into a repository's local store and into the
    user cache.t
createmodeis$largefile contents do not match hashs+largefiles: failed to put %s into store: %siN(tredirecttlfutilt	storepathRtmakedirstostpathtdirnametatomictempfiletstoreRtgetfilet_fptseekthexsha1tIOErrorRtclosetlinktousercachetuitwarntstrerrorRtpushrestdiscard(trepotprototshaR
ttmpfpte((s</usr/lib64/python2.7/site-packages/hgext/largefiles/proto.pytputlfiles$


cs~tj||�}|s4tjtd�|��nt|d��tj�j��d���fd�}t	j
|��S(sIRetrieve a largefile from the repository-local cache or system
    cache.s+requested largefile %s not present in cachetrbic3s,d�Vxtj��D]}|VqWdS(Ns%d
(Rt
filechunkiter(tchunk(tftlength(s</usr/lib64/python2.7/site-packages/hgext/largefiles/proto.pyt	generator@s	(R	tfindfileRtAbortRtopenRtfstattfilenoRt	streamres(RRRtfilenameR(((R&R's</usr/lib64/python2.7/site-packages/hgext/largefiles/proto.pytgetlfile2scCs tj||�}|sdSdS(sReturn '2
' if the largefile is missing, '0
' if it seems to be in
    good condition.

    The value 1 is reserved for mismatched checksum, but that is too expensive
    to be verified on every stat and must be caught be running 'hg verify'
    server side.s2
s0
(R	R)(RRRR/((s</usr/lib64/python2.7/site-packages/hgext/largefiles/proto.pyt	statlfileFscCs&d|jfd��Y}||_dS(NtlfileswirerepositorycBs)eZd�Zd�Zed��ZRS(c
Ssnt|jtj�r�d}y�|jdd|d|didd6�}|jdd�\}}x3|jt�D]"}|jj	t
d	�|d�qnWt|�SWqjtt
jfk
r�|jj	t
d
�|�dSXn�yS|jd|d|�\}}|dkr"tjt
d�|��nt|�SWn:tk
rAdStk
ritjt
d
�|��nXdS(NR"tdataRtheaderssapplication/mercurial-0.1scontent-types
isremote: s unexpected putlfile response: %stsputlfile failed:s&putlfile failed (unexpected response):(t
issubclasst	__class__RtNonet_calltsplitt
splitlinestTrueRRRtintt
ValueErrorturllib2t	HTTPErrort	_callpushRt
ResponseErrorR(tselfRtfdtrestdtoutputtltret((s</usr/lib64/python2.7/site-packages/hgext/largefiles/proto.pyR"Ts. 

css�|jdd|�}|j�}yt|�}Wn0tk
rc|jtjtd�|��nXx"tj	|d|�D]}|VqzWt
|jtj�r�|j
d�}|r�|jtjtd�|��q�ndS(	s<returns an iterable with the chunks of the file with sha shaR0Rsunexpected response:i�iiNi(t_callstreamtreadlineR=R>t_abortRRBRRR$R6R7Rtread(RCRtstreamR'R%((s</usr/lib64/python2.7/site-packages/hgext/largefiles/proto.pyR0ts
	cssYt�}i|d6}||fVyt|j�VWnttjfk
rTdVnXdS(NRi(RR=tvalueR>R?R@(RCRR&tresult((s</usr/lib64/python2.7/site-packages/hgext/largefiles/proto.pyR1�s	
(t__name__t
__module__R"R0RR1(((s</usr/lib64/python2.7/site-packages/hgext/largefiles/proto.pyR2Ss	 	(R7(RRR2((s</usr/lib64/python2.7/site-packages/hgext/largefiles/proto.pyt
wirereposetupRsDcCst||�dS(Ns largefiles=serve(tcapabilitiesorig(RR((s</usr/lib64/python2.7/site-packages/hgext/largefiles/proto.pytcapabilities�scCs,tj|�rtjt�Stj||�S(N(R	tislfilesrepoRtooberrortLARGEFILES_REQUIRED_MSGtheads(RR((s</usr/lib64/python2.7/site-packages/hgext/largefiles/proto.pyRY�s
cKsl|dkr$|jd�r$d}n|dkr\|jd�r\|djdd�|d<nt|||�S(NRYt
largefilestlheadstbatchtcmdssheads slheads (tcapabletreplacetssholdcallstream(RCtcmdtargs((s</usr/lib64/python2.7/site-packages/hgext/largefiles/proto.pytsshrepocallstream�s
	cKsl|dkr$|jd�r$d}n|dkr\|jd�r\|djdd�|d<nt|||�S(NRYRZR[R\R]sheads slheads (R^R_thttpoldcallstream(RCRaRb((s</usr/lib64/python2.7/site-packages/hgext/largefiles/proto.pythttprepocallstream�s
	(RR?t	mercurialRRRRtmercurial.wireprotoRRtmercurial.i18nRR	RXR8RTR`RdR"R0R1RSRURYRcRe(((s</usr/lib64/python2.7/site-packages/hgext/largefiles/proto.pyt<module>s""				H			

MMCT - 2023