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/mercurial/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/mercurial/__pycache__/repocache.cpython-310.pyc
o

�]Lb��@sdddlmZddlZddlZddlZddlmZmZmZm	Z	m
Z
Gdd�de�Zdd�Z
d	d
�ZdS)�)�absolute_importN�)�error�hg�obsolete�scmutil�utilc@sHeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)�
repoloaderz�Load repositories in background thread

    This is designed for a forking server. A cached repo cannot be obtained
    until the server fork()s a worker and the loader thread stops.
    cCs@|��|_tj|d�|_tj|d�|_d|_t	�
�|_d|_dS)N)�max)�maxlenF)
�copy�_uir�lrucachedict�_cache�collections�deque�_inqueue�
_accepting�	threading�Event�	_newentry�_thread)�self�uir�r�5/usr/lib/python3/dist-packages/mercurial/repocache.py�__init__s


zrepoloader.__init__cCs>|jrJ�|jjdkr
dSd|_tj|jd�|_|j��dS)NrT)�target)rrrrr�Thread�	_mainloop�start�rrrrr (s
zrepoloader.startcCsB|jsdSd|_|j��|j��d|_|j��|j��dS)NF)rrr�set�joinr�clearrr!rrr�stop1s


zrepoloader.stopcCs|j�|�|j��dS)z6Request to load the specified repository in backgroundN)r�appendrr"�r�pathrrr�load;szrepoloader.loadcCs(|jr
|j��r
t�d��|j�|d�S)z�Return a cached repo if available

        This function must be called after fork(), where the loader thread
        is stopped. Otherwise, the returned repo might be updated by the
        loader thread.
        s0cannot obtain cached repo while loader is activeN)r�is_aliver�ProgrammingErrorr�peekr'rrr�get@s
�zrepoloader.getcsv�jr9t���j���jr4�j��z�j���Wn	ty$Ynwt	�
�j��fdd���js�jsdSdS)Ncs
����S�N)�_loadr�r(rrr�<lambda>]s
z&repoloader._mainloop.<locals>.<lambda>)r�gc�collectr�waitr$r�popleft�
IndexErrorr�	callcatchr
r!rr0rrMs

���zrepoloader._mainloopcCsrt��}z|j�|�}Wntyt�|j|���}Ynwt	|�|j
�dd|t��|�|j�||�dS)Ns	repocaches&loaded repo into cache: %s (in %.3fs)
)
r�timerr�pop�KeyErrorr�
repositoryr
�
unfiltered�_warmupcacher�log�insert)rr(r �reporrrr/_s�
�zrepoloader._loadN)�__name__�
__module__�__qualname__�__doc__rr r%r)r-rr/rrrrr	s
	

r	cCsV|��|j|jj|jj|jj|jjtjD]}t�	||�q|j
�|�dSr.)�
invalidateall�	changelog�obsstore�_all�
successors�predecessors�childrenr�
cachefuncs�getrevs�_phasecache�
loadphaserevs)r@�namerrrr=rs
r=cCs�|j}|j}d|vr|d|d<}|j|j_|j_d|vr,|d|d<}|j|j_d|vr?|d|d<}|j|j_dSdS)z/Copy cached attributes from srcrepo to destrepos	changelogsobsstores_phasecacheN)�
_filecache�svfs�obj�opener�_realopener)�srcrepo�destrepo�
destfilecache�srcfilecache�cerrr�	copycaches
�r[)�
__future__rrr2r�rrrrr�objectr	r=r[rrrr�<module>s	[

https://t.me/RX1948 - 2025