-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/mercurial/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/mercurial/subrepo.pyc


O\c@s8ddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlmZddl
Z
ddlZddlZddlZddlZddlZddlZddlZddlZeaejZdddfZdZdZdZdejfd	YZd
Z dZ!dZ"d
Z#dZ$dZ%dZ&e'e(dZ)dZ*dZ+dZ,dZ-dZ.de/fdYZ0de0fdYZ1de0fdYZ2de0fdYZ3ie1d6e2d 6e3d!6Z4dS("iN(t_ttemptycCsUtjtj|}tj|}|jsQtjtjj|j}n|S(sU
    get a path or url and if it is a path expand it and return an absolute path
    (	tutilturllocalpatht
expandpathturltschemetnormpathtostpathtabspath(R
texpandedpathtu((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_expandedabspaths
	!cCs tjt|jdd!S(sEget a unique filename for the store hash cache of a remote repositoryii(Rtsha1Rt	hexdigest(t
remotepath((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_getstorehashcachenamescCs[d}tjj|rHt|d}z|j}Wd|jXntj|jS(NRtrb(	R	R
texiststopentreadtcloseRRR(tfilenametdatatfd((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
_calcfilehash"stSubrepoAbortcBseZdZdZRS(sEException class used to avoid handling a subrepo error more than oncecOs>tjj||||jd|_|jd|_dS(Ntsubrepotcause(terrortAbortt__init__tgetRR(tselftargstkw((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR!.s(t__name__t
__module__t__doc__R!(((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR,scsfd}|S(Ncsy|||}Wntk
r1}|ngtjk
r}t|}t|dtd|}t|d|jd|dtjnX|S(Nt s(in subrepo %s)thintRR(	RRR t
subrelpathtstrRR*tsystexc_info(R#R$tkargstrestexRterrormsg(tfunc(s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytdecoratedmethod4s	((R3R4((R3s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytannotatesubrepoerror3s
cstjddfddkrCdnx?jdD].\}}jd||jd|qSWi}dkrhyxtdjjD]{\}}|j}|sqny|j	dd\}}Wn.t
k
r'tjt
d|dnX|||<qWWqhtk
rd}|jtjkreqeqhXnfd}	i}
xsd	jD]a\}}d
}|jdrd|krtjt
d
n|j	dd\}}|d}|j}ntj|jstjdt}|rtj|}tj|jpUd	||_tj|j|_t|}
|	|
}||
kr|	|}q|}qn|	|}|j|j|d	|f|
tj|<qW|
S(sreturn a state dict, mapping subrepo paths configured in .hgsub
    to tuple: (source from .hgsub, revision from .hgsubstate, kind
    (key in types dict))
    cs|kry|j}WnCtk
