-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/hgext/convert/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/hgext/convert/git.pyc

ó
ląĮ\c@sÆddlZddlZddlmZmZddlmZmZddlm	Z	ddl
mZmZm
Z
mZmZdefd„ƒYZde
efd	„ƒYZdS(
i’’’’N(tutiltconfig(thextnullid(t_(tNoRepotcommittconverter_sourcet	checktooltcommandlinet	submodulecBs#eZd„Zd„Zd„ZRS(cCs||_||_||_dS(N(tpathtnodeturl(tselfRRR
((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pyt__init__s		cCsd|j|jfS(Ns%s = [git]%s(RR
(R((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pythgsubscCsd|j|jfS(Ns%s %s(RR(R((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pyt
hgsubstates(t__name__t
__module__RRR(((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pyR
s		tconvert_gitcBsĖeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zdd„Z
d„Zd	„Zd
„Z
d„Zd„Zd
„Zd„Zd„Zd„Zd„Zd„Zd„Zdd„ZRS(cOs|d|j||ŽS(Ns--git-dir=%s(R(Rtcmdtargstkwargs((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pyt_gitcmd!scOs|j|j||ŽS(N(Rtrun0(RRR((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pytgitrun0$scOs|j|j||ŽS(N(Rtrun(RRR((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pytgitrun'scOs|j|j||ŽS(N(Rt	runlines0(RRR((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pytgitrunlines0*scOs|j|j||ŽS(N(Rtrunlines(RRR((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pytgitrunlines-scOs|j|j||ŽS(N(Rt_run3(RRR((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pytgitpipe0scCs+|j|ƒ}|jƒ}||jƒfS(N(tgitopentreadtclose(Rtstfhtdata((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pytgitread3scCsŌtt|ƒj||d|ƒtj||dƒtjj|ƒ}tjj|dƒrg|d7}ntjj|dƒs–t	t
dƒ|ƒ‚ntddddƒ||_g|_|j
dd	ƒ|_dS(
Ntrevtgits/.gits/objectss&%s does not look like a Git repositorytdebnamesgit-corescat-files--batch(tsuperRRR	tosRtabspathtisdirtexistsRRRt
submodulesR"tcatfilepipe(RtuiRR*((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pyR8s
		cCs"x|jD]}|jƒq
WdS(N(R3R%(Rtf((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pytafterLscCs€|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(Rtoutputtstatustheadstrawhead((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pytgetheadsPs	
cCs|ttƒkrt‚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(RRtIOErrorR3twritetflushtreadlinetsplitRR8RtintR$tlen(RR*ttypetinfotsizeR(((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pytcatfile[s	"cCsŠ|ttƒkrt‚n|dkr^djg|jƒD]}|jƒ^q:ƒ}d}nh|dkr”djg|jƒD]}|jƒ^q}ƒ}d}n%|j|dƒ}|j||f}||fS(Ns.hgsubs
ts.hgsubstatetblob(	RRR>tjoint
submoditerRRRHt	modecache(RtnameR*tmR(tmode((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pytgetfilels	.	.	ccsJttƒ}x7t|jdd„ƒD]}|j|kr%|Vq%q%WdS(NtkeycSs|jS(N(R(tp((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pyt<lambda>|s(RRtsortedR2R(RtnullRO((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pyRLzs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	RIR
RN(R2RtparsetreplacetsectionstappendR
(RtcontenttctsecR&((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pytparsegitmodules€s	
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(	RRR8RR^R2RtstripR(RtversiontmodulestretROR((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pytretrievegitmoduless"

%cCs"i|_ddddd|g}|j|Œ\}}|rXtjtdƒ|ƒ‚ng}tƒ}d}t}t}	xW|jdƒD]F}
|s¶|
j	dƒsŖq‰n|
}q‰n|
}||krÉ|j
|ƒ|jƒ}|d	}|d
dk}
|d
dk}|d
kr_t}|ddkrOt}	|jdt
tƒfƒqĘ|jdƒqÉ|d
dks|ddkrˆt}qÉ|
r”dp£|r dp£d|j||f<|j||fƒnd}q‰W|r|	rū|jdt
tƒfƒq|j|ƒ|jdƒn|ifS(Ns	diff-trees-zs--roots-ms-rscannot read changes in %stt:iit100755t120000s.gitmodulesitDs.hgsubRIt160000is:160000txtls.hgsubstate(s.hgsubRI(s.hgsubstateRI(RMRRR8RtsettNonetFalseRBt
startswithtaddtTrueRZRRRd(RRaRR9R:tchangestseententryt	subexistst
subdeletedRlR5thRSR&((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pyt
getchanges›sP		

 	+

cCs2|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*(RHtfindtrecodeR7RnRBRKRZRCtstrR(RRaR\tendtmessageRlR€R{R}tetntvRSttmttzttzsttzhttzmR((s5/usr/lib/python2.7/dist-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}|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 RRR8RR`RpRBRnRDtendswith(	RttagstalltagsR9R:tprefixtlineRttag((s5/usr/lib/python2.7/dist-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
(RnR RR8RRBRZtrstrip(	RRatiRsR9R:RlROR5((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pytgetchangedfiless 
	 "cCsęi}d}t|ƒ}idddgd6dgd6}x§|D]Ÿ}y…|j||Œ\}}xe|D]]}|jƒ}|jddƒ\}	}
|
j|ƒs§qhnd	||
|f}
|	||
<qhWWq?tk
rŻq?Xq?W|S(
Nsrefs/heads/s	ls-remotes--headstoriginsremote/sshow-refRIis%s%s(RDR R`RBRnRpt	Exception(Rt	bookmarksR”t	prefixlentgitcmdtreftypeR9R:R•R*RN((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pytgetbookmarks s$



t	splicemapcCs|j||ƒdS(s& git revision string is a 40 byte hex N(tcheckhexformat(Rtrevstrtmapname((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pytcheckrevformat;sN(RRRRRRR R"R)RnRR6R=RHRQRLR^RdRyRR—RšR”R¦(((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pyRs*															/	#			(R.t
subprocesst	mercurialRRtmercurial.nodeRRtmercurial.i18nRtcommonRRRRR	tobjectR
R(((s5/usr/lib/python2.7/dist-packages/hgext/convert/git.pyt<module>s(

Copyright © 2017 || Recoded By Mr.Bumblebee