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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

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

�]Lby-�@sddlmZddlZddlZddlmZddlmZmZm	Z	m
Z
mZmZm
Z
mZmZmZmZddlmZdZdZdZd	Zd
ZdZdZd
ZdZdZe�e�Ze�e�Z 				d dd�Z!dd�Z"dd�Z#e�$eeef�dd��Z%e�$e�dd��Z&e�$e�dd��Z'dd�Z(dd�Z)dS)!�)�absolute_importN)�_)�bundle2�changegroup�error�exchange�	localrepo�
narrowspec�repair�requirements�scmutil�util�wireprototypes)�
stringutils	narrowaclsnarrow:changespecsnarrow:responsespecsnarrow:specsincludesexcludesKILLsDONEs>20s20s20sls>20s20s20s20slcs��j�dd�s	J�|�d�}�fdd�|D�}|sttd���t|�}	ttt|�dg���}
ttt|�dg���}t	|�|
||	|||�d	d��dS)
N�experimental�narrowservebrokenellipses�changegroupcsg|]}|t���vr|�qS�)r�supportedoutgoingversions)�.0�v��repor�</usr/lib/python3/dist-packages/hgext/narrow/narrowbundle2.py�
<listcomp>8s
�z3getbundlechangegrouppart_narrow.<locals>.<listcomp>sno common changegroup version�includepats�excludepats�depth)
�ui�
configbool�get�
ValueErrorr�max�sorted�filter�bool�generateellipsesbundle2)�bundlerr�source�
bundlecaps�b2caps�heads�common�kwargs�
cgversions�version�include�excluderrr�getbundlechangegrouppart_narrow+s(


�
�r2c	Cs�tj|j||d�}|durt|�}|dkrt�td�|��t|p$|���}t|p,|j	g�}t
j|||t�||d�\}	}
}|j�
dt|
��|	rytj|||d|du||
d�}|�||	dd	�}
|jd
|
d�}|�d|�t�|�r{|�d
d�dSdSdS)N)r0r1�sdepth must be positive, got %d)rsFound %d relevant revs
T��matcher�ellipses�shallow�
ellipsisroots�	fullnodesF�narrow_widenr��data�version�treemanifest�1)r	�match�root�intr�Abortr�setr+�nullidr�_computeellipsisr�debug�lenr�
getbundler�generate�newpart�addparamr�istreemanifest)r'rr0r1r/r,r+rr@�
visitnodes�relevant_nodesr8�packer�cgdata�partrrrr&Os8
��	
�r&c	s�t|p�jg�}�fdd�|D�}|���fdd�}|jt|�d�t��t�|||�\}	}
}|	r_tj|�|dd||
d�}|�||	dd	�}
|jd
|
d�}|�	d|�t
���ra|�	dd
�dSdSdS)Ncsh|]}�j�|��qSr)�	changelog�rev)r�nrrr�	<setcomp>�sz9generate_ellipses_bundle2_for_widening.<locals>.<setcomp>c3s*��D]}tV�j�|�VqtVdS�N)�_KILLNODESIGNALrS�node�_DONESIGNAL)�r��deadrevsrrr�genkills�s
�
z8generate_ellipses_bundle2_for_widening.<locals>.genkillsr;TFr4r:rr=r>r?)rDrErK�_CHANGESPECPARTrrFrrIrJrLrrM)r'r�oldmatch�newmatchr/r,�known�	knownrevsr^�newvisit�newfull�newellipsisrPrQrRrr\r�&generate_ellipses_bundle2_for_wideningys2	
��	
�rgcCs�t|j�td����}t|j�td����}t�|�t�|�tj	|j
jvr5|j
j�tj	�t�
|j
�|j
�||�t�|j
�dS)N�)rD�paramsr �_SPECPART_INCLUDE�
splitlines�_SPECPART_EXCLUDEr	�validatepatternsr�NARROW_REQUIREMENTr�addr�writereporequirements�
setnarrowpats�copytoworkingcopy)�op�inpartrrrrr�_handlechangespec_2�s

