403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /usr/lib64/python3.9/site-packages/mercurial/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/lib64/python3.9/site-packages/mercurial/__pycache__/sparse.cpython-39.pyc
a

�+�b}i�@sddlmZddlZddlmZddlmZddlmZm	Z
mZm
ZmZmZmZmZmZddlmZdZd	d
�Zdd�Zd
d�Zdd�Zd3dd�Zdd�Zdd�Zdd�Zdd�Zdd�Z dd�Z!d4d d!�Z"d"d#�Z#d5d$d%�Z$d&d'�Z%d6d(d)�Z&d7d*d+�Z'd8d,d-�Z(d9d/d0�Z)d:d1d2�Z*dS);�)�absolute_importN�)�_)�hex)	�error�match�merge�
mergestate�pathutil�pycompat�requirements�scmutil�util)�hashutilFc	CsZt�dt|�|���0t�}t�}t�}d}d}|�d�D]�}|��}|r:|�d�rXq:q:|�d�r�|dd���}|r�|�|�q:|dkr�|r�||kr�t�	t
d	�d
|i��d}|}q:q:|dkr�d}|}q:|r:|dur�tj	t
d
�||d�t
d�d��|���d��r |�t
d�||d��q:|�|�q:|||fWd�S1�sL0YdS)z�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.
    z+sparse.parseconfig(ui, %d bytes, action=%s)NF�
�#s	%include �	s	[include]s5%(action)s config cannot have includes after excludes�actionTs	[exclude]s4%(action)s config entry outside of section: %(line)s)rslines<add an [include] or [exclude] line to declare the entry type)�hint�/sPwarning: %(action)s profile cannot use paths starting with /, ignoring %(line)s
)rZtimedcm�len�set�split�strip�
startswith�addr�Abortr�warn)	�ui�raw�action�includes�excludes�profiles�currentZhavesection�line�r&�6/usr/lib64/python3.9/site-packages/mercurial/sparse.py�parseconfig"sl
�
����������r(cCs|j||d���S)z1Resolve the raw content of a sparse profile file.)�changeid)Zfilectx�data)�repo�profiler)r&r&r'�readprofilehsr-c
CsDtst�t�t�fS|j�d�}|s4t�t�t�fS|durJt�td���t|j|d�\}}}||}|�r*t�}|�r&|�	�}||vr�qr|�
|�zt|||�}WnLtjy�d||f}	|j�
dd�r�|j�|	�n|j�|	�YqrYn0t|j|d�\}
}}|�|
�|�|�|�|�qr|}|�r:|�
d�|||fS)z�Obtain sparse checkout patterns for the given rev.

    Returns a tuple of iterables representing includes, excludes, and
    patterns.
    �sparseNs3cannot parse sparse patterns from working directorys?warning: sparse profile '%s' not found in rev %s - ignoring it
smissingwarnings.hg*)�enabledr�vfs�tryreadrrrr(r�poprr-ZManifestLookupErrorZ
configboolr�debug�update)
r+�revrr!r"r#�ctxZvisitedr,�msgZ	pincludesZ	pexcludesZsubprofsr&r&r'�patternsforrevosN�
��
�



r8c	sf�fdd��j��D�}t�}t�}t�}|D],}t�|�\}}}||O}||O}||O}q.|||fS)z�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.
    cs"g|]}|�jkr�j�|��qSr&�ZnullidZ	changelogr5��.0�node�r+r&r'�
<listcomp>�s
�z activeconfig.<locals>.<listcomp>)�dirstate�parentsrr8)	r+�revsZallincludesZallexcludesZallprofilesr5r!r"r#r&r=r'�activeconfig�s
�
rBTcCs�|j}|�d�}|r |�d�}nd}|dus8|r�|dur�tt�|j�d�����}||d<|r�|j�d�}tt�|����}||d<d||fS)zObtain the signature string for the current sparse configuration.

    This is used to construct a cache key for matchers.
    s	signatures
