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: //proc/thread-self/root/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pyc
�
1�3\c@@swdZddlmZddlZddlmZddlmZmZm	Z
mZddlm
Z
mZd�ZdS(	s,setup for largefiles repositories: reposetupi(tabsolute_importN(t_(terrort	localrepotmatchtscmutili(t
lfcommandstlfutilc@s�|j�rdSnd|jf��fd��Y��|_tjg|_�jg|_�fd�}|jjd|�d�}�j	dd|d��j	dd|d�dS(	Nt
lfilesrepoc
@s�eZeZeZ�fd�Z�fd�Zej	dd	d	eeee��fd��Z�fd�Zdd	d	d	eed	�fd�Z
ed	e�fd�Zd�ZRS(
c@st�|�j||�S(N(tsupertstatus(tselftargstkwargs(R(s@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pytstatus_nolfiles'sc@sPt�|�j|�}|jrLd|jf�fd��Y��|_n|S(Nt	lfilesctxc@s;eZ�fd�Z�fd�Zdd�fd�ZRS(c@s;t�|�j�}g|D]}tj|�p4|^qS(N(R	tfilesRtsplitstandin(Rt	filenamestf(R(s@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pyR2sc@sAt�|�j�}d|jf�fd��Y��|_|S(Ntlfilesmanifestc@seZ�fd�ZRS(c@s1t�|�j}||�p0|tj|��S(N(R	t__contains__Rtstandin(Rtfilenametorig(R(s@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pyR8s(t__name__t
__module__R((R(s@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pyR7s(R	tmanifestt	__class__(Rtman1(R(Rs@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pyR5s	c@s�t�|�j}y4|dk	r6||||�}n|||�}Wnqtjk
r�|dk	r�|tj|�||�}n|tj|�|�}|j��fd�|_nX|S(Nc@s��dS(Ns(((tolddata(s@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pyt<lambda>Nt(R	tfilectxtNoneRtLookupErrorRRtdata(RtpathtfileidtfilelogRtresult(R(Rs@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pyR!>s	N(RRRRR"R!((R(s@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pyR1s	(R	t__getitem__tlfstatusR(Rtchangeidtctx(R(Rs@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pyR).s
	t.c)
@s)|||}}	}
t���j}�jsK||||||	|
|�St�_�|}�|}
|
j�dk��o�|�dk}|dkr�tj�j�j	��}nd}z<y�j
t�}Wntjk
r�nXt
j���}|j�sKx=|D]}||�rPqqW||||||	|
|�Sn��fd�}tj|�}||j�|_||||||||�}�r��fd�}g|jD]}||�r�|^q�|_|j|dgdtd|	dt�\}}|j|j|j|j|jf\}}}}}|r�x�|D]�}t
j|�}||krz|j|�qIt
j||�t
j�j|��kr�|j|�qI|	r�|j|�n|j|�qIWn#||||}ggg}}}�jj}x�|D]�}t
j|�}||kr��j|�} t
j||�t
j| �ks�|r�d|j|�ktt
j | ��kr�|j|�q�|	r�|j|�q�q|j|�qWg|D]!}t
j|�|kr�|^q�}xs|j!t
j"���D]Y}t
j#|�}||�sBqn||kr|j|��j$j%|d	t&�qqWt'|�}g|D]}|�jkr�|^q�}g|d
D]}||kr�|^q�|d
<t(|j)�}!t(|d�j*|!�|d<t(|d�j*|!�|d<g|D].}"g|"D]}#t
j+|#�s6|#^q6^q)}$||||gg|f}%gt,|$|%�D]\}&}'t-|&|'�^q�}n;g|D].}(g|(D]}t
j#|�p�|^q�^q�}|r�|j.�nWd|r|j/�nXt&�_t0j|�S(
NR-c@s��s
|Sg}�j}xk|D]c}tj|�}||krQ|j|�q |j|�rv|j||f�q |j|�q W|S(N(tdirstateRRtappendthasdirtextend(RtnewfilesR.Rtsf(Rtworking(s@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pyt
tostandins�s	
c@s1tj|�}�j}||kp0|j|�S(N(RRR.R0(RR3R.(R(s@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pytsfindirstate�s	tsubrepostignoredtcleantunknowntxt
ignoremissingiii(1R	R
R*tFalsetrevR"tmatchmodtalwaystroottgetcwdtwlockRt	LockErrorRtopenlfdirstatetcopyt_filestmodifiedtaddedtremovedtdeletedR9RR/t
readasstandinthashfiletwjointnormalR.t
_checkexectflagstboolt
getexecutabletwalktgetstandinmatcherRtwvfst
unlinkpathtTruetlisttsett_mapt
differencet	isstandintziptsortedtwritetreleaseR()Rtnode1tnode2RR8R9R:tlistsubrepostlistignoredt	listcleantlistunknownRtctx1tctx2t
parentworkingRCt
lfdirstateRR5tmR(R6tunsuretsRHRIRJRKtlfileRttocheckt	checkexectabslfiletlfilestfilelisttfntnormalsR*tlist1tlist2titems(Rtui(RR4s@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pyR
Ys�	
	



	3


!

8	28	c@sJt�|�j|||�}d|jf�fd��Y��|_|S(NRc@seZ�fd�ZRS(c@s%t�|�j}tj|||�S(N(R	t
markcommittedR(RtnodeR(R(s@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pyR{s(RRR{((R(s@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pyR
s(R	t	commitctxR(RR,RR
R|(R(Rs@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pyR}s	R c@s�|dkri}nt�|�j}|j��X|jd}	|	||�}|d|d|d|d|d|d|d|�}
|
SWdQXdS(	Ni����ttexttusertdateRtforceteditortextra(R"R	tcommitRCt_lfcommithooks(RR~RR�RR�R�R�RtlfcommithookR((R(s@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pyR�s	

c@s�|j�rbt|j�|j�j}|rbtd�djt|��}tj|��qbnt	�|�j
|d|d|d|�S(Ns:required features are not supported in the destination: %ss, R�trevst	newbranch(tlocalRZtrequirementst	supportedRtjoinR_RtAbortR	tpush(RtremoteR�R�R�tmissingtmsg(R(s@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pyR�!s	!cS@s|g}g}g}xr|D]j}tj|d�rTtjtd�|dd��n|jj|�rv|j|�q|j|�qWx�|D]�}t}|j	j
|�d}x@|D]8}	|j	j
|	�j|�r�|j|�t}Pq�q�W|sTxX|D]M}
|j	j
|
�j|�r|j|
�|sM|jd�t}qMqqWn|s�|j|�q�q�W||7}|S(s�
            Adjust matched file list
            If we pass a directory to commit whose only committable files
            are largefiles, the core commit code aborts before finding
            the largefiles.
            So we do the following:
            For directories that only have largefiles as matches,
            we explicitly add the largefiles to the match list and remove
            the directory.
            In other cases, we leave the match list unmodified.
            t/s file "%s" is a largefile standinthints#commit the largefile itself insteadR-(
RR]RR�RRVtisdirR/R=R.t	normalizet
startswithRX(RRRstactualfilestdirstregularsRt
matcheddirtdtmftlf((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pyt
_subdirlfs.s<







N(RRRXt_largefilesenabledR=R*RR)RtunfilteredmethodR"R
R}R�R�R�((RRz(s@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pyR"s+�
c@s{|j}|dkr$|jj}n|rwt���fd�}tj|j||�tj	�|j|j
��ndS(s4Push largefiles for pushop before pushing revisions.c@s
�j|�S(N(tadd(Rutlfhash(ttoupload(s@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pyR{R N(tlfrevsR"toutgoingR�RZRtgetlfilestouploadtrepoRtuploadlfilesR�(tpushopR�taddfunc(Rz(R�s@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pytprepushoutgoinghookts		t
largefilesc[@sOd|jkrKtd�|jj�D��rK|jjd�|j�ndS(NR�cs@s&|]}tjd|dkVqdS(R�iN(Rt	shortname(t.0R((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pys	<genexpr>�s(R�tanytstoret	datafilesR�t_writerequirements(RzR�R
((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pytcheckrequireslfiles�sthooksschangegroup.lfiless
commit.lfiles(
R�RRtupdatestandinsbymatchR�R
t_lfstatuswriterstprepushoutgoinghooksR�t	setconfig(RzR�R�R�((RRzs@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pyt	reposetups
"�H		(t__doc__t
__future__RRFtmercurial.i18nRt	mercurialRRRR?RR RRR�(((s@/usr/lib64/python2.7/site-packages/hgext/largefiles/reposetup.pyt<module>	s"