403Webshell
Server IP : 108.167.183.253  /  Your IP : 216.73.216.60
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/fastannotate/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

�+�b��@s�ddlmZddlZddlZddlmZddlmZddlm	Z	m
Z
mZmZm
Z
mZmZddlmZddlmZd	d
�Zdd�Zd
d�Zdd�Zdd�Zdd�Zdd�Zejdd��Zd!dd�Zdd�Zdd�Zdd �Z dS)"�)�absolute_importN)�_)�open)�error�
extensions�hg�pycompat�util�wireprotov1peer�wireprotov1server)�urlutil�)�contextcCs"|�dd�}|st�td���|S)z)get the mainbranch, and enforce it is set�fastannotates
mainbranchsFfastannotate.mainbranch is required for both the client and the server)�configrZAbortr)�ui�master�r�A/usr/lib64/python3.9/site-packages/hgext/fastannotate/protocol.py�
_getmasters��rcCs|||�}|�d�|S)N�getannotate)�append)Zorig�repo�proto�resultrrr�
_capabilities/s

rc
Cs`d}|j�ddd�}t�||���(}|r�t|j�}znz|�|�sL|�||�WnFty�|��z|�||�Wnty�|��Yn0Yn0W|�	�n
|�	�0|j
|k�r<|j|jfD]v}t
j�|�s�q�t|d��}	|	��}
Wd�n1s�0Yt|jjd�}||d�}|d|t|
�|
f7}q�Wd�n1�sR0Y|S)N�rsserverbuildondemandTsrb�/s%s%d%s)rZ
configboolr�annotatecontextr�
isuptodateZannotate�	ExceptionZrebuild�close�lastnodeZ
revmappathZlinelogpath�os�path�existsr�read�len�vfs�base)
rrr$r"rZ
buildondemand�actxr�p�f�contentZ
vfsbaselen�relpathrrr�_getannotate5s6�

&8r/cCs"dtjvrdSt�dd�t�dS)Nrs
path lastnode)rZcommandsZwireprotocommandr/rrrr�_registerwireprotocommand`s


�r0cCst�t�tdt�dS)Ns
_capabilities)r0rZwrapfunctionrr�rrrr�
serveruisetuphsr2cCs�i}d}t|�d}d}d}}||kr�|||d�}|dkr�|dkr�||d|dt|��||<|t|�7}d}d}}q�|dkr�d}n"|dkr�||7}n|dkr�||7}|d7}q |S)Nrr
r�)r'�int)Zpayloadr�i�l�stateZvfspath�sizeZchrrr�_parseresponseps* 


r9cs G�fdd�d|j�}||_dS)Ncs eZdZejd�fdd�	�ZdS)z#peersetup.<locals>.fastannotatepeerNcs6|�d�s��td��dS||p$dd�}|tfSdS)Nrs*remote peer cannot provide annotate cache
)NNr�spathslastnode)Zcapable�warnrr9)�selfr$r"�argsr1rr�getannotate�s

z/peersetup.<locals>.fastannotatepeer.getannotate)N)�__name__�
__module__�__qualname__r
Z	batchabler>rr1rr�fastannotatepeer�srB��	__class__)r�peerrBrr1r�	peersetup�s
rFccs\|j}|�ddd�}t�d|||�}|d}t�|i|�}z|VW|��n
|��0dS)Nrs
remotepathsdefaultr)rrrZget_unique_pull_pathrrEr!)rrZ
remotedest�rZ
remotepathrErrr�annotatepeer�srHc
Cs�|sdS|durFt|��}t||||�Wd�S1s<0Y|durRi}|j}g}|����}|�dt|��|D]"}|�|�d||�|�d���q~|D]�}|�	�}	dd�t
�|	�D�}	t|	�D]�}
|
�
d�r�d|
d	v�r�|�d
|
�q�|	|
}|j�r |�dt|�|
f�|j�tj�|
��|�|
d��}|�|�Wd�q�1�sb0Yq�q�Wd�n1�s�0YdS)
z1download annotate cache from the server for pathsNs"fastannotate: requesting %d files
rr:cSsi|]\}}t�|�|�qSr)r	Zpconvert)�.0r+�vrrr�
<dictcomp>�rzclientfetch.<locals>.<dictcomp>s
fastannotate/s/../rs(fastannotate: ignored malicious path %s
s%fastannotate: writing %d bytes to %s
swb)rH�clientfetchrZcommandexecutor�debugr'rZcallcommand�getrrZ	iteritems�sorted�
startswithZ	debugflagr(�makedirsr#r$�dirname�write)
r�paths�lastnodemaprEr�resultsZbatcherr+rrGr$r-r,rrrrL�sN
,����
��rLc	Csl|j�ddd�}|dkr|Sg}|D]B}z t|�|��|krF|�|�Wq$tyd|�|�Yq$0q$|S)z�return a subset of paths whose history is long and need to fetch linelog
    from the server. works with remotefilelog and non-remotefilelog repos.
    rsclientfetchthreshold�
r)rZ	configintr'�filerr )rrTZ	thresholdrr$rrr�_filterfetchpaths�srYcCsGdd�d|j�}||_dS)Nc@seZdZddd�ZdS)z(localreposetup.<locals>.fastannotaterepoNc	
Ss�t|j�}g}i}ztt||�D]R}t�||��2}|j|dd�sR|�|�|j||<Wd�q1sf0Yq|r�t||||�Wn4t	y�}z|j�
d|�WYd}~n
d}~00dS)NF)�stricts"fastannotate: prefetch failed: %r
)rrrYrrrrr"rLr rM)	r<rTrErZneedupdatepathsrUr$r*�exrrr�prefetchfastannotate�s

*z=localreposetup.<locals>.fastannotaterepo.prefetchfastannotate)N)r?r@rAr\rrrr�fastannotaterepo�sr]rC)rrr]rrr�localreposetup�sr^cCs2t�|��rt||�ttjvr.tj�t�dS)N)r0�localr^rFrZwirepeersetupfuncsr)rrrrr�clientreposetup�s


r`)NN)!Z
__future__r�
contextlibr#Zmercurial.i18nrZmercurial.pycompatrZ	mercurialrrrrr	r
rZmercurial.utilsr�rrrr/r0r2r9rF�contextmanagerrHrLrYr^r`rrrr�<module>s($	+

0

Youez - 2016 - github.com/yon3zu
LinuXploit