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: //proc/self/root/usr/lib64/python2.7/site-packages/hgext/convert/git.pyc
�
1�3\c@@s�ddlmZddlZddlmZddlmZmZmZ	ddl
mZdefd��YZ
d	d
ddd
dhZdejejfd��YZdS(i(tabsolute_importN(t_(tconfigterrortnodei(tcommont	submodulecB@s#eZd�Zd�Zd�ZRS(cC@s||_||_||_dS(N(tpathRturl(tselfRRR((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyt__init__s		cC@sd|j|jfS(Ns%s = [git]%s(RR(R	((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pythgsubscC@sd|j|jfS(Ns%s %s(RR(R	((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyt
hgsubstates(t__name__t
__module__R
RR(((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyRs		ttreetparenttauthort	committertbranchtclosetconvert_gitcB@s�eZd�Zd�Zd�Zd�Zd�Zd�Zdd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�ZRS(cO@s|d|j||�S(Ns--git-dir=%s(R(R	tcmdtargstkwargs((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyt_gitcmd3scO@s|j|j||�S(N(Rtrun0(R	RR((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytgitrun06scO@s|j|j||�S(N(Rtrun(R	RR((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytgitrun9scO@s|j|j||�S(N(Rt	runlines0(R	RR((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytgitrunlines0<scO@s|j|j||�S(N(Rtrunlines(R	RR((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytgitrunlines?scO@s|j|j||�S(N(Rt_run3(R	RR((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytgitpipeBscC@sdtt|�j|||d|�tjj||d�tjj|�}tjj|d�rm|d7}ntjj	|d�s�tj
td�|��n|jdd�}|dks�|d	kr�t
jtd
���n|dkrQd|g|_|jdd�}|r(|jjd
�n|jdd�}|jjd|�n	g|_tjdd�||_g|_|jdd�|_|jjdd�|_t|j�t@}|r�t
jtd�td�jt|����n|jjdd�}	d}
d}x�|	D]�}|jd �r|}
d}d|krc|jdd�\}
}n|
dkr~|pxd}
q�|
dkr�|p�d}q�qqW|
r�|r�t
jtd���nd|	k}d|	k}|r|rt
jtd���n|r$|r$t
jtd���n|
r;|r;d}
ni|d6|d6|
d6|d6|_ dS(!Ntrevstgits/.gits/objectss&%s does not look like a Git repositorytconvertsgit.similarityiids$similarity must be between 0 and 100s-C%d%%sgit.findcopiesharders--find-copies-hardersgit.renamelimits-l%dscat-files--batchs
git.extrakeyss%copying of extra key is forbidden: %ss, sgit.committeractionstmessagedifferentt
messagealwayst=is
committer:sFcommitteractions cannot define both messagedifferent and messagealwayst
dropcommittert
replaceauthorsCcommitteractions cannot define both dropcommitter and replaceauthorsCcommitteractions cannot define both dropcommitter and messagealways(R'R((!tsuperRR
RtcommandlinetosRtabspathtisdirtexiststNoRepoRt	configintRtAborttsimoptt
configbooltappendt	checktoolt
submodulesR#tcatfilepipetuit
configlistt
copyextrakeystsettbannedextrakeystjointsortedtNonet
startswithtsplittcommitteractions(R	R;trepotypeRR$t
similaritytfindcopieshardertrenamelimittbannedRER'R(tatktvR*R+((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyR
Esp"

			"
	cC@s"x|jD]}|j�q
WdS(N(R:R(R	tf((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytafter�scC@s�|jsQ|jddd�\}}|j�}|r�tjtd���q�nhg}x_|jD]T}|jdd|�\}}|j|d �|ratjtd�|��qaqaW|S(Ns	rev-parses
--branchess	--remotesscannot retrieve git headss--verifyi����scannot retrieve git head "%s"(R$Rt
splitlinesRR4RR7(R	toutputtstatustheadstrevtrawheadtret((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytgetheads�s	 cC@s�|tjkrt�n|jdj|d�|jdj�|jdj�j�}|d|kr�tj	t
d�||f��nt|d�}|jdj|�}t
|�|kr�tj	t
d�||f��n|jdjd�|S(Nis
iscannot read %r object at %sis,cannot read %r object at %s: unexpected size(tnodemodtnullhextIOErrorR:twritetflushtreadlineRDRR4Rtinttreadtlen(R	RTtftypetinfotsizetdata((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytcatfile�s	"cC@s�|tjkrdS|dkrVdjg|j�D]}|j�^q2�}d}nh|dkr�djg|j�D]}|j�^qu�}d}n%|j|d�}|j||f}||fS(Ns.hgsubs
ts.hgsubstatetblob(NN(	RXRYRBR@t
submoditerRRRet	modecache(R	tnameRTtmRdtmode((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytgetfile�s.	.	cc@sGtj}x7t|jdd��D]}|j|kr"|Vq"q"WdS(NtkeycS@s|jS(N(R(tp((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyt<lambda>�Rf(RXRYRAR9R(R	tnullRk((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyRh�s	cC@s�g|_tj�}|jddjd�|jd�D���x]|j�D]O}||}d|krNd|krN|jjt|dd|d��qNqNWdS(s�Parse the formatted .gitmodules file, example file format:
        [submodule "sub"]

        	path = sub

        	url = git://giturl

        s.gitmoduless
cs@s|]}|j�VqdS(N(tstrip(t.0tline((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pys	<genexpr>�sRRRfN(R9RtparseR@RDtsectionsR7R(R	tcontenttctsects((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytparsegitmodules�s	
cC@s�|jdd|df�\}}|rF|jjtd�|�dSy|j|�Wn/tjk
r�|jjtd�|�dSXxQ|jD]F}|jdd||jf�\}}|r�q�n|j	�|_
q�WdS(Ntshows%s:%ss.gitmoduless2warning: cannot read submodules config file in %s
s+warning: unable to parse .gitmodules in %s
s	rev-parse(RR;twarnRR{Rt
ParseErrorR9RRrR(R	tversiontmodulesRVRkR((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytretrievegitmodules�s "%c@s�|rtjtd���ni�_dddddg�j|g}�j|�\}}|r�tjtd�|��ng�i}t��d}tg�tg�|j	d�}t
|�}	d	}
�jjd
d��������fd�}x,|
|	kr0||
}|
d
7}
|sR|j
d�s@qn|j	�}qn|}
|dd	dkr�|
}||
}|
d
7}
|}
|||<n|
�kr�|||
t�n|dd	dkr'||
}|
d
7}
|�kr'|||t�|
dkr$|dkr$|
||<q$q'nd}qW�d	r{�d	r^�jdtjf�q{�j|��jd�n�|t�fS(Ns(convert from git does not support --fulls	diff-trees-zs--roots-ms-rscannot read changes in %ssiR&sgit.skipsubmodulesc@sE�j|�|d}|ddk}|ddk}|oO|dddk}|dkr��rhdSt�d<|dd	ks�|r�t�d<�jd
tjf�qA�jd�n�|ddks�|dd
kr��sAt�d<qAnP|rtj}n|rdp|rdpd�j||f<�j||f�dS(Niit100755t120000iitRs.gitmodulestDs.hgsubRft160000s:160000txtl(s.hgsubRf(taddtTrueR7RXRYRi(tentryRNtisdestthRoRztrenamesource(tchangestseenR	tskipsubmodulest
subdeletedt	subexists(s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyR�	s(



 +it:itCR�s.gitmoduless.hgsubstateRf(s.hgsubstateRf(RR4RRiR5RR>RBtFalseRDR`R;R6RCR�R7RXRYR�(R	RtfullRRQRRtcopiesR�tdifftreetlcounttiR�R�RNtcopysrctcopydesttfdest((R�R�R	R�R�R�s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyt
getchanges�sb	#			










cC@s�|j|d�}|jd�}||d}|j|�}|| j�}g}d}}i}	x<|dD]0}
|
jdd�\}}|dkr�|j�}
|
d\}}dj|
d �}|dd	kr�|dd
!}n|j|�}n|dkrg|j�}
|
d\}}dj|
d �}|dd	krU|dd
!}n|j|�}n|dkr�|j|�n||jkro||	|<qoqoW|j	d
r�d}n|j	dr�|}n|r8|j	d}|j	d}|r|d||f7}q8|r8||kr8|d||f7}q8n|dd!d|dd!|d}}}t
|�t
|�dt
|�}|dd|}|jjdd�}t
jd|d|d|d|d|d|	d|�}|S(Ntcommits

iit Ri����it<i����RRR*R+R(R's
%s %s
i����i����t1is%dR&sgit.saverevtparentstdatetdescRTtextratsaverev(RetfindtrecodeRPRBRDR@R7R=RER^R;R6RR�(R	RRxtendtmessageR�R�RRR�tetnRMRottmttzR(R'ttzsttzhttzmR�R�((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyt	getcommitJsb

	
	

*%	cC@sG|jdd�\}}|r=tjtd�|j��nt|�S(Nsrev-lists--alls'cannot retrieve number of commits in %s(R!RR4RRR`(R	RQRV((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyt
numcommits�s
c	C@sMi}i}|jdd|j�\}}|rOtjtd�|j��nd}x�|D]�}|j�}|jd�s�|jd�r�tjtd�|j��n|jdd�\}}|j|�s�q\n|||t	|�<q\WxV|D]N}|j
d�r!||||d	 <q�|d|kr7q�q�||||<q�W|S(
Ns	ls-remotes--tagsscannot read tags from %ss
refs/tags/serror:sfatal:is^{}i����(R!RRR4RRrRCRDRBR`tendswith(	R	ttagstalltagsRQRRtprefixRtRttag((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytgettags�s*

c	
C@sg}|dkr�|jdddd|�\}}|rUtjtd�|��nx�|D]>}d|krtq\n|d jd�\}}|j|�q\Wny|jdddd|d	||d
fd�\}}|r�tjtd�|��ng|D]}|jd�^q�}|S(
Ns	diff-trees--roots-ms-rscannot read changes in %ss	i����s--name-onlys%s^%dis--s
(RBR!RR4RRDR7trstrip(	R	RR�R�RQRRR�RkRN((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytgetchangedfiles�s$
	 "cC@s�i}|jjdd�}d|dfdg}dh}y�|jd�\}}x�|D]�}|j�}|jdd	�\}}	xZ|D]R\}
}|	j|
�s�|	|kr�q�nd
||	t|
�f}	|||	<q�WqYWWntk
r�nX|S(NR&sgit.remoteprefixsrefs/remotes/origin/t/srefs/heads/Rfsrefs/remotes/origin/HEADsshow-refis%s%s(srefs/heads/Rf(	R;RR!RrRDRBRCR`t	Exception(R	t	bookmarkstremoteprefixtreftypestexcludeRQRRRtRTRjt	gitprefixthgprefix((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytgetbookmarks�s$
		

t	splicemapcC@s|j||�dS(s& git revision string is a 40 byte hex N(tcheckhexformat(R	trevstrtmapname((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytcheckrevformat�sN(R
RRRRRR!R#RBR
RORWReRmRhR{R�R�R�R�R�R�R�R�(((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyR.s*						S								T	7				(t
__future__RR.tmercurial.i18nRt	mercurialRRRRXRfRtobjectRR?tconverter_sourceR-R(((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyt<module>s