403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib64/python3.9/site-packages/hgext/remotefilelog/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib64/python3.9/site-packages/hgext/remotefilelog/__pycache__/metadatastore.cpython-39.opt-1.pyc
a

�+�b��@sdddlmZddlmZmZddlmZmZGdd�dej�Z	Gdd�dej�Z
Gd	d
�d
e�ZdS)�)�absolute_import)�hex�sha1nodeconstants�)�	basestore�shallowutilcsjeZdZ�fdd�Zddd�Zejjddd��Zejjdd	��Z	d
d�Z
dd
�Zddd�Zdd�Z
�ZS)�unionmetadatastorecs:tt|�j|i|��||_|�d�|_|�dd�|_dS)N�
writestore�allowincompleteF)�superr�__init__�stores�getr	r
)�self�args�kwargs��	__class__��G/usr/lib64/python3.9/site-packages/hgext/remotefilelog/metadatastore.pyrszunionmetadatastore.__init__Nc	s��durt��|�vrgSi���fdd�}||fg}|r�|��\}}z.��|j||�d��|||�}|�|�Wq6ty�|js��||f||fkr��Yq60q6�S)��Returns as many ancestors as we're aware of.

        return value: {
           node: (p1, p2, linknode, copyfrom),
           ...
        }
        Ncs�||fg}g}t�}|r�|��\}}||f|vr2q|�||f���|�}|s^|�||f�q|\}}	}
}|tjkr�|�vr�|�|p�||f�|	tjkr|	�vr|�||	f�q|S�N)�set�pop�addr�appendrZnullid)�curname�curnodeZqueue�missing�seen�name�node�valueZp1Zp2�linknodeZcopyfrom��	ancestors�knownrr�traverse(s$

z1unionmetadatastore.getancestors.<locals>.traverse�r&)rr�update�_getpartialancestors�extend�KeyErrorr
)	rr r!r&r'rrrZ
newmissingrr$r�getancestorss*
�

zunionmetadatastore.getancestorsc	CsJ|jD].}z|j|||d�WSty2Yq0qt|t|�f��dS)Nr()r
r-r,r)rr r!r&�storerrrr*Ss
z'unionmetadatastore._getpartialancestorsc	CsF|jD]*}z|�||�WSty.Yq0qt|t|�f��dSr)r
�getnodeinfor,r)rr r!r.rrrr/]s
zunionmetadatastore.getnodeinfocCstd��dS)Ns5cannot add content only to remotefilelog contentstore��RuntimeError�rr r!�datarrrrgs�zunionmetadatastore.addcCs"|}|jD]}|r
|�|�}q
|Sr)r
�
getmissing)r�keysrr.rrrr4ls

zunionmetadatastore.getmissingcCs|jD]}|�||�qdSr)r
�
markledger)r�ledger�optionsr.rrrr6ss
zunionmetadatastore.markledgercCsdd�|jD�}tj|�S)NcSsg|]}|���qSr)�
getmetrics)�.0�srrr�
<listcomp>x�z1unionmetadatastore.getmetrics.<locals>.<listcomp>)r
rZsumdicts)rZmetricsrrrr9wszunionmetadatastore.getmetrics)N)N)N)�__name__�
__module__�__qualname__rr-r�baseunionstoreZ	retriabler*r/rr4r6r9�
__classcell__rrrrr
s
:	
	
rc@s&eZdZddd�Zdd�Zdd�ZdS)	�remotefilelogmetadatastoreNcCs|�||�}t�|�}|S)r)Z_getdatarZancestormap)rr r!r&r3r%rrrr-}s
z'remotefilelogmetadatastore.getancestorscCs|�||�|Sr�r-�rr r!rrrr/�sz&remotefilelogmetadatastore.getnodeinfocCstd��dS)Ns7cannot add metadata only to remotefilelog metadatastorer0)rr r!�parentsr#rrrr�s�zremotefilelogmetadatastore.add)N)r>r?r@r-r/rrrrrrC|s
rCc@s@eZdZdd�Zddd�Zdd�Zdd	�Zd
d�Zddd
�ZdS)�remotemetadatastorecCs||_||_dSr)�_fileservice�_shared)rZuiZfileserviceZsharedrrrr�szremotemetadatastore.__init__NcCs0|jj|t|�fgdddd�|jj|||d�S)NTF)�forceZ	fetchdataZfetchhistoryr()rHZprefetchrrIr-)rr r!r&rrrr-�s�z remotemetadatastore.getancestorscCs|�||�|SrrDrErrrr/�szremotemetadatastore.getnodeinfocCstd��dS)Nscannot add to a remote storer0r2rrrr�szremotemetadatastore.addcCs|Srr)rr5rrrr4�szremotemetadatastore.getmissingcCsdSrr)rr7r8rrrr6�szremotemetadatastore.markledger)N)N)	r>r?r@rr-r/rr4r6rrrrrG�s
rGN)
Z
__future__rZmercurial.noderr�rrrArrC�objectrGrrrr�<module>s
o

Youez - 2016 - github.com/yon3zu
LinuXploit