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__/subrepoutil.cpython-39.opt-1.pyc
a

�+�b�E�@s*ddlmZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZmZm
Z
mZmZmZmZddlmZmZdZejr�dd	lmZmZmZmZmZmZdd
l
mZmZmZ m!Z!m"Z"m#Z$ee%ee%e%e%ffZ&dd�Z'd
d�Z(ddd�Z)d dd�Z*dd�Z+dd�Z,dd�Z-d!dd�Z.dd�Z/dS)"�)�absolute_importN�)�_)�getattr)�config�error�	filemerge�pathutil�phases�pycompat�util)�
stringutil�urlutil)�rsempty)�Any�Dict�List�Optional�Set�Tuple)�context�	localrepo�match�scmutil�subrepo�uic
s>t�������d�����fdd�	�d�vr6�d���d�D] \}}��d||��d|��q@i}d�v�r(z�t�d�����D]f\}}|��}|s�q�z|�	dd�\}}Wn2t
y�t�t
d	���d�|df��Yn0|||<q�Wn6t�y&}z|jtjk�r�WYd}~n
d}~00�fd
d�}	i}
��d�D]�\}}d
}|�d��r�d|v�rrt�t
d���|�	dd�\}}|dd�}|��}t�|����st�dd�}|�rt�|�}t�|j�p�d|�|_t�|j�|_t|�}
|	|
�}||
k�r
|	|�}n|}|	|�}|��|�|d�|f|
t� |�<�qB|
S)z�return a state dict, mapping subrepo paths configured in .hgsub
    to tuple: (source from .hgsub, revision from .hgsubstate, kind
    (key in types dict))
    Nc
s�|�vrzz�|��}WnLtyd}z4|jtjkr6���td���|��WYd}~dSd}~00��||||��nt�	td���|���dS)Ns*warning: subrepo spec file '%s' not found
s subrepo spec file '%s' not found)
�data�IOError�errno�ENOENT�warnr�pathto�parser�Abort)�fZsections�remapr�err��ctx�p�read�repor��;/usr/lib64/python3.9/site-packages/mercurial/subrepoutil.pyr*?s ���zstate.<locals>.read�.hgsub�subpaths�.hgsubstate� rs8invalid subrepository revision specifier in '%s' line %dcs���d�D]�\}}t�|�}t�dd|�}zt�|||d�}Wq
tjy�}z0t�td���d|�t�	|�f��WYd}~q
d}~00q
|S)Nr/s\\\\([0-9]+)s\\\1rs#bad subrepository pattern in %s: %s)
�itemsr
Z	escapestr�re�subrr#r�sourceZforcebytestr)�src�pattern�repl�e)r)r,r-r%ns

���zstate.<locals>.remaprshg�[�]s!missing ] in subrepository sourceF��abort)NN)!rr+Zconfigitems�setZconfigsource�	enumerater�
splitlines�lstrip�split�
ValueErrorrr#rr!rrrr2�
startswithr�url�isabs�
_abssource�	posixpath�join�path�normpath�bytes�strip�getr�pconvert)r(rrJr6Zrev�i�lZrevisionr&r%�state�kind�parentZjoinedZremappedr,r'r-rR6sh
���




$rRcs.�fdd�t��D�}|�dd�|�d�dS)z=rewrite .hgsubstate in (outer) repo with these subrepo statescs4g|],}�|dtdkrd�|d|f�qS)rs%s %s
)�	nullstate��.0�s�rRr,r-�
<listcomp>�s�zwritestate.<locals>.<listcomp>r0rN)�sortedZwwriterI)r+rR�linesr,rYr-�
writestate�s
�r]cs�||kr|��}|j}|j}|j}i}	�j�d|||f�d�fdd�	}
t�|�}tt�|��D�]�\}}
|�	|t
�}|
}|�|���r�|
d|
ddf}||kr�|}|�
�}||d<||v�r�||}||ks�||kr�|
|	|<qb�q�||k�r|
|d	|�|�|��	||�||	|<�q�|d|dk�r�|
d|d
<|d|d<�j�td�|d��r�|
|d
|�|�|��	||�||	|<n�|d|dk�r�|
|d|�|�|��	||�||	|<n�|
|d�|�|�}|�|
d�|d<|�|d�|d<�j�td�|d�}|dk�r@|�|��|�|
|	|<|
|d|�nF|dk�r`|
|	|<|
|d|
�n&|�|��	||�||	|<|
|d|�qb||k�r�|
|d�|�|���qb|t
k�r�|
|d�|
|	|<qbqb�j�td�|d�rb|
|d�|�|���qbt|���D]�\}}||v�r �qn�||v�rP|
|d|�|�|��	|�||	|<n^|||k�r|�
�}||d<�j�td�|d�dk�r|
|d|�|�|��	|�||	|<�qt�|	�|	S)z{delegated from merge.applyupdates: merging of .hgsubstate file
    in working context, merging context and ancestor contextssubrepo merge %s %s %s
rcs&|rd|}�j�d|||f�dS)Ns%s:%s:%ss  subrepo %s: %s %s
)r�debug)rX�msg�r�r+r,r-r^�szsubmerge.<locals>.debugrr�+�ssother changed, getslosros� subrepository sources for %(s)s differ
you can use (l)ocal%(l)s source (%(lo)s) or (r)emote%(o)s source (%(ro)s).
what do you want to do?$$ &Local $$ &Remotesprompt changed, getsother side changed, getsboth sides changedsslssrs� subrepository %(s)s diverged (local revision: %(sl)s, remote revision: %(sr)s)
you can (m)erge, keep (l)ocal%(l)s or keep (r)emote%(o)s.
what do you want to do?$$ &Merge $$ &Local $$ &Remotes
merge withskeep local subrepo revisionsget remote subrepo revisionsremote removed, removeslocal added, keepsz local%(l)s changed subrepository %(s)s which remote%(o)s removed
use (c)hanged version or (d)elete?$$ &Changed $$ &Deletes
prompt removesremote added, getsz remote%(o)s changed subrepository %(s)s which local%(l)s removed
use (c)hanged version or (d)elete?$$ &Changed $$ &Deletesprompt recreate)r)�p1�substaterr^rZ
partextrasr[rZ	iteritemsrNrUr4Zdirty�copyZpromptchoicerZshortid�merge�remover2r])r+�wctxZmctxZactxZ	overwrite�labels�s1�s2ZsaZsmr^Z
promptssrcrXrQ�aZldZpromptsr`Zsrepo�optionr,rar-�submerge�s�


���



��	�





���




���
��

roFcs�g}t�}|j���d|v�r�|j|j|jfD]}d|vr.|�d�q.|��j}t��	��D]�}	�|	�s�|	|vr~||	�|	<q\|s�t
�td�|	��|�
|	��d�}
|
r�|�dd�s�t
j|
td�d��|�|	�|�|	�q\|�
|	���}�|	d	|�|	d
f�|	<|�|	d�d|kr\|�|	�q\|��D]0}�fd
d�|jD�}
|�fdd�|
D�7}�q0|�r�d��s�d|��|��v�r�t
�td���|j�d	d�n<d|jv�r�d|v�r�d|j|j|jv�r�|j�d	d�||�fS)ayCalculate .hgsubstate changes that should be applied before committing

    Returns (subs, commitsubs, newstate) where
    - subs: changed subrepos (including dirty ones)
    - commitsubs: dirty subrepos which the caller needs to commit recursively
    - newstate: new state dict which the caller must write to .hgsubstate

    This also updates the given status argument.
    r.r0s#commit with new subrepo %s excludedTsuiscommitsubreposs#use --subrepos for recursive commit)�hintr�)NNNrcsg|]}|�vr|�qSr,r,rV)�newstater,r-rZorzprecommit.<locals>.<listcomp>csg|]}�|�r|�qSr,r,rV)rr,r-rZprs$can't commit subrepos without .hgsub)r>rerfZmodifiedZaddedZremovedrhrdr[�keysrr#rr4�dirtyreasonZ
configbool�append�addZ	basestaterN�parents�insert)rri�statusr�forceZsubsZ
commitsubs�cZoldstaterXrt�bsr)r`r,)rrrr-�	precommit;sZ



��
��r}cCs\|}g}t�|d�r@t�|j�}|�t|��|��r8q@|j}q|�	�t
j|�}t
�|�S)zRreturn the source of this repo

    Either absolute or relative the outermost repo�
_subparent)
r�safehasattrrrE�
_subsourcerurLrF�
_subparent�reverserHrIrK)r+rT�chunksr5rJr,r,r-�repo_rel_or_abs_source�s
r�cCs2|}t�|d�r|j}q|jtt�|j��d�S)z9return path to this (sub)repo as seen from outermost repor~N)rrr��root�lenr	Znormasprefix)r+rTr,r,r-�reporelpath�sr�cCs|jS)z7return path to this subrepo as seen from outermost repo)Z_relpath)r4r,r,r-�
subrelpath�sr�TcCsNt�|d�r�t�|j�}|��r(t|�St�|j	�|_	t
|j|dd�}|r�t�t�|��}t�
|j	pfd|j	�|_	t�|j	�|_	t|�Sn�d}t�|d�r�|j}nV|r�|j�dd�r�|j�dd�}n4|j�dd	�r�|j�dd	�}n|��r�tj	�|j�S|�r6t�|��r2t|�d
k�s(|d
d�dv�r2t�|�}|S|�rJt�td
���dS)z�return pull/push path of repo - either based on parent repo .hgsub info
    or on the top repo config. Abort or return None if no source found.r~Fr<rNs_subtoppathspathssdefault-pushsdefaultrq�s\/s(default path for subrepository not found)rrrrEr�rFrLrHrKrJrGr�rOrIZ_subtoppathrrZshared�os�dirnameZ
sharedpathZhasdriveletterr��abspathrr#r)r+�pushr=r5rTrJr,r,r-rG�s6
 
rGc
Cs�t�|�}t|dd�}|s|S|�dd�}|dvrDt�td�|��|dkrP|Stj}d}t|�D]0}|�	|�}|�
||d�}	||	krb|	}|}qb||kr�|dkr�t�td	�tj|tj||f��|�td
�tj||f�|S|S)Nresphasess
checksubrepos)�ignoresfollow�aborts.invalid phases.checksubrepos configuration: %sr�rr�s=can't commit in %s phase conflicting %s from subrepository %ssAwarning: changes are committed in %s phase from subrepository %s
)
r
�newcommitphaserrrr#rZpublicr[r4ZphaseZ
phasenamesr )
rr(Zcommitphasere�checkZmaxphaseZmaxsubrXr4Zsubphaser,r,r-r��sP

�
�������r�)N)F)FT)0Z
__future__rrr�rHr3Zi18nrrr�rrrr	r
rZutilsr
rrU�
TYPE_CHECKING�typingrrrrrrrrrZmatchmodrrrZuimodrLZSubstaterRr]ror}r�r�r�rGr�r,r,r,r-�<module>s.$	  	m

G	
1

Youez - 2016 - github.com/yon3zu
LinuXploit