rucCs�|��}|�d�\}}t|���}t|���}t�|�t�|�tj|jjvr6|jj�	tj�t
�|j�|j�||�t�
|j�dS)N�)�read�splitrDrkr	rmrrnrrorrprqrr)rsrtr<�inc�excrrrrr�_handlenarrowspecs�s

r{c	Cs�|j}|j}t�}t�|d�}|tkr;|tkr(t�|d�}|�|�r'|�|�n	t	�
td�|��t�|d�}|tks|ro|j|_
Gdd�dt�}tjj�||��tj|j|t|�ddd�}|ro|j��|_|j��||_t�|d	�r{|��dSdS)
N��s)unexpected changespec node chunk type: %sc@seZdZdd�ZdS)z'_handlechangespec.<locals>.dummybmstorecSsdSrWr)�selfr�tr�changesrrr�applychanges�sz4_handlechangespec.<locals>.dummybmstore.applychangesN)�__name__�
__module__�__qualname__r�rrrr�dummybmstore�sr�Tswiden)�backup�topic�setnewnarrowpats)rrSrDr�readexactlyrZrX�hasnoderorrCr�
_bookmarks�_bookmarksbackup�dictr�localrepositoryr
�stripr�list�uninterruptible�_widen_uninterr�	__enter__�
_widen_bundler
�safehasattrr�)	rsrtr�cl�clkills�chunksignal�ckr��	chgrpfilerrr�_handlechangespec�s:

�
���
�r�cs�|j}|j}|j}|`|j}|�td��|�|d�}z_t�||||�}|j	s+|�
�nt��}|�<t
|tj�rY|�d���t�||�fdd��Wd�n1sSwYn
|�|dd|�|�d�Wd�n1spwYW|��n|��w|��D]4\}	}
z|	�|
�Wq�ty�}z|jtjkr�|�td	�|	�|
�t�|�f�WYd}~q�d}~ww|j�ddd�|�|�dS)
zFChangegroup exchange handler which restores temporarily-stripped nodessadding branch
srbsstripcs�SrWrr�rrr�<lambda>"sz)handlechangegroup_widen.<locals>.<lambda>Nsbundle:Tserror removing %s: %s
)rrr��vfs�noter�openr�
readbundle�verbose�silentr
�nullcontextmanager�
isinstancer�
unbundle20�transaction�
processbundle�apply�join�close�	undofiles�unlink�OSError�errno�ENOENT�warnr�forcebytestrr��__exit__)rsrtrrr�r��f�gen�maybe_silent�undovfs�undofile�err�r�handlechangegroup_widensL�������	����r�csztj}d|d<d|d<d|d<d|d<d|d<tjd	��fd
d�}|tjd	<tjd	��fdd
�}�j|_|tjd	<dS)z?Enable narrow repo support in bundle2-related extension points.sbooleansnarrowsplainsdepthscsvsoldincludepatssoldexcludepatssknownrcs^|d}|j�t�rt�||�}|�dd�r&|j�dd�r&t|i|��dS�|i|��dS)Nr3�narrowFrr)r�has_section�_NARROWACL_SECTIONr�applynarrowaclr rr2)�argsr-r)�origcgfnrr�wrappedcgfnGs�zsetup.<locals>.wrappedcgfncsL�||�t�|d�rt||�t�|d�r$tjj�|j|j�|`dSdS)Nr�r�)	r
r�r�rr�r�rDrr�)rsrt)�
origcghandlerrr�wrappedcghandlerXs

��zsetup.<locals>.wrappedcghandlerN)r�GETBUNDLE_ARGUMENTSr�getbundle2partsmappingr�parthandlermappingri)�
getbundleargsr�r�r)r�r�r�setup:s



r�)NNNN)*�
__future__rr��struct�mercurial.i18nr�	mercurialrrrrrr	r
rrr
r�mercurial.utilsrr�r_�	_RESSPECS�	_SPECPARTrjrlrXrZ�_ELIDEDCSHEADER�_ELIDEDMFHEADER�calcsize�
_CSHEADERSIZE�
_MFHEADERSIZEr2r&rg�parthandlerrur{r�r�r�rrrr�<module>sB4



�$*=


3.

https://t.me/RX1948 - 2025