KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache
System : Linux cs317.bluehost.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : andertr9 ( 1047)
PHP Version : 8.2.18
Disable Function : NONE
Directory :  /lib64/python2.7/site-packages/hgext/convert/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib64/python2.7/site-packages/hgext/convert/hg.pyo
�
Hq�Qc@s�ddlZddlZddlZddlmZddlmZmZmZddl	m
Z
mZmZm
Z
mZddlmZmZmZmZdefd��YZdefd	��YZdS(
i����N(t_(tbinthextnullid(thgtutiltcontextt	bookmarksterror(tNoRepotcommittconverter_sourcetconverter_sinktmercurial_sinkcBs}eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�ZRS(
cCs�tj|||�|jddt�|_|jddt�|_|jddd�|_d|_
tjj
|�rttj|��dkryDtj|j|�|_|jj�s�ttd�|��nWq�tjk
r
}|j�t|jd��q�Xn�yq|jtd�|�tj|j|d	t�|_|jj�snttd�|��n|jj|�Wn4tjk
r�|j�ttd
�|��nXd|_d|_t|_ dS(Ntconvertshg.usebranchnamesshg.clonebranchess
hg.tagsbranchtdefaultis&%s is not a local Mercurial repositorys'initializing destination %s repository
tcreates)could not create hg repository %s as sink(!Rt__init__t
configbooltTruetbranchnamestFalset
clonebranchestconfigt
tagsbranchtNonet
lastbranchtostpathtisdirtlentlistdirRt
repositorytuitrepotlocalR	RRt	RepoErrort	tracebacktargststatustcreatedtappendtlocktwlocktfilemapmode(tselfR!Rterr((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyRs8	-


		cCs8|jjd�|jj�|_|jj�|_dS(Ns"run hg sink pre-conversion action
(R!tdebugR"R+R*(R-((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pytbefore<scCsF|jjd�|jr)|jj�n|jrB|jj�ndS(Ns#run hg sink post-conversion action
(R!R/R*treleaseR+(R-((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pytafterAs
		cCs|jjd�S(Ntshamap(R"tjoin(R-((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyt
revmapfileHscCs|jjd�S(Nt	authormap(R"R4(R-((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyt
authorfileKscCs/|jjj�}g|D]}t|�^qS(N(R"t	changelogtheadsR(R-thtx((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pytgetheadsNsc	Cs/|js
dS||jk}||_|s4d}ng|D]*}|d|dr\|dp_df^q;}|r|ddp�d}tjj|j|�}|r|j�ytj|j|�|_	Wn/t
k
r�tj|j|dt�|_	nX|j�ni}x[|D]S}y|j	j
|d�Wqt
k
rg|j|dg�j|d�qXqW|r+|j�x�t|j��D]�\}}tjj|j|�}	tj|ji|	�}
|jjtd�||f�|j	j|
g|D]}|
j
|�^q��q�W|j�ndS(NRiiRspulling from %s into %s
(RRRRR4R2RR R!R"t	ExceptionRR0tlookupt
setdefaultR)tsortedt	iteritemstpeertnoteRtpull(R-tbrancht	pbranchest	setbranchtbtpbrancht
branchpathtmissingsR9tpbranchpathtprepoR:((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyRGRs<			7

"


)
 3cCs�tj�}x�|j�D]s}|jdd�}t|�dkrIqn|j|j|d��}|sqqn|jd||df�qW|j�S(Nt iiis%s %s
(	t	cStringIOtStringIOt
splitlinestsplitRtgett	lookuprevtwritetgetvalue(R-tsourcetrevmaptdatatfptlinetstrevid((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyt_rewritetagsxscs�t��������fd�}g}x*|D]"}	|	|kr4|j|	�q4q4W|}t|�}
�jr�|
dkr��jjjt|d��d}|d}nt|�dkr�|jt�nt|�dkr�|jt�n|j	d�}
|j
}|jj�}�j
r>|jr>|j|d<n|jrW|j|d<nx�|r�|
}|j	d�}
tj�j||
f|�j�||j|j|�}�jj|�d}t�jjj��}
qZW�jr�|
dkr��jj}�jjjt|
��d}d|jk}|r�|j||j|��r��jjtd	���jjd
t�|Sn|
S(Ncst�|}�j||�\}}|dkrF�j��|�}ntj||d|kd|k�j|��S(Ns.hgtagstlR;(tgetfileR^Rt
memfilectxRS(R"tmemctxtftvRYtmode(tcopiestfilesRXR-RW(s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyt
getfilectx�s
iiiREtconvert_revisions(octopus merge fixup)
tclosesfiltering out empty revision
tforce( tdictR)RR,R"R8treadRRtpoptdesctextratcopyRREtrevRRbtkeystauthortdatet	commitctxRttiptmanifesttcmptrevisionR!R'RtrollbackR(R-RgRftparentsR
RWRXRhtpltptnparentstm1nodetparenttp2ttextRptp1tctxtmantmnodetclosed((RfRgRXR-RWs6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyt	putcommit�sN
#
			!#c	s�y |j|j}|j�}Wn tjk
rBd}t}nXy#t|dj�j	t
��}Wntk
rg}nXtg|D]}d|||f^q��}||kr�d
Sdj|���fd�}|j
jtd��dttjtj���}i|jd6}	tj|j|dfddg|d	||	�}
|jj|
�t|jjj��t|�fS(Ns.hgtagss%s %s
tcstj|�ttd�S(N(RRaRR(R"RbRc(RY(s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyRh�ssupdating tags
s%s 0REsupdate tagssconvert-repo(NN(R"RtnodeRR$RRR@RYRQRR=R4R!R'RtintttimetmktimetgmtimeRRbRvRR8Rw(R-ttagst	parentctxt	tagparenttoldlinesttagtnewlinesRhRuRpR�((RYs6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pytputtags�s.
#

-	cCs
||_dS(N(R,(R-tactive((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pytsetfilemapmode�scCset|�sdS|jjtd��|jj}x"|D]}t||�||<q9W|j�dS(Nsupdating bookmarks
(RR!R'RR"t
_bookmarksRRU(R-tupdatedbookmarkt	destmarkstbookmark((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pytputbookmarks�s
cCsA||jkr4|jr4tjtd�|��n||jkS(Nserevision %s not found in destination repository (lookups with clonebranches=true are not implemented)(R"RRtAbortR(R-Rr((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyt	hascommit�s
(t__name__t
__module__RR0R2R5R7R<RGR^R�R�R�R�R�(((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyR
s							&		5			
tmercurial_sourcecBs�eZdd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�Zd�ZRS(cCs�tj||||�|jddt�|_t�|_|jddt�|_y7tj	|j
|�|_|jj�s�t
j�nWn4t
jk
r�|j�ttd�|��nXd|_d|_d|_d|_|jdd�}|dk	r�y|jj|�}Wn-t
jk
rGtjtd�|��nX|jjj|�}id|6}x9|jjj|g�D]}d||jjj|�<q�W|j|_ ntj!|_ dS(NRshg.ignoreerrorss
hg.saverevs&%s is not a local Mercurial repositoryshg.startrevs %s is not a valid start revisioni("RRRRtignoreerrorstsettignoredtsaverevRR R!R"R#RR$R%R	RRtlastrevtlastctxt
_changescachet	convertfpRR>RR�R8RrtdescendantsR�t__contains__tkeeptalways(R-R!RRrt	startnodetstartrevtchildren((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyR�s8
				
cCs2|j|kr+|j||_||_n|jS(N(R�R"R�(R-Rr((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyt	changectx
scCs8g|j�D]'}|r
|j|j��r
|^q
S(N(R|R�R�(R-R�R~((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyR|scCs`|jr%|j|jj�g}n|jj�}g|D]!}|j|�r;t|�^q;S(N(RrR"R�R9R�R(R-R9R:((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyR<s	cCsVy-|j|�|}|j�|j�fSWn"tjk
rQ}t|��nXdS(N(R�RYtflagsRtLookupErrortIOError(R-tnameRrtfctxR.((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyR`s
cCsA|j|�}|j|�}|s{t|j��}|j|||�g|D]!}||jkrP||f^qPifS|jr�|jd|kr�|jd\}}}n2|jj|dj	�|j	��d \}}}|j||||�}	g|||D]!}
|
|jkr
|
|f^q
}t|�|	fS(Niii(
R�R|R@Rxt	getcopiesR�R�R"R'R�(R-RrR�R|RgRctmtatrRfR�tchanges((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyt
getchanges$s22!cCsi}x|D]}||jkr(q
ny�|j|�j�\}}||jkse|j|�rkw
nt}x$|D]}	||	krxt}PqxqxW|s�w
n|||<Wq
tk
r�q
tjk
r}
|j	s��n|jj
|�|jjt
d�|
�q
Xq
W|S(Ns
ignoring: %s
(R�tfilectxtrenamedR�RRt	TypeErrorRR�R�taddR!twarnR(R-R�R|RgRfR�t
copysourcetcopynodetfoundR~te((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyR�9s0


	"cCs�|j|�}g|j|�D]}|j�^q}|jrI|}nd}td|j�dtj|j	�d�d|j
�d|d|d|j�d|j�d	|j
��S(
NRtRus%Y-%m-%d %H:%M:%S %1%2RoRrR|RERptsortkey(R�R|RR�RR
tuserRtdatestrRutdescriptionRERpRr(R-RrR�R~R|tcrev((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyt	getcommitTs(		cCspg|jj�D]}|ddkr|^q}tg|D]-\}}|j|�r<|t|�f^q<�S(NiRw(R"ttagslistRlR�R(R-ttR�R�R�((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pytgettagsas2cCs�|j|�}|j|�}|rU|dkrUd}g|j�j�gf}n5|p^d}|jj||j�|j��d }g|D].}g|D]}||jkr�|^q�^q�}|dkr�||f|_	n|d|d|dS(Niiii(
R�R|RRxRsR"R'R�R�R�(R-RrtiR�R|R�R_Rc((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pytgetchangedfilesfs);cCs[|jdkr0t|jjd�d�|_n|jjd||f�|jj�dS(NR3R�s%s %s
(R�RtopenR"R4RUtflush(R-Rrtdestrev((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyt	convertedvs!cCs|jjd�dS(Ns$run hg source pre-conversion action
(R!R/(R-((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyR0|scCs|jjd�dS(Ns%run hg source post-conversion action
(R!R/(R-((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyR2scCstS(N(R(R-((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pythasnativeorder�scCstS(N(R(R-((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pythasnativeclose�scCs6yt|jj|��SWntjk
r1dSXdS(N(RR"R>RR$R(R-Rr((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyRT�scCstj|j�S(N(Rt
listbookmarksR"(R-((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pytgetbookmarks�sN(R�R�RRR�R|R<R`R�R�R�R�R�R�R0R2R�R�RTR�(((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyR��s""							
								(RR�ROtmercurial.i18nRtmercurial.nodeRRRt	mercurialRRRRRtcommonR	R
RRR
R�(((s6/usr/lib64/python2.7/site-packages/hgext/convert/hg.pyt<module>s$("�

Anon7 - 2021