HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pyc
�
1�3\c@@ssddlmZddlZddlZddlmZddlmZmZddl	m
Z
mZmZm
Z
mZmZmZmZmZmZddlmZdZdZed	Zed
ZdZdZd
ZdZdZdZej e�Z!ej e�Z"d�Z#ddddd�Z%e
j&eeef�d��Z'e
j&e�d��Z(d�Z)d�Z*dS(i(tabsolute_importN(t_(tbintnullid(
tbundle2tchangegroupterrortexchanget
extensionst
narrowspectrepairt
repositorytutiltwireprototypes(t
stringutiltnarrowtnarrowhgacls:changespecs:spectincludetexcludetKILLtDONEs>20s20s20sls>20s20s20s20slcK@s |||�}dg|t<|S(Ntv0(t	NARROWCAP(torigtrepotkwargstcaps((s@/usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pytgetrepocaps_narrow0s
c
@s��jjdd�st�|jd�}|r�g|D]!}	|	tj��kr7|	^q7}|syttd���nt|�}
nttd���t	t
t|jdg���}t	t
t|jdg���}tj
�jd|d	|�}
|jd
d�}|dk	rOt|�}|dkrOtjtd�|��qOnt|pa�j��}t|pvtg�}t	t
t|jd
g���}t	t
t|jdg���}d�|jdg�D�}|r	||ks�||kr	t�jd||��}|���fd�}|jtd|��tj�t�|||
�\}}}|r	tj|
�d|
dtd|dk	d|d|�}|j||td�}|jdd|�}|jd|
�d�j kr|jdd�qq	ntj�||t�|
d
|�\}}}�jj!dt"|��|r�tj|
�d|
dtd|dk	d|d|�}|j||td�}|jdd|�}|jd|
�d�j kr�|jdd�q�ndS(NtexperimentaltnarrowservebrokenellipsesRsno common changegroup versionsYserver does not advertise changegroup version, can't negotiate support for ellipsis nodestincludepatstexcludepatsRRtdepthisdepth must be positive, got %dtoldincludepatstoldexcludepatscS@sh|]}t|��qS((R(t.0tn((s@/usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pys	<setcomp>Ts	tknowns%ln & ::%lnc3@s0x$�D]}tV�jj|�VqWtVdS(N(t_KILLNODESIGNALt	changelogtnodet_DONESIGNAL(tr(tdeadrevsR(s@/usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pytgenkillsns
tdatatmatchertellipsestshallowt
ellipsisrootst	fullnodestnarrow_widentversionttreemanifestt1sFound %d relevant revs
(#tuit
configbooltAssertionErrortgetRtsupportedoutgoingversionst
ValueErrorRtmaxtsortedtfiltertboolR	tmatchtroottNonetintRtAborttsettheadsRtrevstnewpartt_CHANGESPECPARTRt_computeellipsist
getbundlertTruetgeneratetFalsetaddparamtrequirementstdebugtlen(tbundlerRtsourcet
bundlecapstb2capsRGtcommonRt
cgversionstvR4RRtnewmatchR t
oldincludet
oldexcludeR%R,tnewvisittnewfulltnewellipsistpackertcgdatatpartt
visitnodestrelevant_nodesR1((R+Rs@/usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pytgetbundlechangegrouppart_narrow6sp
!!!!!!	'	cC@s�t|jjtd�j��}t|jjtd�j��}tj|�tj|�tj	|j
jkr�|j
jjtj	�|j
j
�n|j
j||�dS(Nt(RFtparamsR:t_SPECPART_INCLUDEt
splitlinest_SPECPART_EXCLUDER	tvalidatepatternsRtNARROW_REQUIREMENTRRQtaddt_writerequirementst
setnarrowpats(toptinpartRR((s@/usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pyt_handlechangespec_2�s!!

c
C@sf|j}|j}t�}tj|d�}x{|tkr�|tkr|tj|d�}|j|�r�|j|�q�nt	j
td�|��tj|d�}q0W|rC|j}dt
fd��Y}|�|_tj|j|t|�dtdd�}	||_|	rC|jj�|_|jj�|	|_qCntj|d	�rb|j�ndS(
Niis)unexpected changespec node chunk type: %stdummybmstorecB@seZd�Zd�ZRS(cS@sdS(N((tselfRttrtchanges((s@/usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pytapplychanges�scS@sdS(N((RuRv((s@/usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pytrecordchange�s(t__name__t
__module__RxRy(((s@/usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pyRt�s	tbackupttopictwidentsetnewnarrowpats(RR'RFRtreadexactlyR)R&thasnodeRnRRERt
_bookmarkstdictR
tstripR7tlistRMtuninterruptablet_widen_uninterrt	__enter__t
_widen_bundleRtsafehasattrR(
RqRrRtcltclkillstchunksignaltcktbmstoreRtt	chgrpfile((s@/usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pyt_handlechangespec�s2				!		
c	@s�|j}|j}|j}|`|j}|jtd��|j|d�}z�tj||||�}|j	s�|j
�nt|tj
�r�|jd��#�tj||�fd��WdQXn#|j|dd|j|�t�|j	s|j�nWd|j�Xx�|j�D]w\}}	y|j|	�Wqtk
r�}
|
jtjkr�|jtd�|j|	�tj|
�f�q�qXqW|jjddd�|j|�dS(sFChangegroup exchange handler which restores temporarily-stripped nodessadding branch
trbR�c@s�S(N(((Rv(s@/usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pyt<lambda>�RgNsbundle:serror removing %s: %s
( RR7R�tvfstnoteRtopenRt
readbundletverboset
pushbuffert
isinstanceRt
unbundle20ttransactiont
processbundletapplytjoinRMt	popbuffertcloset	undofilestunlinktOSErrorterrnotENOENTtwarnRtforcebytestrR�t__exit__RC(RqRrRR7R�R�tftgentundovfstundofilete((Rvs@/usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pythandlechangegroup_widen�s6					
%#	+c@s�tjtdt�tj}d|d<d|d<d|d<d|d<d|d	<d|d
<d|d<tjd��fd
�}|tjd<tjd��fd�}�j	|_	|tjd<dS(s?Enable narrow repo support in bundle2-related extension points.tgetrepocapstbooleanRtplainR tcsvR!R"RRR%Rc@sy|d}|jjt�r1tj||�}n|jdt�rh|jjdd�rht||�n
�||�dS(NiRRR(	R7thas_sectiont_NARROWACL_SECTIONRtapplynarrowaclR:ROR8Rf(targsRR(torigcgfn(s@/usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pytwrappedcgfn
s
c@s3�||�tj|d�r/t||�ndS(NR�(RR�R�(RqRr(t
origcghandler(s@/usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pytwrappedcghandlers
N(
RtwrapfunctionRRR
tGETBUNDLE_ARGUMENTSRtgetbundle2partsmappingtparthandlermappingRh(t
getbundleargsR�R�((R�R�s@/usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pytsetup�s 	










(+t
__future__RR�tstructtmercurial.i18nRtmercurial.nodeRRt	mercurialRRRRRR	R
RRR
tmercurial.utilsRRR�RJt	_SPECPARTRiRkR&R)t_ELIDEDCSHEADERt_ELIDEDMFHEADERtcalcsizet
_CSHEADERSIZEt
_MFHEADERSIZERRCRftparthandlerRsR�R�R�(((s@/usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pyt<module>s2F

		^!2	)