tempsignature�0Nr.�
tempsparse�%s %s)�_sparsesignaturecache�getrrZsha1r0r1�digest)r+�includetemp�cache�	signatureZ
tempsignaturerr&r&r'�configsignature�s
rLcCs�|�dd���}t|�D]}|�d|�q|rZ|�d�t|�D]}|�|�|�d�q@|r�|�d�t|�D]}|�|�|�d�qpWd�n1s�0Y|j��dS)z:Write the sparse config file given a sparse configuration.r.swbs
%%include %s
s
[include]
rs
[exclude]
N)r0�sorted�writerF�clear)r+r!r"r#�fh�p�i�er&r&r'�writeconfig�s



*rTcCs$|j�d�}|st�St|�d��S�NrDr)r0r1rr)r+rr&r&r'�readtemporaryincludes�srVcCs&|j�dd�t|���|j��dSrU)r0rN�joinrMrFrO)r+r!r&r&r'�writetemporaryincludes�srXcCs*t|�}|D]}|�|�qt||�dS�N)rVrrX)r+�
additionalr!rRr&r&r'�addtemporaryincludessr[c
Cs
tr|j�d�sdS|��}|js4|js4|js4|jr8dSt|dd�}|j	}t
��}g}t|�}|D]8}||vrb||�sbt
d�}|�|tjd|�|�|�qbt
j|||d|dddd�|D]}|j|ddd�q�|j�d�|j��t
d�}	|j�|	t|��dS)	NrDF�rIs*dropping temporarily included sparse files�.�Zwantfiledata��
p1_tracked�
wc_trackedsAcleaned up %d temporarily added file(s) from the sparse checkout
)r/r0�exists�status�modified�added�removedZdeleted�matcherr?�mergemod�mergeresultrVr�addfile�
mergestatemod�
ACTION_REMOVE�append�applyupdates�update_file�unlinkrFrOrr)
r+�s�sparsematchr?�mresult�dropped�tempincludes�file�messager7r&r&r'�prunetemporaryincludess4�
�rxcCs(dd�|D�}t�d|�}t�||g�S)zqReturns a matcher that returns true for any of the forced includes
    before testing against the actual matcher.cSsg|]}d|df�qS)spath�r&)r;�includer&r&r'r>/ryz'forceincludematcher.<locals>.<listcomp>ry)�matchmod�includematcher�unionmatcher)rgr!Zkindpatsr|r&r&r'�forceincludematcher,sr~c
	s tst��S|r|dgkr2�fdd��j��D�}t�|d�}d|d�ttj	|��f}�j
�|�}|rl|Sg}|D]V}z>t�|�\}}	}
|s�|	r�tj
�jdg||	dd	�}|�|�Wqtty�Yqt0qt|s�t��}n t|�d
kr�|d}n
t�|�}|�rt��}t||�}|�j
|<|S)z�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.
    Ncs"g|]}|�jkr�j�|��qSr&r9r:r=r&r'r>As
�zmatcher.<locals>.<listcomp>r\rE� rysrelpath)rz�exclude�defaultrr)r/r{�alwaysr?r@rLrW�maprZbytestrZ_sparsematchercacherGr8r�rootrm�IOErrorrr}rVr~)
r+rArIrK�key�resultZmatchersr5r!r"r#rgrur&r=r'rg4sJ	
��




