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: //lib64/python2.7/site-packages/hgext/convert/filemap.pyc
�
1�3\c@@s�ddlmZmZddlZddlmZddlmZmZddl	m
Z
e
jZd�Zd�Z
d	efd
��YZde
jfd��YZdS(
i(tabsolute_importtprint_functionN(t_(terrortpycompati(tcommoncc@sZt|�}x<|dkrJ|| ||dfV|jdd|�}qWd|fVdS(sYield 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')
    i����it/it.N(tlentrfind(tpathti((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pytrpairss
	cC@s|dkrdStj|�S(s We use posixpath.normpath to support cross-platform path format.
    However, it doesn't handle None input. So we wrap it up. N(tNonet	posixpathtnormpath(R
((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyt	normalize"st
filemappercB@sGeZdZdd�Zd�Zd�Zd�Zd�Zd�Z	RS(s�Map and filter filenames when importing.
    A name can be mapped to itself, a new name, or None (omit from new
    repository).cC@sa||_i|_i|_i|_d|_|r]|j|�r]tjt	d���q]ndS(Nserrors in filemap(
tuitincludetexcludetrenameR
ttargetprefixestparseRtAbortR(tselfRR
((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyt__init__.s					c@s�d}��fd�}tjd|dd���j�}x�|r�|dkr�t�j��}|||�jd�7}|�j|<n#|dkr�t�j��}|||�jd�7}|||�jd�7}|�j|<n�|dkrEt�j��}t�j��}|||�jd�7}|�j|<nj|d	krs|�jt�j���7}n<�jj	t
d
��j�jt
j|�f�|d7}�j�}q?W|S(Nic@s�|s3�jjtd��j�j|f�dS||kro�jjtd��j�j||f�dS|jd�s�|jd�s�d|kr��jjtd��j�j|tj|�f�dSdS(Ns%s:%d: path to %s is missing
is%s:%d: %r already in %s list
Rs//s%s:%d: superfluous / in %s %r
i(	RtwarnRtinfiletlinenot
startswithtendswithRtbytestr(tnametmappingtlistname(tlexR(s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pytcheck:s tfilepatht	wordcharss!@#$%^&*()-=+[]{}|;:,./<>?RRRtsources%s:%d: unknown directive %r
i(Rtshlexert	get_tokenRRRRRRRRRRRR (RR
terrsR%tcmdR!tsrctdest((R$Rs;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyR8s6		" 
cC@s_t|�}xCt|�D]5\}}y||||fSWqtk
rMqXqWd|dfS(Nt(RRtKeyError(RR!R"tpretsuf((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pytlookupfs
cC@s�|jdkrNt�|_x0|jj�D]\}}|jj|�q+Wn|jsgd|jkrktSt|�}x-t|�D]\}}||jkr�tSq�Wt	S(s�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.RN(
RR
tsetRt	iteritemstaddtTrueRRtFalse(RtfilenametbeforetafterR1R2((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pytistargetfileoscC@s�|jr%|j||j�d}n|}|jrP|j||j�d}nd}|jrf|s~t|�t|�kr�dS|j||j�\}}}|r�|dkr�|S|r�|jd�r�||S|d|S|S|S(NiR/RR(RR3RRR
RR(RR!tinctexctnewpreR1R2((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyt__call__�s$		(cC@st|jp|jp|j�S(N(tboolRRR(R((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pytactive�sN(
t__name__t
__module__t__doc__R
RRR3R<R@RB(((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyR)s
	.				tfilemap_sourcecB@s�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cC@s�tt|�j||j�||_t||�|_i|_i|_i|_d|_
t|_i|_
i|_i|_|jjdd�|_dS(Ntconverttignoreancestorcheck(tsuperRFRtrepotypetbaseRtcommitst	parentmaptwantedancestorsR
tconvertedorderR8t_rebuilttorigparentstchildrentseenchildrenRt
configboolRH(RRt
baseconvertertfilemap((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyR�s									cC@s|jj�dS(N(RKR:(R((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyR:�scC@s|jj�dS(N(RKR;(R((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyR;�sc	C@s�||_itt6}t�}g}x�|jD]�}||}||k}|rl|||<||j|<n|||j|<||j|<||}|tkr�d}n|j|||f�q0W||_|j	j
|�S(N(RPtSKIPREVR4torderRMRNR
tappendRORKt	setrevmap(	Rtrevmaptseentdummysett	convertedtrevtmappedtwantedtarg((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyRZ�s$

	



		cC@sh|jr
tSt|_|jj�|jj�|jj�x�|jD]�\}}}||jkr�y|j|�j	|j|<Wq�t
jk
r�|jj
d|�qGq�Xn|dk	rG|jj|d�d|j|<qGqGWx{|jD]p\}}}y|j|}Wntk
r&q�nX|r@|j||�n|j||�|j||�q�WtS(Nsunknown revmap source: %s
ii(RPR7RMtclearRNRSRORQt	getcommittparentsRtRepoLookupErrorRtdebugR
RRtgetR0tmark_wantedtmark_not_wantedt_discard(RR_RaRbRe((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pytrebuild�s2		



'
cC@s
|jj�S(N(RKtgetheads(R((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyRmscC@sU|jj|�}|j|<x1|jD]&}|jj|d�d|j|<q'W|S(Nii(RKRdRLReRRRh(RR_tctp((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyRd	s$cC@s*||jkr|j|S|jj|�S(N(RLRKRd(RR_((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyt
_cachedcommitscG@s�x�|D]�}|dkrqn|jj|d�d|j|<|j||j|kr|jj|d�|jj|d�|j|=|jr�|j|=q�qqWdS(Nii(R
RSRhRRRNtpopRMRP(Rtrevstr((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyRks
 
	cC@sjy|jj||�}Wn&tk
rAtjtd���nXx!|D]}|j|�rItSqIWtS(Ns+source repository doesn't support --filemap(	RKtgetchangedfilestNotImplementedErrorRRRRR7R8(RR_Rtfilestf((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyRa"s

cC@sY|dkr-t|j|<th|j|<dS|j||j|<|j||j|<dS(N(R
RWRMRN(RR_Ro((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyRj3s
cC@s�||j|<t�}xT|D]L}||jkrI|j|j|�q|jjtd�||f�qW|j|�||j|<dS(Ns!warning: %s parent %s is missing
(RMR4RNtupdateRRRR6(RR_RetwrevRo((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyRiBs
	

c@s�j|j}t|�dkr9�jr9�j�ng}t�}�j|j}t}x�t|�D]�\}��j	���t
ksk�|kr�qkn�jo�t���fd�|D��}	|	r|rt|�dkr�j��j|krt
}qn|j��||	f�|j��qkW|rhg|D]}
|
dsI|
^qI}nd}|r�td�|D��}g|D]}
|
d^q�}n|r�d}n|�j|<t}d�j|jkrg|D]}
�j|
�j^q�}
||
krt
}qnt|�dkr�|r��j||�r�d}
|rd||}
n�j||
��jj|t|
f��j|��j	|S|�j|_�j||��jj|t
df��j|��jj||�\}}}i}t|�}xp|D]h\}}�j|�}|r"||ks[||kr"||f||<||kr�|j|�q�q"q"Wt|j��}i}xL|D]D}�j|�}|r��j||�}|r�|||<q�q�q�W|||fS(Nic3@sG|]=}�|kr��j|kr��j|kr|VqdS(N(RMRN(t.0tp2(tmp1tp1R(s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pys	<genexpr>tsics@s|]}|dVqdS(iN((RzRo((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pys	<genexpr>�sitclosei(RLReRRHRlR4tbranchR8t	enumerateRMRWtanyRpR7RYR6R
tmaxRQtextraRaRjRORkRiRKt
getchangesRtdiscardtsortedtitems(RR_tfullRetmparentstknownparentsRthasbranchparentRt
isancestorRotwptclosedt	pbranchestchangestcopiestcleanp2Rvtncleanp2RwRstnewftncopiesRntnewct	newsource((R|R}Rs;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyR�Vs|
	

" & 	
%,



cC@s|jj|�S(N(RR<(Rttargetfilename((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyttargetfilebelongstosource�scC@s|\}}|jj||�S(N(RKtgetfile(RR!R_trealnametrealrev((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyR��scC@s
|jj�S(N(RKtgettags(R((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyR��scC@s
|jj�S(N(RKthasnativeorder(R((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyR��scC@s|jj|�S(N(RKt	lookuprev(RR_((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyR��scC@s
|jj�S(N(RKtgetbookmarks(R((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyR��scC@s|jj||�dS(N(RKR^(RR_tsinkrev((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyR^�s(RCRDRR:R;RZRlRmRdRpRkRaRjRiR�R�R�R�R�R�R�R^(((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyRF�s(													g						(t
__future__RRRtmercurial.i18nRt	mercurialRRR/RRWRRtobjectRtconverter_sourceRF(((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyt<module>s			