https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/hgext/remotefilelog/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/hgext/remotefilelog/__pycache__/metadatastore.cpython-310.pyc
o

�]Lb��@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__��C/usr/lib/python3/dist-packages/hgext/remotefilelog/metadatastore.pyrszunionmetadatastore.__init__Nc	s��durt��|�vr
gSi���fdd�}||fg}|rS|��\}}z��|j||�d��|||�}|�|�WntyP|jsE�||f||fkrN�Ynw|s�S)��Returns as many ancestors as we're aware of.

        return value: {
           node: (p1, p2, linknode, copyfrom),
           ...
        }
        Ncs�||fg}g}t�}|rY|��\}}||f|vrq
|�||f���|�}|s/|�||f�q
|\}}	}
}|tjkrG|�vrG|�|pC||f�|	tjkrW|	�vrW|�||	f�|s|S�N)�set�pop�addr�appendr�nullid)�curname�curnode�queue�missing�seen�name�node�value�p1�p2�linknode�copyfrom��	ancestors�knownrr�traverse(s&

�z1unionmetadatastore.getancestors.<locals>.traverse�r+)rr�update�_getpartialancestors�extend�KeyErrorr
)	rr"r#r+r,r rr�
newmissingrr)r�getancestorss0
�
���zunionmetadatastore.getancestorsc	CsD|jD]}z|j|||d�WStyYqwt|t|�f��)Nr-)r
r3r1r)rr"r#r+�storerrrr/Ss
�z'unionmetadatastore._getpartialancestorsc	Cs@|jD]}z	|�||�WStyYqwt|t|�f��r)r
�getnodeinfor1r)rr"r#r4rrrr5]s
�zunionmetadatastore.getnodeinfocC�td��)Ns5cannot add content only to remotefilelog contentstore��RuntimeError�rr"r#�datarrrrg��zunionmetadatastore.addcCs"|}|jD]	}|r|�|�}q|Sr)r
�
getmissing)r�keysr r4rrrr<ls

�zunionmetadatastore.getmissingcCs|jD]}|�||�qdSr)r
�
markledger)r�ledger�optionsr4rrrr>ss
�zunionmetadatastore.markledgercCsdd�|jD�}tj|�S)NcSsg|]}|���qSr)�
getmetrics)�.0�srrr�
<listcomp>xsz1unionmetadatastore.getmetrics.<locals>.<listcomp>)r
r�sumdicts)r�metricsrrrrAws
zunionmetadatastore.getmetricsr)�__name__�
__module__�__qualname__rr3r�baseunionstore�	retriabler/r5rr<r>rA�
__classcell__rrrrr
s
:	
	
rc@s&eZdZddd�Zdd�Zdd�ZdS)	�remotefilelogmetadatastoreNcCs|�||�}t�|�}|S)r)�_getdatar�ancestormap)rr"r#r+r:r*rrrr3}s
z'remotefilelogmetadatastore.getancestorscC�|�||�|Sr�r3�rr"r#rrrr5��z&remotefilelogmetadatastore.getnodeinfocCr6)Ns7cannot add metadata only to remotefilelog metadatastorer7)rr"r#�parentsr'rrrr�r;zremotefilelogmetadatastore.addr)rGrHrIr3r5rrrrrrM|s
rMc@s@eZdZdd�Zddd�Zdd�Zdd	�Zd
d�Zddd
�ZdS)�remotemetadatastorecCs||_||_dSr)�_fileservice�_shared)r�ui�fileservice�sharedrrrr�s
zremotemetadatastore.__init__NcCs0|jj|t|�fgdddd�|jj|||d�S)NTF)�force�	fetchdata�fetchhistoryr-)rV�prefetchrrWr3)rr"r#r+rrrr3�s�z remotemetadatastore.getancestorscCrPrrQrRrrrr5�rSzremotemetadatastore.getnodeinfocCr6)Nscannot add to a remote storer7r9rrrr�szremotemetadatastore.addcCs|Srr)rr=rrrr<��zremotemetadatastore.getmissingcCsdSrr)rr?r@rrrr>�r_zremotemetadatastore.markledgerr)	rGrHrIrr3r5rr<r>rrrrrU�s
rUN)
�
__future__r�mercurial.noderr�rrrJrrM�objectrUrrrr�<module>so

https://t.me/RX1948 - 2025