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/git.pyo
�
}�^c@s�ddlZddlZddlmZmZmZddlmZmZddl	m
Z
ddlmZm
Z
mZmZmZdefd��YZdeefd	��YZdS(
i����N(tutiltconfigterror(thextnullid(t_(tNoRepotcommittconverter_sourcet	checktooltcommandlinet	submodulecBs#eZd�Zd�Zd�ZRS(cCs||_||_||_dS(N(tpathtnodeturl(tselfRR
R((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyt__init__s		cCsd|j|jfS(Ns%s = [git]%s(RR(R((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pythgsubscCsd|j|jfS(Ns%s %s(R
R(R((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyt
hgsubstates(t__name__t
__module__RRR(((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyRs		tconvert_gitcBs�eZd�Zd�Zd�Zd�Zd�Zd�Zdd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�Zd�Zd�ZRS(cOs|d|j||�S(Ns--git-dir=%s(R(Rtcmdtargstkwargs((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyt_gitcmd!scOs|j|j||�S(N(Rtrun0(RRR((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytgitrun0$scOs|j|j||�S(N(Rtrun(RRR((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytgitrun'scOs|j|j||�S(N(Rt	runlines0(RRR((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytgitrunlines0*scOs|j|j||�S(N(Rtrunlines(RRR((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytgitrunlines-scOs|j|j||�S(N(Rt_run3(RRR((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytgitpipe0scCs�tt|�j||d|�tj||d�tjj|d�rU|d7}ntjj|d�s�tt	d�|��nt
dd�||_g|_dS(Ntrevtgits/.gits/objectss&%s does not look like a Git repository(tsuperRRR
tosRtisdirtexistsRRR	t
submodules(RtuiRR$((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyR3s

	cCs�|js3|jddd�\}}|j�}n+|jdd|j�\}}|d g}|r|tjtd���n|S(Ns	rev-parses
--branchess	--remotess--verifyi����scannot retrieve git heads(R$Rt
splitlinesRtAbortR(Rtoutputtrettheadstrawhead((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytgetheadsAs	
cCsb|tt�krt�n|jd||�\}}|r^tjtd�||f��n|S(Nscat-filescannot read %r object at %s(RRtIOErrorRRR-R(RR$ttypetdataR/((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytcatfileLs	"cCs�|dkrCdjg|j�D]}|j�^q�}d}nh|dkr�djg|j�D]}|j�^qb�}d}n%|j|d�}|j||f}||fS(Ns.hgsubs
ts.hgsubstatetblob(tjoint
submoditerRRR6t	modecache(RtnameR$tmR5tmode((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytgetfileTs.	.	ccsJtt�}x7t|jdd��D]}|j|kr%|Vq%q%WdS(NtkeycSs|jS(N(R(tp((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyt<lambda>bs(RRtsortedR*R
(RtnullR=((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyR:`scCs�g|_tj�}|jd|jdd��x]|j�D]O}||}d|kr>d|kr>|jjt|dd|d��q>q>WdS(s�Parse the formatted .gitmodules file, example file format:
        [submodule "sub"]

        	path = sub

        	url = git://giturl

        s.gitmoduless	R7RRN(R*RtparsetreplacetsectionstappendR(Rtcontenttctsects((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytparsegitmodulesfs	
cCs�|jdd|df�\}}|rDtjtd�|��n|j|�xQ|jD]F}|jdd||jf�\}}|r�q[n|j�|_q[WdS(Ntshows%s:%ss.gitmoduless(cannot read submodules config file in %ss	rev-parse(	RRR-RRMR*RtstripR
(RtversiontmodulesR/R=R
((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytretrievegitmodulesus"

%c
Cs�i|_dddddg|g}|j|�\}}|r\tjtd�|��ng}t�}d}t}x%|jd�D]}	|s�|	j	d�s�q�n|	}q�n|	}
|
|kr�|j
|
�|j�}|d	}|d
dk}|d
dk}
|
d
kr+t}|jd�q�|d
dksK|ddkrTt}q�|r`dpo|
rldpod|j|
|f<|j|
|f�nd}q�W|r�|j
|�|jd�n|ifS(Ns	diff-trees-zs--roots-ms-rscannot read changes in %stt:iit100755t120000s.gitmoduless.hgsubR7t160000is:160000txtls.hgsubstate(s.hgsubR7(s.hgsubstateR7(R;RRR-RtsettNonetFalsetsplitt
startswithtaddtTrueRHRR(RRPRR.tstatustchangestseententryt	subexistsRYtfthRARL((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyt
getchanges�sD		

 	+

cCs2|j|d�}|jd�}||d}|j|�}|| j�}g}d}}x |dD]}	|	jdd�\}
}|
dkr�|j�}|d\}
}dj|d �}|dd	kr�|dd
!}n|j|�}n|
dkra|j�}|d\}
}dj|d �}|dd	krO|dd
!}n|j|�}n|
dkri|j|�qiqiW|r�||kr�|d
|7}n|dd!d|dd!|d}}}t|�t|�dt|�}|
dt	|�}t
d|d|d|d|d|�}|S(NRs

iit tauthori����it<i����t	committertparents
committer: %s
i����i����t1itparentstdatetdescR$(R6tfindtrecodeR,R[R]R9RHtinttstrR(RRPRJtendtmessageRYRoRjRltetntvRAttmttzttzsttzhttzmRp((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyt	getcommit�sB
*%	c	CsMi}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}|jd�r!||||d	 <q�|d|kr7q�q�||||<q�W|S(
Ns	ls-remotes--tagsscannot read tags from %ss
refs/tags/serror:sfatal:is^{}i����(R!RRR-RROR^RR]R[tlentendswith(	RttagstalltagsR.RatprefixtlineR
ttag((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytgettags�s*

c	
Cs�g}|dkr�|jdddd|�\}}|rUtjtd�|��nx�|D]>}d|krtq\n|d jd�\}}|j|�q\WnW|jdddd|d	||d
fd�\}}g|D]}|jd�^q�}|S(
Ns	diff-trees--roots-ms-rscannot read changes in %ss	i����s--name-onlys%s^%sis--s
(R[R!RR-RR]RHtrstrip(	RRPtiRbR.RaRYR=Rf((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytgetchangedfiles�s 
	 "cCs�i}d}t|�}iddgd6dgd6}x�|D]�}y�|j||�\}}xe|D]]}|j�}|jdd�\}	}
|
j|�s�qend||
|f}
|	||
<qeWWq<tk
r�q<Xq<W|S(	Nsrefs/heads/s	ls-remotes--heads originsremote/sshow-refR7is%s%s(R�R!ROR]R[R^t	Exception(Rt	bookmarksR�t	prefixlentgitcmdtreftypeR.RaR�R$R<((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pytgetbookmarks�s$



N(RRRRRRR!R#R[RR2R6R?R:RMRRRhR�R�R�R�(((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyRs$													'	#		(R't
subprocesst	mercurialRRRtmercurial.nodeRRtmercurial.i18nRtcommonRRRR	R
tobjectRR(((s7/usr/lib64/python2.7/site-packages/hgext/convert/git.pyt<module>s(

Anon7 - 2021