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: //usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pyo
�
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�|jd�}|rmg|D]!}	|	tj��kr|	^q}|s^ttd���nt|�}
nttd���ttt|jdg���}ttt|jdg���}t	j
�jd|d|�}
|jdd�}|dk	r4t
|�}|d	kr4tjtd
�|��q4nt|pF�j��}t|p[tg�}ttt|jdg���}ttt|jdg���}d
�|jdg�D�}|r�||ks�||kr�t�jd||��}|���fd�}|jtd|��tj�t�|||
�\}}}|r�tj|
�d|
dtd|dk	d|d|�}|j||td�}|jdd|�}|jd|
�d�jkr�|jdd�q�q�ntj�||t�|
d|�\}}}�jjdt |��|r�tj|
�d|
dtd|dk	d|d|�}|j||td�}|jdd|�}|jd|
�d�jkr�|jdd�q�ndS(NRsno 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
(!tgetRtsupportedoutgoingversionst
ValueErrorRtmaxtsortedtfiltertboolR	tmatchtroottNonetintRtAborttsettheadsRtrevstnewpartt_CHANGESPECPARTRt_computeellipsist
getbundlertTruetgeneratetFalsetaddparamtrequirementstuitdebugtlen(tbundlerRtsourcet
bundlecapstb2capsRBtcommonRt
cgversionstvR2RRtnewmatchRt
oldincludet
oldexcludeR#R*tnewvisittnewfulltnewellipsistpackertcgdatatpartt
visitnodestrelevant_nodesR/((R)Rs@/usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pytgetbundlechangegrouppart_narrow6sn
!!!!!!	'	cC@s�t|jjtd�j��}t|jjtd�j��}tj|�tj|�tj	|j
jkr�|j
jjtj	�|j
j
�n|j
j||�dS(Nt(RAtparamsR5t_SPECPART_INCLUDEt
splitlinest_SPECPART_EXCLUDER	tvalidatepatternsRtNARROW_REQUIREMENTRRLtaddt_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((RqRr((s@/usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pytrecordchange�s(t__name__t
__module__RtRu(((s@/usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pyRp�s	tbackupttopictwidentsetnewnarrowpats(RR%RARtreadexactlyR'R$thasnodeRjRR@Rt
_bookmarkstdictR
tstripRMtlistRHtuninterruptablet_widen_uninterrt	__enter__t
_widen_bundleRtsafehasattrR{(
RmRnRtcltclkillstchunksignaltcktbmstoreRpt	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(((Rr(s@/usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pyt<lambda>�RcNsbundle:serror removing %s: %s
( RRMR�tvfstnoteRtopenRt
readbundletverboset
pushbuffert
isinstanceRt
unbundle20ttransactiont
processbundletapplytjoinRHt	popbuffertcloset	undofilestunlinktOSErrorterrnotENOENTtwarnRtforcebytestrR�t__exit__R>(RmRnRRMR�R�tftgentundovfstundofilete((Rrs@/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.tgetrepocapstbooleanRtplainRtcsvRR RRR#Rc@sy|d}|jjt�r1tj||�}n|jdt�rh|jjdd�rht||�n
�||�dS(NiRtexperimentaltnarrowservebrokenellipses(	RMthas_sectiont_NARROWACL_SECTIONRtapplynarrowaclR5RJt
configboolRb(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�(RmRn(t
origcghandler(s@/usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pytwrappedcghandlers
N(
RtwrapfunctionRRR
tGETBUNDLE_ARGUMENTSRtgetbundle2partsmappingtparthandlermappingRd(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�REt	_SPECPARTReRgR$R't_ELIDEDCSHEADERt_ELIDEDMFHEADERtcalcsizet
_CSHEADERSIZEt
_MFHEADERSIZERR>RbtparthandlerRoR�R�R�(((s@/usr/lib64/python2.7/site-packages/hgext/narrow/narrowbundle2.pyt<module>s2F

		^!2	)