re}|jtjkrJnjtd|dSXj||||ntjtd|dS(Ns(warning: subrepo spec file %s not found
ssubrepo spec file %s not found(	RtIOErrorterrnotENOENTtwarnRtparseRR (tftsectionstremapRterr(tctxtpRtui(s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRIss.hgsubtsubpathss.hgsubstateR)is?invalid subrepository revision specifier in .hgsubstate line %dcsxjdD]\}}|jd}tjdd|}ytj|||d}Wqtjk
r}tjtdjd||fqXqW|S(NRBs
string-escapes\\\\([0-9]+)s\\\1is#bad subrepository pattern in %s: %s(	titemstencodetretsubRRR Rtsource(tsrctpatterntreplte(R@(s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR=os$Rthgt[t]smissing ] in subrepo sourcetabortN( tconfigtNonetconfigitemstsettconfigsourcet	enumerateRt
splitlinestlstriptsplitt
ValueErrorRR RR6R7R8RCt
startswithRtisabst
_abssourcet_repotFalset	posixpathtjoinR
RR,tstripR"tpconvert(R?RAR
RHtrevtitltrevisionR>R=tstatetkindtparenttjoinedtremapped((R?R@RRAs5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRgCs\
&)


2cCsQgt|D]}d||d|f^q
}|jddj|ddS(s=rewrite .hgsubstate in (outer) repo with these subrepo statess%s %s
is.hgsubstateRN(tsortedtwwriteR`(trepoRgtstlines((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
writestates1cs||kr|j}n|j}|j}|j}i}jjd|||fdfd}	xZt|jD]F\}
}|j|
t}|}
|j|
j	r|d|ddf}
n||kr|
}n|
|kr*||
}|
|ks||kr%|||
<q~q|
|krg|	|
d||j|
j|||||
<q|
d|dkrjj
td|
|d|dfdr'|	|
d	||j|
j|||||
<q'q|
d|dkr.|	|
d
||j|
j|||||
<q|	|
d|j|
}jj
td|
|j|d|j|dfd}|dkr|j|
j
||||
<|	|
d
|q|dkr|||
<|	|
d|q|j|
j|||||
<|	|
d|q~|
|krY|	|
d|j|
jq~|tkr|	|
d|||
<q~q~jj
td|
dr~|	|
d|j|
jq~q~Wxt|jD]\}
}|
|krqq|
|kr8|	|
d||j|
j||||
<q|||
krjj
td|
ddkr|	|
d||j|
j||||
<qqqWt||S(s{delegated from merge.applyupdates: merging of .hgsubstate file
    in working context, merging context and ancestor contextssubrepo merge %s %s %s
Rcs4|rd|}njjd|||fdS(Ns%s:%s:%ss  subrepo %s: %s %s
(RAtdebug(Rotmsgtr(Rn(s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRrs
iit+sother changed, getsi subrepository sources for %s differ
use (l)ocal source (%s) or (r)emote source (%s)?$$ &Local $$ &Remotesprompt changed, getsother side changed, getsboth sides changeds subrepository %s diverged (local revision: %s, remote revision: %s)
(M)erge, keep (l)ocal or keep (r)emote?$$ &Merge $$ &Local $$ &Remotes
merge withskeep local subrepo revisionsget remote subrepo revisionsremote removed, removeslocal added, keepsm local changed subrepository %s which remote removed
use (c)hanged version or (d)elete?$$ &Changed $$ &Deletes
prompt removesremote added, getsm remote changed subrepository %s which local removed
use (c)hanged version or (d)elete?$$ &Changed $$ &Deletesprompt recreate(tp1tsubstateRARrRlt	iteritemsR"t	nullstateRFtdirtytpromptchoiceRtshortidtmergetremoveRCRq(Rntwctxtmctxtactxt	overwritets1ts2tsatsmRrRoRetatldRttsrepotoption((Rns5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytsubmerges				


		

		0





		


		
cCsW|r(tdt|||f}ntdt|||f}|j|dS(Nsj subrepository sources for %s differ
use (l)ocal source (%s) or (r)emote source (%s)?
$$ &Local $$ &Remotes subrepository sources for %s differ (in checked out version)
use (l)ocal source (%s) or (r)emote source (%s)?
$$ &Local $$ &Remotei(RR+R{(RARFRztlocaltremoteRs((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
_updateprompts		cCsE|}xtj|dr'|j}q	W|jttj|jS(s9return path to this (sub)repo as seen from outermost repot
_subparent(RtsafehasattrRtroottlentpathutiltnormasprefix(RnRi((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytreporelpaths
cCs?tj|dr|jStj|ds2|jSt|jS(s7return path to this subrepo as seen from outermost repot_relpathR](RRRt_pathRR](RF((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR+s
cCs~tj|drtj|j}|jr:t|Stj|j|_t	|j
|dt}|r\tjtj|}tj
|jpd|j|_tj|j|_t|Sntj|dr|jS|r|jjddr|jjddS|jjddr7|jjddS|j|jkr\tjj|jS|rztjtdnd	S(
sreturn pull/push path of repo - either based on parent repo .hgsub info
    or on the top repo config. Abort or return None if no source found.RRORt_subtoppathtpathssdefault-pushtdefaults(default path for subrepository not foundN(RRRt
_subsourceR[R,R_RR
R\RR^RbR`RRARPt
sharedpathR	tdirnameR R(RntpushRORGRi((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR\$s*
!
c	Csxtj|D]\}}}x7t|D])\}}|j|kr,||=Pq,q,Wtjj|jdkr}qnxV|D]N}|jdkr|jtd|tjtjj	||qqWqWdS(Ns.hgthgrcs5warning: removing potentially hostile 'hgrc' in '%s'
(
R	twalkRUtlowerR
tbasenameR9RtunlinkR`(	RAR
tignoreRtdirstnamesRdtdR;((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt	_sanitize?s
cCs|jds0d|ks0tj||krLtjtd|ntj|j||j	j
|rtjtd|ndS(Nt~t$s+subrepo path contains illegal component: %ss$subrepo '%s' traverses symbolic link(RZRRRR RRtpathauditorRtwvfstislink(RnR
((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_auditsubrepopathMs0
cCsr||jdddgkrFtjtd|dtdn|tkrntjtd|ndS(NtsubrepostallowedRLssubrepo type %s not allowedR*s)see 'hg help config.subrepos' for detailssunknown subrepo type %s(t
configlistRR Rttypes(RARh((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
_checktypeWs
cCseddl}|a|j}t|||j|}t|j|dt|d|||d S(s>return instance of the right subrepo class for subrepo in pathiNi(RLR]RRwRRAR(R?R
thRnRg((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR^s	

c
CsVtj|}t|dd}|s+|S|jddd}|dkrhtjtd|n|dkrx|Stj}d}xUt	|D]G}|j
|}|j||d}	||	kr|	}|}qqW||krR|dkr*tjtd	tj|tj||fn|j
td
tj||f|S|S(NRwtphasest
checksubrepostfollowRROs.invalid phases.checksubrepos configuration: %sis=can't commit in %s phase conflicting %s from subrepository %ssAwarning: changes are committed in %s phase from subrepository %s
(signoreRsabort(RtnewcommitphasetgetattrRQRPRR RtpublicRlRFtphaset
phasenamesR9(
RAR?tcommitphaseRwtchecktmaxphasetmaxsubRoRFtsubphase((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRns6
	

tabstractsubrepocBseZdZedZdZdZdZdZdZ	edZ
dZd	Zd
Z
dZdZd
ZdZdZdZdZdZddZdZdZdZdZRS(cCstS(s
        returns true if the repository has not changed since it was last
        cloned from or pushed to a given repository.
        (R^(R#R
((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
storecleanscCs
tdS(sreturns true if the dirstate of the subrepo is dirty or does not
        match current stored state. If ignoreupdate is true, only check
        whether the subrepo has uncommitted changes in its dirstate.
        N(tNotImplementedError(R#tignoreupdate((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRzscCs
tdS(spcurrent working directory base state, disregarding .hgsubstate
        state and working directory modificationsN(R(R#((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt	basestatescCstS(s7check if path is a subrepository within this repository(R^(R#R
((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytchecknestedscCs
tdS(scommit the current changes to the subrepo with the given
        log message. Use given user and date if possible. Return the
        new state of the subrepo.
        N(R(R#ttexttusertdate((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytcommitscCstjS(s?returns phase of specified state in the subrepository.
        (RR(R#Rg((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRscCs
tdS(sTremove the subrepo

        (should verify the dirstate is not dirty first)
        N(R(R#((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR~scCs
tdS(sTrun whatever commands are needed to put the subrepo into
        this state
        N(R(R#RgR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR"scCs
tdS(s/merge currently-saved state with the new state.N(R(R#Rg((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR}scCs
tdS(shperform whatever action is analogous to 'hg push'

        This may be a no-op on some systems.
        N(R(R#topts((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRscCsgS(N((R#RAtmatchtdryruntlistsubrepostprefixtexplicitonly((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytaddscKsdS(Ni((R#RARRR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytcatscKsgggggggfS(N((R#trev2R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytstatusscKsdS(N((R#RAtdiffoptstnode2RRR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytdiffscCsdS(Ni((R#RAtdestR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytoutgoingscCsdS(Ni((R#RARGR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytincomingscCs
tdS(sreturn filename iteratorN(R(R#((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytfilesscCs
tdS(sreturn file dataN(R(R#tname((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytfiledatascCsdS(sreturn file flagsR((R#R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt	fileflagsscCs\|dk	r:g|jD]}||r|^q}n|j}t|}t|}|jtd|ddtdd|xt|D]\}	}
|j|
}d|krdpd}d	|k}
|jt	j
j||j|
||
|j
|
|jtd||	d
dtdd|qW|jtd|d|S(Nsarchiving (%s)itunitRttotaltxiiRei(RQRRR+tprogressRRURtaddfileR	R
R`RR(R#RAtarchiverRRR;RRtrelpathRdRtflagstmodetsymlink((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytarchives".cCsdS(sv
        walk recursively through the directory tree, finding all files
        matched by the match function
        N((R#R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRscCs
ggfS(N((R#RARR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytforgetscOs#|jd|d|dfgS(Ns)%s: reverting %s subrepos is unsupported
ii(R9(R#RARwtpatsR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytreverts	cCs|S(N((R#trevid((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR|
sN(R&R'RR^RzRRRRR~R"R}RRRRRRRRRRRQRRRRR|(((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs0																				t	hgsubrepocBseZdZdZdZdZdZdZdZe	dZ
e	dZe	d	Ze	d
Z
e	dZe	d!dZe	ed
ZdZdZe	dZe	dZe	dZdZe	edZe	dZe	dZe	dZe	dZe	dZdZdZ dZ!e	dZ"e	dZ#dZ$d Z%RS("c
Cs||_||_|j}|j|}t}tjjtj	||krmt
jtd|ntjj
tjj|dst}tj|ntj|j|d||_|jj|krt
jd||jjfnxQdgD]F\}}|jj||}	|	r|jjj|||	dqqW|jjjddd	d|j||d
|dS(Ns+subrepo path contains illegal component: %ss.hgtcreates9failed to reject unsafe subrepo path: %s (expanded to %s)RAtcommitsubreposRt_usedassubrepotTruei(suiR(Rt_stateR]twjoinR^R	R
trealpathRRRR RRR`RtmakedirsRLt
repositorytbaseuiRtProgrammingErrorRARPt	setconfigt	_initrepo(
R#R?R
RgRtRRRotktv((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR!s*			!
!	#cCs2|jj}z|j|SWd|jXdS(N(R]tlockt_storecleantrelease(R#R
R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR+scCst}|j|}y:x3|j|D]"}||jkr(t}Pq(q(WWntk
rht}nX|ry|jt}Wqtk
rqXn|S(N(Rt_calcstorehasht_readstorehashcachetnextR^t
StopIteration(R#R
tcleant	itercachetfilehash((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR2s 




ccs]d}dt|VxA|D]9}tjj|jj|}d|t|fVqWdS(scalculate a unique "store hash"

        This method is used to to detect when there are changes that may
        require a push to a given remote path.t	bookmarkssstore/phaserootssstore/00changelog.is# %s
s%s = %s
N(s	bookmarkssstore/phaserootssstore/00changelog.i(RR	R
RR]R`R(R#Rtfilelisttrelnametabsname((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRFs

cCs(|jjtjjddt|S(s*get a unique path for the store hash cachetcachet	storehash(R]R`R	R
R(R#R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_getstorehashcachepathRscCsV|j|}tjj|s%dSt|d}z|j}Wd|jX|S(s7read the store hash cache for a given remote repositoryRRtN(RR	R
RRt	readlinesR(R#Rt	cachefileRt	pullstate((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRWscCs|j|}|jj}zt|j|}tjj|}tjj|spt	j
|dtnt|d}z|j
|Wd|jXWd|jXdS(scache the current store hash

        Each remote repo requires its own store hash cache, because a subrepo
        store may be "clean" versus a given remote repo, but not versus another
        t
notindexedtwN(RR]RtlistRR	R
RRRRRRt
writelinesRR(R#RRRRtcachedirR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_cachestorehashcscs|j_|j_|rdgfd}tjdt}tjtdt}|d|||kr|d|njjdddt}z|jd	jWd|j	XndS(
Ns[paths]
cs@|r<jd||fjjjd||dndS(Ns%s = %s
RR(tappendR]RAR(tkeytvalue(RpR#(s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
addpathconfigsRORsdefault-pushRRRR(
R]RRR\R^RtopenertwriteR`R(R#t
parentrepoRGRRtdefpathtdefpushpathtfp((RpR#s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRxs	
c	Cs4tj||j|||tjj||j|S(N(tcmdutilRR]R	R
R`R(R#RARRRRR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRscKs9|jd}|j|}tj||j||||S(Ni(RR]R#R(R#RARRRRcR?((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs

cKsyA|jd}|j|}|j|}|jj|||SWnUtjk
r}|jjjtd|t|fgggggggfSXdS(Nis*warning: error "%s" in subrepository "%s"
(	RR]RRtRepoLookupErrorRAR9RR+(R#RRtrev1tctx1tctx2tinst((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs


c	Ksyutj|jd}|dk	r7tj|}ntj||j||||dtj||j	dt
|Wn?tjk
r}|jj
jtd|t|fnXdS(NiRRs*warning: error "%s" in subrepository "%s"
(tnodetbinRRQR#tdiffordiffstatR]R_R`RRRR$RAR9RR+(	R#RARRRRRtnode1R(((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRscCs|j|jdtj|||||}|jd}|j|}x`|jD]U}t||}	tj||}
||	j||t	j
j||j|
7}qSW|S(NRLi(shg(
t_getRRRR]RwRtmatchmodt
narrowmatcherR	R
R`R(R#RARRRRRcR?tsubpathRotsubmatch((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs

	)cCs^|jd}|dkr$|r$tS|jd}||jjkrT|rTtS|jS(NiR(RRR]RQRvthexRz(R#RRtR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRzs

cCs|jdjS(Nt.(R]R2(R#((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRscCs|jj|jj|S(N(R]t_checknestedR(R#R
((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRscCsy|jts |jdjS|jjjdt||jj|||}|sl|jdjStj|S(NR3scommitting subrepo %s
(	RzRR]R2RARrR+RR)(R#RRRtn((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRscCs|j|jS(N(R]R(R#Rg((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRscCs@|jjjtdt|tj|jtjt	dS(Nsremoving subrepo %s
(
R]RAtnoteRR+RLRR)tnullidR^(R#((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR~s#cCs|\}}}||jjkr(tS||j_t|j}tj|ji|}t|jdkr |jjj	t
dt||f|jj}t
j|jjtj|jjji||jjdt\}}|j|_|j||dt|j|n|jjj	t
dt||f|j|}	|jd}
|jj|tj|jj|j|
||	r|j|ntS(Niscloning subrepo %s from %s
tupdateRspulling subrepo %s from %s
R	(R]t
unfilteredRRR\RLtpeerRRARRR+RtshutiltrmtreeR
tcloneRRR^RRRRtlistkeystpullR	tupdatefromremote(R#RgRGRfRhtsrcurltotherRtclonedtcleansubtremotebookmarks((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR-s6
c
Cs|j|}|\}}}|j}|jjd|j|r|j}||}	|	jr|jjtd|dd!|jf|}qnt	j
|||dS(Nsgetting subrepo %s
s$revision %s in subrepo %s is hidden
ii(R-R]RARrRR9thiddenR9RRLt
updaterepo(
R#RgRtinrepoRGRfRhRnturepoR?((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR"s	
		csjjdjdjfd}jd}jrkrtjj|jr|qq|n|dS(NR3icskr[jjkr[jjjdttjjdnfkrjjjdtn:jjjdttjjddtdS(Nsupdating subrepo %s
isskipping subrepo %s
smerging subrepo %s
tremind(	tbranchR]RARrR+RLR8R}R^((tanctcurtdstR#Rg(s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt	mergefunc#s$ (R-R]tancestorRQRzRRA(R#RgROR((RLRMRNR#Rgs5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR}s



$

cCsG|jd}|jd}|jd}|jd}|j}x6t|D](}|j|j|dkrPtSqPWt|jt}|s|j	|r|jj
jtdt
||fdSn|jj
jtdt
||ftj|ji|d6|}	|jj|	|d|}
|j||
S(	Ntforcet
new_branchtsshRis4no changes made to subrepo %s since last push to %s
spushing subrepo %s to %s
t	newbranch(R"R]RwRlRFRR^R\RRRARRR+RQRLR:R(R#RRQRTRStctsubsRotdsturlRBR0((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR7s*
		
cCs%tj||jt|jt|S(N(RLRR]R\R(R#RARR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRTscCs%tj||jt|jt|S(N(RLRR]R\R^(R#RARGR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRXscCs$|jd}|j|}|jS(Ni(RR]tmanifest(R#RcR?((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR\s

cCs"|jd}|j||jS(Ni(RR]R(R#RRc((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRbs
cCs'|jd}|j|}|j|S(Ni(RR]R(R#RRcR?((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRfs

cCs|jd}|j|S(N(R]RQR(R#RR?((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRks
cCs.tj||j|tjj||jtS(N(R#RR]R	R
R`RR(R#RARR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRoscOs|jtd|d|jds|j}d|d<|d|d<g}|jdsodg}n|j|||n|j|d	tdS(
Nsreverting subrepo %s
it	no_backupRiRctallsset:modified()R(RRR"tcopyRQt
filerevertR(R#RARwRR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRts
cOsg|j|d}|jjj}|jdr>dg}ng}tj||j||||dS(NRcRZsset:modified()(R]tdirstatetparentsR"R#R(R#RARRR?R^((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR\scCs|d S(Ni((R#R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR|sN(&R&R'R!RRRRRRR5RRRRRRQRR^RzRRRRR~R-R"R}RRRRRRRRRR\R|(((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRsH							
								t
svnsubrepocBseZdZdedZedZdZdZdZ	edZ
dZed	Z
ed
ZeedZedZd
ZedZdZRS(cCsh||_||_||_|jj|_tjd|_|jsdtj	t
d|jndS(Ntsvns+'svn' executable not found for subrepo '%s'(RRt_ctxR]RAt_uiRtfindexet_exeR R(R#R?R
Rg((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR!s				RcCs|jg}i}|jjsQtj|d<|ddkrQ|jdqQn|j||dk	rtj	j
|jjj
|j|}|j|nttj}|jd}|r||d<|d=nd	|d
<tj|ddd
tjdtjdtjdtd||}	|	j\}
}|j}|s|	jrktj|pbd|	jn|r|jj|dqn|
|fS(NtstdiniR8tcheckoutRs--non-interactivetLC_ALLtLANGtCtLC_MESSAGEStbufsizeit	close_fdststdouttstderrtuniversal_newlinestenvsexited with code %ds
(supdatescheckoutscommit(RdRbtinteractivet
subprocesstPIPERtextendRQR	R
R`RaR]torigrootRtdicttenvironR"tPopenRtclosefdsRtcommunicateRat
returncodeR R9(R#tcommandsRtfailoktcmdtextrakwR
Rptlc_allR@RmRn((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_svncommands6

$


	cCsy|jddgdd\}}tjd|}|sQtjtdnt|jdt|jdfS(Ns	--versions--quietRs
^(\d+)\.(\d+)s cannot retrieve svn tool versionii(	RRQREtsearchRR Rtinttgroup(R#toutputR>tm((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_svnversions
!cCs|jddg\}}tjjj|}|jd}d\}}|rt|djdpmd}|djd}|rt|djdpd}qn||fS(	Ntinfos--xmltentryt0iRfR(RR(RtxmltdomtminidomtparseStringtgetElementsByTagNameR,tgetAttribute(R#RR>tdoctentriestlastrevRctcommits((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_wcrevss%cCs|jdS(Ni(R(R#((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_wcrevsc
Cs~|jddg\}}ggg}}}tjjj|}x|jdD]}|jd}|suqTn|djd}	|djd}
|jd}|	d	kr|j|n|	d
kr|j|n|	dks|
dkrT|j|qTqTWxT|D]L}xC|D];}||ksJ|j|t	j
r"ttt|fSq"WqWt|t
t|fS(sReturn (changes, extchanges, missing) where changes is True
        if the working directory was changed, extchanges is
        True if any of these changes concern an external entry and missing
        is True if any change is a missing entry.
        Rs--xmlRs	wc-statusititemtpropsR
texternaltmissingRtnormaltunversionedtnone(RRRR(RRR(RRRRRRRRRZR	tsepRtboolR^(
R#RR>t	externalstchangesRRRKRoRRR
text((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
_wcchangeds,

"cCs:|jds6|jd|jks/|r6tSntS(Nii(RRRR^R(R#R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRzscCsh|j\}}||krdy,|jdd|jd|fg|SWqdtjk
r`qdXn|S(NRs%s@%si(RRRRR (R#RRc((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs$c
Cs!|j\}}}|s%|jS|rCtjtdn|ratjtdn|jdd|g\}}|jj|tj	d|}	|	s|j
stjtdntj|jdn|	jd}	|jj|jd	d
|	gd|	S(Nscannot commit svn externalss!cannot commit missing svn entriesRs-msCommitted revision ([0-9]+).sfailed to commit svn changesiiR8s-r(
RRRR RRRbRRERRaRVtgroups(
R#RRRtchangedt
extchangedRt
commitinfoR>tnewrev((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs"
&cCs|jr-|jjtd|jdS|jjtd|jd}|jjj|j}t	j
|d|ytjtj
j|Wntk
rnXdS(Ns-not removing repo %s because it has changes.
sremoving subrepo %s
cSst|tjk	rntj|}|jtj@dkr@ntj|tj|jtjBtj|dS(Ni(R	R~tstattst_modetS_IWRITEtchmodtS_IMODE(tfunctionR
texcinfoRo((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytonerror6s#R(RzRbR9RRR6RaR]RR;R<R	t
removedirsR
RtOSError(R#RR
((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR~.s	

cCsE|r|jddgndg}|jdkrD|jdn|jd|d|dftj|d|j|d	t\}}t|j|jj	j
|jd
tj
d|s1d|kr|jd
 ttfkr|j|j|dtdStj|p|jdn|jj|dS(NRs--recursiveRfiis--forces%s@%siR}s.svnsChecked out revision [0-9]+.s-is already a working copy for a different URLiRi(ii(RRRRtchecksafesshRRRbRaR]RRRERRR^R~R"R RVR(R#RgRR$RR>((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR"Gs"	%
"cCs|jd}|d}|j}||kr|||kpH|jd}t|j||||r||j|tq|ndS(Nii(RRRRRbR"R^(R#RgtoldtnewtwcrevRz((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR}as

cCstS(N(R(R#R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRkscCs|jdddgd}tjjj|}g}x}|jdD]l}t|jd}|dkrtqGndjd	|jd
dj	D}|j
|jdqGW|S(NRs--recursives--xmliRRhtfileRcss*|] }|j|jkr|jVqdS(N(tnodeTypet	TEXT_NODER(t.0RU((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pys	<genexpr>xsRsutf-8(RRRRRRR,RR`t
childNodesRRD(R#RRRRKRhR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRoscCs|jdg|dS(NRi(R(R#R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR~s(R&R'R!R^Rt
propertycacheRRRRRzRR5RR~R"R}RRR(((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR_s 	
$				
	t
gitsubrepocBsReZdZdZedZdedZdedZ	deddZ
dZdZdZ
d	Zd
ZdZdZd
ZdZdZdZdZeedZdZeedZedZedZedZedZddZedZ dZ!RS(cCsz||_||_||_tjjt|j||_|jj	||_
|j|_|jj|_
|jdS(N(RRaRR	R
R`RR]RRt_abspathRRARbt
_ensuregit(R#R?R
Rg((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR!s			!cCsy%d|_|jdg\}}WnXtk
r}|jdksUtjdkr[nd|_|jdg\}}nX|j|}|dkr|jjt	dnI|dkrt
jt	d	n%|d
kr|jjt	dndS(Ntgits	--versionitntsgit.cmdtunknownscannot retrieve git version
ROs,git subrepo requires at least 1.6.0 or latertwarnings-git subrepo requires at least 1.6.0 or later
(t_gitexecutablet	_gitnodirRR7R	Rt
_checkversionRbR9RRR (R#toutR>RKt
versionstatus((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs		cCsjtjd|}|sdSt|jdt|jdf}|d
krVdS|dkrfdSd	S(sensure git version is new enough

        >>> _checkversion = gitsubrepo._checkversion
        >>> _checkversion('git version 1.6.0')
        'ok'
        >>> _checkversion('git version 1.8.5')
        'ok'
        >>> _checkversion('git version 1.4.0')
        'abort'
        >>> _checkversion('git version 1.5.0')
        'warning'
        >>> _checkversion('git version 1.9-rc0')
        'ok'
        >>> _checkversion('git version 1.9.0.265.g81cdec2')
        'ok'
        >>> _checkversion('git version 1.9.0.GIT')
        'ok'
        >>> _checkversion('git version 12345')
        'unknown'
        >>> _checkversion('no')
        'unknown'
        s^git version (\d+)\.(\d+)RiiiROiRtok(ii(ii(RERRR(RRtversion((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs*cCs|j|d|d|dS(NRptstreami(t_gitdir(R#R|RpR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_gitcommandscCs"|j|d|d|d|jS(NRpRtcwd(RR(R#R|RpR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRsc	Csl|jjd|jdj|f|dkrDtjj}nd|kr]d|d<nd}|jjrt	tj
d}ntj|j
g|ddd|d	|d
tjdtjd|}|r|jdfS|jjj}|j|jd
kr_|jdkr_|d
}|dkr:||jfStjd||j|jfn||jfS(sCalls the git command

        The methods tries to call the git command. versions prior to 1.6.0
        are not supported and very probably fail.
        s%s: git %s
R)tGIT_ALLOW_PROTOCOLsfile:git:http:https:sshRRkiRRpRlRmRniiscat-filessymbolic-refsgit %s error %d in %sN(scat-filessymbolic-ref(RbRrRR`RQR	RwR[tquietRtdevnullRrRxRRRyRsRmRRatwaitR{R (	R#R|RpRRterrpipeR@tretdatatcommand((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs,&




	cCs#tjjtjj|jdS(Ns.git(R	R
RR`R(R#((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_gitmissingscCs|jddgS(Ns	rev-parsetHEAD(R(R#((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt	_gitstatescCs1|jdddg\}}|r-d}n|S(Nssymbolic-refRs--quiet(RRQ(R#tcurrentR>((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_gitcurrentbranchs	cCsO|jddd|g}|jdd}|jdtd}||S(NRtshows-ns
isURL: (RRXtindexR(R#RRtlineRd((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
_gitremotescCs(|jdd|g\}}|dkS(Nscat-files-ei(R(R#RfRtcode((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_githavelocallyscCs"|jd||g}||kS(Ns
merge-base(R(R#tr1tr2tbase((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_gitisancestorscCs|jdddgdkS(NRPs--bools	core.barettrue(R(R#((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
_gitisbare
scCs|jdddgdS(sThis must be run before git diff-index.
        diff-index only looks at changes to file stat;
        this command looks at file contents and updates the stat.supdate-indexs-qs	--refreshN(R(R#((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_gitupdatestat
scCsi}i}|jdddg}x|jdD]}|jd\}}|jdru|jdruq4n|jdr|jdrq4n|||<|j|gj|q4W||fS(	screturns 2 things:
        a map from git branch to revision
        a map from revision to branchessfor-each-refs--formats%(objectname) %(refname)s
R)srefs/heads/s
refs/remotes/s/HEAD(RRXRZtendswitht
setdefaultR(R#t
branch2revt
rev2branchRRRftref((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
_gitbranchmaps
cCsi}x|D]}|jdr(q
n|jddd}|jdd|g}|r
|jdd|g}||d||jdddf<q
q
W|S(s4return map of remote branch to local tracking branchs
refs/remotes/t/iRPsbranch.%s.remotesbranch.%s.mergesrefs/remotes/%s/%s(RZRXR(R#tbranchesttrackingtbtbnameRR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_gittracking's
+cCsQd|kr>|jd}|dkr>d|| kr>|Sn||_t|S(Ns://t:iR(tfindRR\(R#RGtcolon((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR\6s	cCs|jrgtj||j|}|jjtd|j|f|jd||j	gn|j
|rzdS|jjtd|j|jdf|jdg|j
|stj
td||jfndS(Nscloning subrepo %s from %s
R=spulling subrepo %s from %s
torigintfetchs)revision %s does not exist in subrepo %s
(RRRR\RbRRRRRRRRR (R#RGRf((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_fetch?s
cCs|jr|jddkS|jr-tS|rQ|jd|jkrQtS|j|jdddg\}}|dkS(NiRs
diff-indexs--quietR(RRRRRRR(R#RRR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRzRs 
cCs
|jS(N(R(R#((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR`scs|\}}s#jdSj|jrjdddgjkrjdddgdSnHjkrrjddgjdddgndSj\}}fdfd}|kr|dS|}d}	xK|D]C}
|
d	krVd	gdS|	r3|
jd
r3|
}	q3q3W|	r|	gdSj|j	}|d}||krx'|D]}
|
|kr|
}PqqWn||kr|j
dd
d
}
d|
|gnzj||||r||jkrb||gnjdd|gt
jjdn|dS(NRPs	core.baretfalsetresets--hardRcs]dg}r2jddg|jdnj||tjjddS(NRfRRs-fs.git(RRRRbR(R$R~(RR#(s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRfzs	csGjjtdjjjtddgdS(Ns)checking out detached HEAD in subrepo %s
s5check out a git branch if you intend to make changes
s-q(RbR9RR((RfRfR#(s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytrawcheckoutssrefs/heads/masters
refs/remotes/iRis-bR}s--ffs.git(R~RRRRRRQRZRtkeysRXRRRRbR(R#RgRRGRhRRRRtfirstlocalbranchRRRR((RfRRfR#s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR"cs`







cCs|jr+tjtd|jnddd|g}tjj}|re|d|g7}n|rtj|d|d<n|j	|d||j
S(	Nssubrepo %s is missingRs-as-ms--authors%Y-%m-%dT%H:%M:%S %1%2tGIT_AUTHOR_DATERp(RRR RRR	RwR[tdatestrRR(R#RRRR~Rp((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs	cs\}}j|jdjdgjjdddg\}}fd}jrjkrjjdkp|dk}tj|jdd d r|qqn|dS(	Ns
merge-baseis
diff-indexs--quietRcsbkrjn,jdkrHjddgntjjddS(NiR}s--no-commits.git(R"RRRRbR((RRfR#Rg(s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyROs
ii(	RRRRRRzRRRb(R#RgRGRhRRRORz((RRfR#Rgs5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR}s
%c
Cs|jd}|jds tS|jrKtjtd|jn|j\}}|jd|krx/||jdD]}|j	drtSqWnxI|j
D];\}}|j	dr|j|jd|rtSqqWdg}|r
|jdn|j
}|r|j|jd|sY|jjtd|jtS|jjtd|jd	d
d
|jf|j|d|g}	|	ddkS|jjtd
|j|jdftSdS(NRQissubrepo %s is missingsrefs/remotes/origin/Rs--forces/unrelated git branch checked out in subrepo %s
s pushing branch %s of subrepo %s
RiRis<no branch checked out in subrepo %s
cannot push revision %s
(R"RRRRR RRRRZRxRRRRbR9R^RRXR(
R#RRQRRRRfR~Rtret((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs<
	!cCs|jrdS|jr=|jjtd|jdS|jjtd|j|jdddgxtj	|j
D]r}|dkrqntjj|j
|}tjj
|rtjj|rtj|qtj|qWdS(Ns-not removing repo %s because it has changes.
sremoving subrepo %s
RPs	core.bareRs.git(RRzRbR9RRR6RR	tlistdirRR
R`tisdirRR;R<R~(R#R;R
((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR~s%cCsd}|j\}}|s|S|j|||jd|gdt}tjd|dd}	t|}
|jtd|
ddtd	xt	|	D]\}}|j
rqn|r||jrqn|jr|j
}
n|	j|j}
|jtjj||j|j|j|j|
|d
7}|jtd|
|d
dtd	qW|jtd|
d|S(NiRRtfileobjRsr|sarchiving (%s)RRi(RRRRttarfileRR+RRRURRtissymtlinknametextractfileRRR	R
R`RRRQ(R#RARRRRRGRft	tarstreamttarRRdRR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR s0&!
cKsa|jd}|js |r9gggggggfSggg}}}|j|rod||g}nd|g}|j|}x|jdD]}	|	jd}
|
dkrqn|	|
d|	|
d}}|dkr|j|q|dkr|j|q|d	kr|j|qqWg}
}}}||||
|||fS(
Nis	diff-trees
diff-indexs
s	itMtAtD(RRRRRXRR(R#RRR%tmodifiedtaddedtremovedRRRttabRR;tdeletedRtignoredR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR@s,

cCs|d S(Ni((R#R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR|\sN("R&R'R!RtstaticmethodRRQR^RRRRRRRRRRRRRR\RR5RzRR"RR}RR~RRR|(((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs<	
	%&													
	U( RLR`R(5R7R	RER;R_R-txml.dom.minidomRRRrRti18nRRPRR)RR#R	RR.RRRQRLRRyRRRR RR5RgRqRRRR+R^RR\RRRRRtobjectRRR_RR(((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt<module>sHH$T		
		
		Z		e					
			!

Copyright © 2017 || Recoded By Mr.Bumblebee