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/hgext/convert/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /usr/lib64/python3.9/site-packages/hgext/convert/__pycache__/filemap.cpython-39.opt-1.pyc
a

�+�b�F�@s|ddlmZmZddlZddlmZddlmZmZddl	m
Z
e
jZdd�Zd	d
�Z
Gdd�de�ZGd
d�de
j�ZdS)�)�absolute_import�print_functionN)�_)�error�pycompat�)�commonccsLt|�}|dkr>|d|�||dd�fV|�dd|�}qd|fVdS)aYield tuples with path split at '/', starting with the full path.
    No leading, trailing or double '/', please.
    >>> for x in rpairs(b'foo/bar/baz'): print(x)
    ('foo/bar/baz', '')
    ('foo/bar', 'baz')
    ('foo', 'bar/baz')
    ('.', 'foo/bar/baz')
    ���Nr�/r�.)�len�rfind)�path�i�r�;/usr/lib64/python3.9/site-packages/hgext/convert/filemap.py�rpairss
	rcCs|durdSt�|�S)z}We use posixpath.normpath to support cross-platform path format.
    However, it doesn't handle None input. So we wrap it up.N)�	posixpath�normpath)rrrr�	normalize%src@sBeZdZdZddd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�
filemapperz�Map and filter filenames when importing.
    A name can be mapped to itself, a new name, or None (omit from new
    repository).NcCs>||_i|_i|_i|_d|_|r:|�|�r:t�td���dS)Nserrors in filemap)	�ui�include�exclude�rename�targetprefixes�parser�Abortr)�selfrrrrr�__init__2s
zfilemapper.__init__cs>d}��fdd�}tj|dd�����}|�r:|dkr`t����}|||�jd�7}|�j|<n�|dkr�t����}|||�jd�7}|||�jd�7}|�j|<n�|dkr�t����}t����}|||�jd�7}|�j|<nN|d	k�r|��t�����7}n,�j�	t
d
��j�jt
�|�f�|d7}���}q(|S)Nrc	s�|s&�j�td��j�j|f�dS||vrR�j�td��j�j||f�dS|�d�sn|�d�snd|vr��j�td��j�j|t�|�f�dSdS)Ns%s:%d: path to %s is missing
rs%s:%d: %r already in %s list
r
s//s%s:%d: superfluous / in %s %r
r)	r�warnr�infile�lineno�
startswith�endswithr�bytestr)�name�mappingZlistname�Zlexrrr�check?s,������zfilemapper.parse.<locals>.checks!@#$%^&*()-=+[]{}|;:,./<>?)�filepathZ	wordcharssincludesexcludesrenamessources%s:%d: unknown directive %r
r)rZshlexerZ	get_tokenrrrrrrr rr!r"rr%)rrZerrsr)�cmdr&�src�destrr(rr<s>�
��
zfilemapper.parsec	CsLt|�}t|�D]0\}}z||||fWSty>Yq0qd|dfS)N�)rr�KeyError)rr&r'�pre�sufrrr�lookuprszfilemapper.lookupcCsv|jdur4t�|_t�|j�D]\}}|j�|�q|jrDd|jvrHdSt|�}t|�D]\}}||jvrXdSqXdS)z�Return true if the given target filename is covered as a destination
        of the filemap. This is useful for identifying what parts of the target
        repo belong to the source repo and what parts don't.NrTF)r�setrZ	iteritemsr�addrr)r�filename�before�afterr0r1rrr�istargetfile{s

zfilemapper.istargetfilecCs�|jr|�||j�d}n|}|jr8|�||j�d}nd}|jsF|sVt|�t|�krZdS|�||j�\}}}|r�|dkr~|S|r�|�d�r�||S|d|S|S|S)Nrr.rr
)rr2rrrr$)rr&Zinc�excZnewprer0r1rrr�__call__�s$
zfilemapper.__call__cCst|jp|jp|j�S�N)�boolrrr�rrrr�active�szfilemapper.active)N)
�__name__�
__module__�__qualname__�__doc__rrr2r8r:r>rrrrr-s

6	rcs�eZdZ�fdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Z�ZS)+�filemap_sourcecsjtt|��||j�||_t||�|_i|_i|_i|_d|_	d|_
i|_i|_i|_
|j�dd�|_dS)NFsconvertsignoreancestorcheck)�superrCrZrepotype�baser�commits�	parentmap�wantedancestors�convertedorder�_rebuilt�origparents�children�seenchildrenrZ
configbool�ignoreancestorcheck)rrZ
baseconverterZfilemap��	__class__rrr�s�zfilemap_source.__init__cCs|j��dSr;)rEr6r=rrrr6�szfilemap_source.beforecCs|j��dSr;)rEr7r=rrrr7�szfilemap_source.afterc	Cs�||_tti}t�}g}|jD]h}||}||v}|rL|||<||j|<n|||j|<||j|<||}|tkrxd}|�|||f�q ||_|j�	|�Sr;)
rJ�SKIPREVr3�orderrGrH�appendrIrE�	setrevmap)	rZrevmap�seenZdummyset�	converted�revZmapped�wanted�argrrrrT�s$

zfilemap_source.setrevmapc	Cs|jr
dSd|_|j��|j��|j��|jD]t\}}}||jvr�z|�|�j|j|<Wn(t	j
y�|j�d|�Yq4Yn0|dur4|j
�|d�d|j
|<q4|jD]`\}}}z|j|}Wnty�Yq�Yn0|r�|�||�n|�||�|j|g|�R�q�dS)NTsunknown revmap source: %s
rr)rJrG�clearrHrMrIrK�	getcommit�parentsrZRepoLookupErrorr�debugrL�getr/�mark_wanted�mark_not_wanted�_discard)rrWrXrYr\rrr�rebuild�s2