rgc 	Cs�tsdSdd�|��D�}t||�}|��r0dSt�}i}|rTt||����g�}	nt||��g�}	g}
|��D]�\}}|\}
}}|�|�|	|�r�|||<nj|
t	j
kr�|
�|�|||<nL|r�|
js�|
�|�|||<n.|
t	j
kr�|||<n||v�rt	j||f||<|rp|
t	j
krp|\}}}}}|	|�sp|
�|�qpt|
�dk�r8|j�td�t|
��t||
�t��}d}|d��}|
D]6}||v�r�|d|}|�|t	j|��df|��q�|j���`tj|||d|dddd	�|j}|�t	jg�D]\}}}|j|d
d
d��q�Wd�n1�s.0Yt|�d}||@}|�r�|�s�|��}|D]^}||�}|	|�}|�s�|�r�|�|�}t	j|dfd
f||<n|�rd|�sdt	jgd
f||<�qd|� |�dS)zAFilter updates to only lay out files that match the sparse rules.NcSsg|]}|���qSr&)r5)r;Zpctxr&r&r'r>vryz(filterupdatesactions.<locals>.<listcomp>rsCtemporarily included %d file(s) in the sparse checkout for merging
s%temporarily adding to sparse checkoutFr]r^Tr_�ry)!r/r@rgr�rZp1r5ZfilemaprrkZACTION_MERGErmZno_opZ
ACTION_FORGETrlrrrcrr[rhri�manifestrj�
ACTION_GET�flagsr?�parentchangernZ
getactionsrorBZ
setactions) r+ZwctxZmctxZbranchmergersZoldrevsZoldsparsematch�filesZ
prunedactionsrrZtemporaryfilesrvr �type�argsr7�f1�f2�fa�moveZancZtmresultrwZwctxmanifestZfctxr?r�r#Zchangedprofiles�mf�old�newr&r&r'�filterupdatesactionsqs�











���


��	�4
�
r�cCszt�}|�|j�|�|j�|�|j�t|�}d}|D]&}||�s:|j�td�|�|}q:|rtt	�
td���|j}|d}	g}
g}g}|	��}
t|
�}t
��}|D]�}||�}||�}|r�|r�|�r6|�r6||v�r6|
�|�}|j�|��r|�|tj|fd�|�|�n |�|tj|dfd�|
�|�q�|�rB|�rR|s�|s�||vr�|�|�||vr�|�|tjgd�q�d}|D] }|j�td�|�|}�q�|�r�t	�
td���t�|�D]:\}}||v�r�||�}||�}|�r�|�s�|�|��q�t
j|||d|dddd�|
D]}|j|d	d	d
��q|D]}|j|ddd
��q:|D]}|j|d	d	d	d��qV|
||fS)a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.
    Fspending changes to '%s'
s2could not update sparseness due to pending changesr]rysjcannot change sparseness due to pending changes (delete the files or use --force to bring them back dirty)Nr^Tr_)r`raZpossibly_dirty)rr4rdrerfrgrrrrrr?r�rhrir�ZwvfsrbrjrkZACTION_EXECrmr�rlrZ	iteritemsrnro)r+�
origstatus�origsparsematch�force�pendingrr�abort�fr?r6re�lookuprtr�r�rsrvr�r�Zfl�stater&r&r'�refreshwdir�s�
�
�

��	
��
r�cCsV||}t||���d}|t|���@rJ|��}t|�}t|||dd�t|�dS)z1Perform actions after a working directory commit.r�T�r�N)r8r5rr�rcrgr�rx)r+r<r6r#r�r�r&r&r'�aftercommitIsr�c
	Cs4|����|j�d�}t|j|d�\}}}	|��}
t|�}t|j�}tj	|vrn|rn|j�
tj	�t�|�n"tj	|vr�|j�
tj	�t�|�z.t||||�t||
||d�WWd�St�y|j|kr�|j��|j|O_t�|�t||||	��Yn0Wd�n1�s&0YdS)z5Update the sparse config and working directory state.r.r�N)�lockr0r1r(rrcrgrrZSPARSE_REQUIREMENT�discardr
ZwritereporequirementsrrTr��	ExceptionrO)
r+r!r"r#r��removingrZoldincludesZoldexcludes�oldprofilesZ	oldstatusZoldmatchZoldrequiresr&r&r'�_updateconfigandrefreshwdirZs0�




 


r�c	Cs�|����|j���j|j�d�}t|j|d�\}}}|sZ|sZWd�Wd�dSt|t�t�||d�Wd�n1s�0YWd�n1s�0YdS)z�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�)	�wlockr?r�r0r1r(rr�r)r+r�rr!r"r#r&r&r'�
clearrules�sr�cCs�|�����|j����j|j�d�}t|j|d�\}}}t|�\}}	}
d}|D]�}tj	t�
|�dd��}
|
��}Wd�n1s�0Yt|j|d�\}}}t|�t|�t|�}|�
||�|�
||	�|�
||
�t|�t|�t|�|krPd}qPd}}}d}|�rZt||
�}t||�}t||	�}ttt|||||d	��}t|j||||g|�R�Wd�n1�s�0YWd�n1�s�0YdS)
z�Import sparse config rules from files.

    The updated sparse config is written out and the working directory
    is refreshed, as needed.
    r.Fsrb)�modeNTr)rrrr�)r�r?r�r0r1r(rrBrZ	posixfileZ
expandpath�readrr4r�r��printchanges)r+�opts�pathsr�rr!r"r#Z	aincludesZ	aexcludesZ	aprofilesZchangedrQrPZ	iincludesZ	iexcludesZ	iprofilesZoldsize�profilecount�includecount�excludecount�fcountsr&r&r'�importfromfiles�sD&�

����r�r&c

s������������|�j����N�j�d�}
t�j|
d�\}}}
|r^t�}t�}t�}nt|�}t|�}t|
�}��fdd�}||�}||�}||�}||�}||�}|�	|�|�	|�|�	|�|�
|�|�
|�|�
|�t||
�t|
|�}t||�t||�}t||�t||�}ttt
�|||||d��}t�j||||g|�R�Wd�n1�sz0YWd�n1�s�0YWd�n1�s�0YdS)zuPerform a sparse config update.

    The new config is written out and a working directory refresh is performed.
    r.cs�tdd�|D��r t�td����r(|S�j���}}g}|D]Z}t�|d�\}}|tjvsf|dur�|rr|dndt	�
|||�}|�|�q@|�|�q@|S)Ncss|]}tj�|�VqdSrY)�os�path�isabs)r;�patr&r&r'�	<genexpr>�ryz7updateconfig.<locals>.normalize_pats.<locals>.<genexpr>spaths cannot be absolute�:ry)�anyrrrr��getcwdr{Z	_patsplitZcwdrelativepatternkindsr
Z	canonpathrm)Zpatsr��cwdZabspatsZkindpat�kindr�Zap�r+�usereporootpathsr&r'�normalize_pats�s�z$updateconfig.<locals>.normalize_pats)r�r�N)r�r�r?r�r0r1r(rr�difference_updater4rr�r�r�)r+r�rzr��reset�deleteZ
enableprofileZdisableprofiler�r�rZ
oldincludeZ
oldexcluder�Z
newincludeZ
newexcludeZnewprofilesr�r�r�r�r�r&r�r'�updateconfig�sb&�






�������r�c	Cs�|�d|���}|��|�|jdtd�|�|�|jdtd�|�|�|jdtd�|�|��s�|�|jdtd	�|�|�|jd
td�|�|�|jdtd
�|�Wd�n1s�0YdS)z/Print output summarizing sparse config changes.r.sprofiles_addedsProfiles changed: %d
sinclude_rules_addedsInclude rules changed: %d
sexclude_rules_addedsExclude rules changed: %d
sfiles_addedsFiles added: %d
s
files_droppedsFiles dropped: %d
sfiles_conflictingsFiles conflicting: %d
N)�	formatterZ	startitemZ	condwrite�verboserZisplain)	rr�r�r�r�rertZconflictingZfmr&r&r'r� sB���
���r�)T)NT)F)FF)F)F)r&r&Fr&r&r&FF)rrrrrr)+Z
__future__rr�Zi18nrr<r�rrr{rrhr	rkr
rrr
rZutilsrr/r(r-r8rBrLrTrVrXr[rxr~rgr�r�r�r�r�r�r�r�r&r&r&r'�<module>sR,F<
%
=s
e�
)

4�
_�

Youez - 2016 - github.com/yon3zu
LinuXploit