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/mercurial/sparse.pyc
�
1�3\c	@@s�ddlmZddlZddlZddlZddlmZddlmZm	Z	ddl
mZmZ
mZmZmZmZmZeZd�Zd�Zd	�Zd
�Zed�Zd�Zd
�Zd�Zd�Zd�Z d�Z!ded�Z#d�Z$ed�Z%d�Z&eed�Z'ed�Z(ed�Z)eeeeeeeed�Z*ddddddd�Z+dS(i(tabsolute_importNi(t_(thextnullid(terrortmatchtmergetpathutiltpycompattscmutiltutilc	C@s�t�}t�}t�}d}t}x}|jd�D]l}|j�}|s7|jd�req7q7|jd�r�|dj�}|r�|j|�q�q7|dkr�|r�||kr�tjt	d�i|d6��nt
}|}q7q7|dkrt
}|}q7|r7|dkrStjt	d	�i|d6|d
6dt	d���n|j�jd
�r�|jt	d�i|d6|d
6�q7n|j|�q7q7W|||fS(s�Parse sparse config file content.

    action is the command which is trigerring this read, can be narrow, sparse

    Returns a tuple of includes, excludes, and profiles.
    s
t#s	%include i	s	[include]s5%(action)s config cannot have includes after excludestactions	[exclude]s4%(action)s config entry outside of section: %(line)stlinethints<add an [include] or [exclude] line to declare the entry typet/sPwarning: %(action)s profile cannot use paths starting with /, ignoring %(line)s
N(tsettNonetFalsetsplittstript
startswithtaddRtAbortRtTruetwarn(	tuitrawRtincludestexcludestprofilestcurrentthavesectionR
((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pytparseconfig"sD				cC@s|j|d|�j�S(s1Resolve the raw content of a sparse profile file.tchangeid(tfilectxtdata(trepotprofileR"((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pytreadprofileUsc
C@s�tst�t�t�fS|jjd�}|sJt�t�t�fS|dkrntjtd���nt|j	|d�\}}}||}|r�t�}x�|r�|j
�}||kr�q�n|j|�yt|||�}Wn_tj
k
rPd||f}	|j	jdd�r:|j	j|	�q�|j	j|	�q�nXt|j	|d�\}
}}|j|
�|j|�|j|�q�W|}n|r�|jd�n|||fS(s�Obtain sparse checkout patterns for the given rev.

    Returns a tuple of iterables representing includes, excludes, and
    patterns.
    tsparses3cannot parse sparse patterns from working directorys?warning: sparse profile '%s' not found in rev %s - ignoring it
tmissingwarnings.hg*N(tenabledRtvfsttryreadRRRRR!RtpopRR'tManifestLookupErrort
configboolRtdebugtupdate(
R%trevRRRRtctxtvisitedR&tmsgt	pincludest	pexcludestsubprofs((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pytpatternsforrev[sD
		

	

	c
C@s�g|jj�D]$}|tkr|jj|�^q}t�}t�}t�}xD|D]<}t||�\}}}	||O}||O}||	O}q\W|||fS(s�Determine the active sparse config rules.

    Rules are constructed by reading the current sparse config and bringing in
    referenced profiles from parents of the working directory.
    (tdirstatetparentsRt	changelogR2RR9(
R%tnodetrevstallincludestallexcludestallprofilesR2RRR((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pytactiveconfig�s7			


cC@s�|j}|jd�}|r0|jd�}nd}|dksT|r�|dkr�ttj|jjd��j��}||d<|r�|jjd�}ttj|�j��}||d<q�nd||fS(sObtain the signature string for the current sparse configuration.

    This is used to construct a cache key for matchers.
    t	signaturet
tempsignaturet0R(t
tempsparses%s %sN(	t_sparsesignaturecachetgetRRthashlibtsha1R+R,tdigest(R%tincludetemptcacheRCRDR((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pytconfigsignature�s	'
cC@s�|jdd���}x%t|�D]}|jd|�q"W|r�|jd�x1t|�D] }|j|�|jd�q]Wn|r�|jd�x1t|�D] }|j|�|jd�q�WnWdQX|jj�dS(s:Write the sparse config file given a sparse configuration.R(twbs
%%include %s
s
[include]
s
s
[exclude]
N(R+tsortedtwriteRGtclear(R%RRRtfhtptite((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pytwriteconfig�s



cC@s2|jjd�}|st�St|jd��S(NRFs
(R+R,RR(R%R((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pytreadtemporaryincludes�scC@s3|jjddjt|���|jj�dS(NRFs
(R+RQtjoinRPRGRR(R%R((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pytwritetemporaryincludes�s"cC@s;t|�}x|D]}|j|�qWt||�dS(N(RXRRZ(R%t
additionalRRU((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pytaddtemporaryincludes�s
cC@s�ts|jjd�rdS|j�}|jsN|jsN|jsN|jrRdSt|dt	�}|j
}g}g}t|�}xY|D]Q}||kr�||�r�td�}|j
|d|f�|j
|�q�q�Wtjt�}	||	d<tj||	|d|dt	�x|D]}|j|�q"W|jjd�|jj�td�}
|jj|
t|��dS(NRFRLs*dropping temporarily included sparse filestrt.sAcleaned up %d temporarily added file(s) from the sparse checkout
(R*R+texistststatustmodifiedtaddedtremovedtdeletedtmatcherRR:RXRtappendRtcollectionstdefaultdicttlisttmergemodtapplyupdatestdroptunlinkRGRRRtlen(R%tstsparsematchR:tactionstdroppedttempincludestfiletmessagettypeactionsR5((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pytprunetemporaryincludes�s0$	

!

cC@sJg|D]}d|df^q}tjdd|�}tj||g�S(sqReturns a matcher that returns true for any of the forced includes
    before testing against the actual matcher.tpatht(tmatchmodtincludematchertunionmatcher(ReRtincludetkindpatsR{((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pytforceincludematchers"cC@s�tstj|jd�S|s/|dgkrlg|jj�D]$}|tkr?|jj	|�^q?}nt
|d|�}d|djtt
j|��f}|jj|�}|r�|Sg}x�|D]|}ybt||�\}	}
}|	s�|
r3tj|jdgd|	d|
dd�}|j|�nWq�tk
rGq�Xq�W|sjtj|jd�}n.t|�d	kr�|d
}ntj|�}|r�t|�}
t||
�}n||j|<|S(s�Obtain a matcher for sparse working directories for the given revs.

    If multiple revisions are specified, the matcher is the union of all
    revs.

    ``includetemp`` indicates whether to use the temporary sparse profile.
    RyRLs%s %st R}texcludetdefaulttrelpathiiN(R*RztalwaystrootRR:R;RR<R2RNRYtmapRtbytestrt_sparsematchercacheRHR9RRftIOErrorRnR|RXR(R%R>RLR=RCtkeytresulttmatchersR2RRRReRs((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pyRes>	:%
	


c!C@s�ts
|Sg|j�D]}|j�^q}t||�}|j�rN|St�}i}	|r�t||j�dj�g�}
nt||j�g�}
g}x(|j�D]\}}
|
\}}}|j|�|
|�r�|
|	|<n�|dkr|j|�|
|	|<nj|rI|dkr�|j|�|
|	|<q�n;|dkrb|
|	|<n"||kr�d||f|	|<n|r�|t	j
kr�|\}}}}}|
|�s�|j|�q�q�q�Wt|�dkr�|jj
td�t|��t||�g}d}|dj�}xM|D]E}||kr3|d|}|j||j�tf|f�q3q3Wtjt�}||d<t	j|||d|d	t�|j}x'|D]\}}}|j|�q�Wnt|�d
}||@}|r�|r�|j�}x�|D]y}||�}|
|�} |ry| ry|j|�}d|tfdf|	|<q#|r#| r#dgdf|	|<q#q#Wn|	S(
sAFilter updates to only lay out files that match the sparse rules.itmtktfR]sCtemporarily included %d file(s) in the sparse checkout for merging
s%temporarily adding to sparse checkouttgR^iRyN(R*R;R2ReR�Rt	iteritemsRRfRjtACTION_MERGERnRR`RR\RtmanifesttflagsRRgRhRiRkR:tnormalRB(!R%twctxtmctxtbranchmergeRqtpctxtoldrevstoldsparsematchtfilest
prunedactionsRpttemporaryfilesRtRttypetargsR5tf1tf2tfatmovetancRutwctxmanifesttfctxRvR:R�Rtchangedprofilestmftoldtnew((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pytfilterupdatesactionsCs~%	%







)
	




cC@s�t�}|j|j�|j|j�|j|j�t|�}t}x>|D]6}||�sR|jjt	d�|�|}qRqRW|r�t
jt	d���n|j}|d}	g}
g}g}|	j
�}
t|
�}i}x|D]}||�}||�}|r|s7|r�|r�||kr�|
j|�}|jj|�r~d|fdf||<|j|�qd|tfdf||<|
j|�q�|r�|s�|r�|r�||kr�|j|�||krdgdf||<qq�q�Wt}x/|D]'}|jjt	d�|�|}qW|rZt
jt	d���nx^|j�D]P\}}||krg||�}||�}|r�|r�|j|�q�qgqgWtd	�d
j�D��}xV|j�D]H\}\}}}||krg||<n||j|||f�q�Wtj|||d|dt�x|
D]}|j|�qXWx|D]}|j|�qvWx|D]}|j|�q�W|
||fS(sRefreshes working directory by taking sparse config into account.

    The old status and sparse matcher is compared against the current sparse
    matcher.

    Will abort if a file with pending changes is being excluded or included
    unless ``force`` is True.
    spending changes to '%s'
s2could not update sparseness due to pending changesR^RVRyR�R]sjcannot change sparseness due to pending changes (delete the files or use --force to bring them back dirty)cs@s|]}|gfVqdS(N((t.0R�((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pys	<genexpr>�ss!a f g am cd dc r dm dg m e k p prN(RR1RaRbRcReRRRRRRR:R�R�twvfsR_RfR�tdictRRjRkRR�Rltnormallookup(R%t
origstatustorigsparsematchtforcetpendingRptabortR�R:R3RbtlookupRrR�R�RqRtR�R�tfltstateRvR�R�R5((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pytrefreshwdir�sx
	
	

%'


	"
!


cC@sx||}t||j��d}|t|j��@rj|j�}t|�}t|||dt�nt|�dS(s1Perform actions after a working directory commit.iR�N(	R9R2RR�R`ReR�RRw(R%R=R3RR�R�((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pytaftercommit�s
c
C@sf|jjd�}t|j|d�\}}}	|j�}
t|�}t|j�}d|kr�|r�|jjd�t	j
|j|j�n5d|kr�|jjd�t	j
|j|j�ny-t||||�t
||
|d|�SWnktk
ra|j|krH|jj�|j|O_t	j
|j|j�nt||||	��nXdS(s5Update the sparse config and working directory state.R(s
exp-sparseR�N(R+R,R!RR`ReRtrequirementstdiscardR	t
writerequiresRRWR�t	ExceptionRR(
R%RRRR�tremovingRtoldincludestoldexcludestoldprofilest	oldstatustoldmatchtoldrequires((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pyt_updateconfigandrefreshwdirs*


cC@sx|j��f|jjd�}t|j|d�\}}}|rO|rOdSt|t�t�|d|�WdQXdS(s�Clears include/exclude rules from the sparse config.

    The remaining sparse config only has profiles, if defined. The working
    directory is refreshed, as needed.
    R(NR�(twlockR+R,R!RR�R(R%R�RRRR((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pyt
clearrules0s
c
C@s�|j���|jjd�}t|j|d�\}}}t|�\}}	}
t}x�|D]�}tjtj	|�dd��}
|
j
�}WdQXt|j|d�\}}}t|�t|�t|�}|j||�|j||	�|j||
�t|�t|�t|�|kr_t
}q_q_Wd}}}d}|r�t||
�}t||�}t||	�}ttt||||d|��}nt|j|||||�WdQXdS(s�Import sparse config rules from files.

    The updated sparse config is written out and the working directory
    is refreshed, as needed.
    R(tmodetrbNiR�(iii(R�R+R,R!RRBRR
t	posixfilet
expandpathtreadRnR1RR�R�tprintchanges(R%toptstpathsR�RRRRt	aincludest	aexcludest	aprofilestchangedRTRSt	iincludest	iexcludest	iprofilestoldsizetprofilecounttincludecounttexcludecounttfcounts((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pytimportfromfiles?s4

! &
	cC@s�|j��{|jjd�}t|j|d�\}}
}|rat�}t�}t�}n$t|�}t|
�}t|�}td�|D��r�tjt	d���n|
sh|j
|j�}}g}x�|D]}tj
|d�\}}|tjks|dkrN|r%|dndtj|||�}|j|�q�|j|�q�W|}n|r~|j|�ne|r�|j|�nO|r�|j|�n9|r�|j|�n#|r�|j|�|j|�nt||�t||�}t||�t||�}t||
�t|
|�}ttt||||d|	d|��}t|j|||||�WdQXdS(	s�Perform a sparse config update.

    Only one of the actions may be performed.

    The new config is written out and a working directory refresh is performed.
    R(cs@s!|]}tjj|�VqdS(N(tosRxtisabs(R�tpat((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pys	<genexpr>�sspaths cannot be absolutet:RyR�R�N(R�R+R,R!RRtanyRRRR�tgetcwdRzt	_patsplitRtcwdrelativepatternkindsRt	canonpathRfR1tdifference_updateRnR�R�R�(R%tpatsR�R}R�tresettdeletet
enableprofiletdisableprofileR�tusereporootpathsRt
oldincludet
oldexcludeR�t
newincludet
newexcludetnewprofilesR�tcwdtabspatstkindpattkindR�tapR�R�R�R�((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pytupdateconfigis\	
		
	



	c		C@s�|jd|���}|j�|j|jdtd�|�|j|jdtd�|�|j|jdtd�|�|j�s�|j|jdtd	�|�|j|jd
td�|�|j|jdtd
�|�nWdQXdS(s/Print output summarizing sparse config changes.R(tprofiles_addedsProfiles changed: %d
tinclude_rules_addedsInclude rules changed: %d
texclude_rules_addedsExclude rules changed: %d
tfiles_addedsFiles added: %d
t
files_droppedsFiles dropped: %d
tfiles_conflictingsFiles conflicting: %d
N(t	formattert	startitemt	condwritetverboseRtisplain(	RR�R�R�R�RbRrtconflictingtfm((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pyR��s
(,t
__future__RRgRIR�ti18nRR=RRRyRRRzRRjRRR	R
RR*R!R'R9RBRRNRWRXRZR\RwRRReR�R�R�R�R�R�R�R�(((s6/usr/lib64/python2.7/site-packages/mercurial/sparse.pyt<module>s<4
	3		8						"	4	Wb	#*		@