zfilemap_source.rebuildcCs
|j��Sr;)rE�getheadsr=rrrrcszfilemap_source.getheadscCs>|j�|�}|j|<|jD]}|j�|d�d|j|<q|S�Nrr)rEr[rFr\rLr^)rrW�c�prrrr[s
zfilemap_source.getcommitcCs
|j��Sr;)rE�
numcommitsr=rrrrg szfilemap_source.numcommitscCs ||jvr|j|S|j�|�Sr;)rFrEr[�rrWrrr�
_cachedcommit#s

zfilemap_source._cachedcommitcGsv|D]l}|durq|j�|d�d|j|<|j||j|kr|j�|d�|j�|d�|j|=|jr|j|=qdSrd)rMr^rLrH�poprGrJ)rZrevs�rrrrra(szfilemap_source._discardcCspz|j�||�}Wn ty2t�td���Yn0|D]}|�|�r8dSq8|jjrZdS|ond|j|j	vS)Ns+source repository doesn't support --filemapTF�close)
rEZgetchangedfiles�NotImplementedErrorrrrrrrF�extra)rrWr�files�frrrrX4s
zfilemap_source.wantedcCsF|dur"t|j|<th|j|<dS|j||j|<|j||j|<dSr;)rQrGrH)rrWrfrrrr`Ps
zfilemap_source.mark_not_wantedcCsf||j|<t�}|D]8}||jvr4|�|j|�q|j�td�||f�q|�|�||j|<dS)Ns!warning: %s parent %s is missing
)rGr3rH�updaterr rr4)rrWr\Zwrevrfrrrr__s

�
zfilemap_source.mark_wantedcs��j|j}t|�dkr&�js&���g}t�}�j|j}d}t|�D]�\}��j���t	ksH�|vrlqH�jo�t
���fdd�|D��}	|	s�|s�t|�dkr�����j|kr�d}|���||	f�|�
��qH|r�dd�|D�}d}
|�rtdd�|D��}
d	d�|D�}n
|�rd
}
|�j|<d}d�j|jv�r\�fdd�|D�}||v�r\d}t|�d
k�r�|�sˆ�||
��s�d}
|�r�||
}
��||
��j�|d|
f��j|��j|S|�j|_��||��j�|ddf��j|��j�||�\}}}i}t|�}|D]N\}}��|�}|�r||k�sF||v�r||f||<||k�r|�|��qt|���}i}|D]2}��|�}|�r~��||�}|�r~|||<�q~|||fS)NrFc3s6|].}�|kr��j|kr��j|vr|VqdSr;)rGrH)�.0Zp2�Zmp1Zp1rrr�	<genexpr>�s
�z,filemap_source.getchanges.<locals>.<genexpr>TcSsg|]}|ds|�qS)�r�rrrfrrr�
<listcomp>�r.z-filemap_source.getchanges.<locals>.<listcomp>css|]}|dVqdS)�Nrrvrrrrt�r.cSsg|]}|d�qS)rrrvrrrrw�r.rrlcsg|]}��|�j�qSr)ri�branchrvr=rrrw�r.rx)rFr\rrNrbr3ry�	enumeraterGrQ�anyrirSr4�maxrKrnrXr`rIrar_rE�
getchangesr�discard�sorted�items)rrWZfullr\ZmparentsZknownparentsryZhasbranchparentrZ
isancestorZwp�closedZ	pbranchesrfZchangesZcopiesZcleanp2roZncleanp2rprkZnewfZncopiesreZnewcZ	newsourcerrsrr}ts~
�

"





zfilemap_source.getchangescCs|j�|�Sr;)rr8)rZtargetfilenamerrr�targetfilebelongstosource�sz(filemap_source.targetfilebelongstosourcecCs|\}}|j�||�Sr;)rE�getfile)rr&rWZrealnameZrealrevrrrr��szfilemap_source.getfilecCs
|j��Sr;)rE�gettagsr=rrrr��szfilemap_source.gettagscCs
|j��Sr;)rE�hasnativeorderr=rrrr��szfilemap_source.hasnativeordercCs|j�|�Sr;)rE�	lookuprevrhrrrr��szfilemap_source.lookuprevcCs
|j��Sr;)rE�getbookmarksr=rrrr��szfilemap_source.getbookmarkscCs|j�||�dSr;)rErV)rrWZsinkrevrrrrV�szfilemap_source.converted)r?r@rArr6r7rTrbrcr[rgrirarXr`r_r}r�r�r�r�r�r�rV�
__classcell__rrrOrrC�s*jrC)Z
__future__rrrZmercurial.i18nrZ	mercurialrr�rrQrr�objectrZconverter_sourcerCrrrr�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit