HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python2.7/dist-packages/mercurial/subrepo.pyc

x7_c@@s=ddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZ
ddlmZddlmZmZmZmZmZmZmZmZmZmZmZeaejZdddfZ dZ!d	Z"d
ej#fdYZ$dZ%d
Z&dZ'edZ(dZ)dZ*dZ+e,e-dZ.dZ/dZ0dZ1e,e-dZ2dZ3dZ4de5fdYZ6de6fdYZ7de6fdYZ8d e6fd!YZ9ie7d"6e8d#6e9d$6Z:dS(%i(tabsolute_importNi(t_(tcmdutiltconfigterrortexchanget	filemergetmatchtnodetpathutiltphasestscmutiltutilttemptycC@sUtjtj|}tj|}|jsQtjtjj|j}n|S(sU
    get a path or url and if it is a path expand it and return an absolute path
    (	Rturllocalpatht
expandpathturltschemetnormpathtostpathtabspath(Rtexpandedpathtu((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_expandedabspath+s
	!cC@s tjt|jdd!S(sEget a unique filename for the store hash cache of a remote repositoryii(thashlibtsha1Rt	hexdigest(t
remotepath((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_getstorehashcachename5stSubrepoAbortcB@seZdZdZRS(sEException class used to avoid handling a subrepo error more than oncecO@sD|jdd|_|jdd|_tjj|||dS(Ntsubrepotcause(tpoptNoneR R!RtAbortt__init__(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.pyR9sc@sfd}|S(Nc@sy|||}Wntk
r1}|ngtjk
r}t|}t|dtd|}t|d|jd|dtjnX|S(Nt s(in subrepo %s)thintR R!(	RRR$t
subrelpathtstrRR-tsystexc_info(R&R'tkargstrestexR terrormsg(tfunc(s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytdecoratedmethodAs	((R6R7((R6s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytannotatesubrepoerror@s
c@stjjddfddkrRdnx?jdD].\}}jd||jd|qbWi}dkryxtdjjD]\}}|j	}|sqny|j
dd\}}Wn=tk
rEtj
tdjd|dfnX|||<qWWqtk
r}|jtjkrqqXnfd}	i}
xpd	jD]^\}}d
}|jdr"d|krtj
td
n|j
dd\}}|d}|j	}ntj|jstdt}|rtj|}tj|jppd	||_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))
    c@s|kry|j}WnLtk
rn}|jtjkrJnjtdj|dSXj||||n"tj	tdj|dS(Ns*warning: subrepo spec file '%s' not found
s subrepo spec file '%s' not found(
tdatatIOErrorterrnotENOENTtwarnRtpathtotparseRR$(tftsectionstremapR9terr(tctxtptreadtrepotui(s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRFWss.hgsubtsubpathss.hgsubstateR,is8invalid subrepository revision specifier in '%s' line %dc@sxjdD]\}}|jd}tjdd|}ytj|||d}Wqtjk
r}tjtdjd||fqXqW|S(NRIs
string-escapes\\\\([0-9]+)s\\\1is#bad subrepository pattern in %s: %s(titemstencodetretsubRR$Rtsource(tsrctpatterntreplte(RE(s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRB~s$R
thgt[t]smissing ] in subrepo sourcetabortN("RRGR#tconfigitemstsettconfigsourcet	enumerateR9t
splitlinestlstriptsplitt
ValueErrorRR$RR>R:R;R<RJt
startswithRRtisabst
_abssourcetFalset	posixpathtjoinRRR/tstriptgettpconvert(RDRHRROtrevtitltrevisionRCRBtstatetkindtparenttjoinedtremapped((RDRERFRGRHs5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRlPs^!
&)
!

2cC@sigt|D]6}||dtdkr
d||d|f^q
}|jddj|ddS(s=rewrite .hgsubstate in (outer) repo with these subrepo statesis%s %s
s.hgsubstateR
N(tsortedt	nullstatetwwriteRd(RGRltstlines((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
writestates6c@s||kr|j}n|j}|j}|j}i}	jjd|||fdfd}
xt|jD]u\}}|j|t}
|}|j|j	r|d|ddf}n||kr|}
n||krYt
j|}||d<||}||ks.||
kr>||	|<q~q||
kr|
|d||j|j||||	|<q|d|dkr|d|d	<|d|d
<jjt
d|drV|
|d||j|j||||	|<qVq|d|
dkrR|
|d
||j|j||||	|<q|
|d|j|}|j|d|d<|j|d|d<jjt
d|d}|dkr|j|j|||	|<|
|d|q|dkr#||	|<|
|d|q|j|j||||	|<|
|d|q~||
kr|
|d|j|jq~|
tkr|
|d||	|<q~q~jjt
d|dr~|
|d|j|jq~q~Wxt|jD]\}}||kr(q
q
||krg|
|d||j|j|||	|<q
|||kr
jjt
d|ddkr|
|d||j|j|||	|<qq
q
Wt|	|	S(s{delegated from merge.applyupdates: merging of .hgsubstate file
    in working context, merging context and ancestor contextssubrepo merge %s %s %s
R
c@s4|rd|}njjd|||fdS(Ns%s:%s:%ss  subrepo %s: %s %s
(RHtdebug(Rttmsgtr(RG(s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRws
iit+Rtsother changed, gettlotros~ subrepository sources for %(s)s differ
use (l)ocal%(l)s source (%(lo)s) or (r)emote%(o)s source (%(ro)s)?$$ &Local $$ &Remotesprompt changed, getsother side changed, getsboth sides changedtsltsrs subrepository %(s)s diverged (local revision: %(sl)s, remote revision: %(sr)s)
(M)erge, keep (l)ocal%(l)s or keep (r)emote%(o)s?$$ &Merge $$ &Local $$ &Remotes
merge withskeep local subrepo revisionsget remote subrepo revisionsremote removed, removeslocal added, keepsz local%(l)s changed subrepository %(s)s which remote%(o)s removed
use (c)hanged version or (d)elete?$$ &Changed $$ &Deletes
prompt removesremote added, getsz remote%(o)s changed subrepository %(s)s which local%(l)s removed
use (c)hanged version or (d)elete?$$ &Changed $$ &Deletesprompt recreate(tp1tsubstateRHRwRqt	iteritemsRfRrRMtdirtyRt
partextrastpromptchoiceRtshortidtmergetremoveRJRv(RGtwctxtmctxtactxt	overwritetlabelsts1ts2tsatsmRwRtRjtatldtpromptsRytsrepotoption((RGs5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytsubmerges				



		


		






		


		
cC@sW|r(tdt|||f}ntdt|||f}|j|dS(Nsi 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(RHRMRtlocaltremoteRx((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
_updateprompt s		cC@sE|}xtj|dr'|j}q	W|jttj|jS(s9return path to this (sub)repo as seen from outermost repot
_subparent(RtsafehasattrRtroottlenR	tnormasprefix(RGRn((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytreporelpath.s
cC@s|jS(s7return path to this subrepo as seen from outermost repo(t_relpath(RM((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR.5scC@sxtj|drtj|j}|jr:t|Stj|j|_t	|j
|dt}|rVtjtj|}tj
|jpd|j|_tj|j|_t|Sntj|dr|jS|r|jjddr|jjddS|jjddr7|jjddS|jrVtjj|jS|rttjtdnd	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.RRVR
t_subtoppathtpathssdefault-pushtdefaults(default path for subrepository not foundN(RRRt
_subsourceR`R/RcRRRaRRbRgRdRRHRtsharedRtdirnamet
sharedpathRR$R(RGtpushRVRNRn((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRa9s*
!
c	C@sx|jD]\}}}x7t|D])\}}|j|kr)||=Pq)q)W|j|jdkrwq
nx\|D]T}|jdkr~|jtd|j||j|j||q~q~Wq
WdS(Ns.hgthgrcs5warning: removing potentially hostile 'hgrc' in '%s'
(	twalkRZtlowertbasenameR=RRdtunlinktreljoin(	RHtvfstignoreRtdirstnamesRitdR@((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt	_sanitizeTs
cC@s|jds0d|ks0tj||krLtjtd|ntj|j||j	j
|rtjtd|ndS(Nt~t$s+subrepo path contains illegal component: %ss$subrepo '%s' traverses symbolic link(R_RRRR$RR	tpathauditorRtwvfstislink(RGR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_auditsubrepopathbs0
cC@sr||jdddgkrFtjtd|dtdn|tkrntjtd|ndS(NtsubrepostallowedRSssubrepo type %s not allowedR-s)see 'hg help config.subrepos' for detailssunknown subrepo type %s(t
configlistRR$Rttypes(RHRm((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
_checktypels
cC@sddlm}|a|j}t|||j|}t|j|d|ry|d|j||df}nt|d|||d |S(s>return instance of the right subrepo class for subrepo in pathi(RSii(	R
RSRGRRRRHtsubrevR(RDRt	allowwdirtallowcreatethRGRl((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR ss

#cC@sddlm}|a|j}t|||j|}t|j|dd}|ddkrsdd}nt|d|||d|ftS(	s=return an empty subrepo in pctx for the extant subrepo in ctxi(RSiR
RSt0i(i(	R
RSRGRRRRHRtTrue(RDRtpctxRRGRlR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytnullsubrepos


c
C@sVtj|}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(NRR
t
checksubrepostfollowRRVs.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
(RRRV(R
tnewcommitphasetgetattrR#RRR$RtpublicRqRMtphaset
phasenamesR=(
RHRDtcommitphaseRtchecktmaxphasetmaxsubRtRMtsubphase((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs6
	

tabstractsubrepocB@sUeZdZdZedZedZedZdZdZ	dZ
dZd	Zed
Z
dZdZd
ZdZdZdZdZdZdZdZdZdZdZdZd"dZdZdZdZ dZ!dZ"dZ#e$d Z%e$d!Z&RS(#cC@s(|jj|_||_||_dS(sInitialize abstractsubrepo part

        ``ctx`` is the context referring this subrepository in the
        parent repository.

        ``path`` is the path to this subrepository as seen from
        innermost repository.
        N(RGRHt_ctxt_path(R&RDR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR%s		cC@stS(s
        returns true if the repository has not changed since it was last
        cloned from or pushed to a given repository.
        (Rb(R&R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
storecleanscC@s
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.pyRscC@s*|jd|r&tdt|SdS(sreturn reason string if it is ``dirty()``

        Returned string should have enough information for the message
        of exception.

        This returns None, otherwise.
        Rs)uncommitted changes in subrepository '%s'N(RRR.(R&R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytdirtyreasons	cC@s.|jd|}|r*tj|ndS(s4raise Abort if subrepository is ``dirty()``
        RN(RRR$(R&RR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
bailifchangedscC@s
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	basestatescC@stS(s7check if path is a subrepository within this repository(Rb(R&R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytchecknestedscC@s
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.pytcommitscC@stjS(s?returns phase of specified state in the subrepository.
        (R
R(R&Rl((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRscC@s
tdS(sTremove the subrepo

        (should verify the dirstate is not dirty first)
        N(R(R&((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRscC@s
tdS(sTrun whatever commands are needed to put the subrepo into
        this state
        N(R(R&RlR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRfscC@s
tdS(s/merge currently-saved state with the new state.N(R(R&Rl((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRscC@s
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.pyRscK@sgS(N((R&RHRtprefixtexplicitonlyR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytaddscC@s$|jjd|tdfdS(Ns%s: %ssaddremove is not supportedi(RHR=R(R&tmatcherRRtdry_runt
similarity((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt	addremoves cK@sdS(Ni((R&RRR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytcatscK@stjgggggggS(N(Rtstatus(R&trev2R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR scK@sdS(N((R&RHtdiffoptstnode2RRR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytdiff#scC@sdS(Ni((R&RHtdestR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytoutgoing&scC@sdS(Ni((R&RHRNR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytincoming)scC@s
tdS(sreturn filename iteratorN(R(R&((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytfiles,scC@s
tdS(sreturn file dataN(R(R&tname((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytfiledata0scC@sdS(sreturn file flagsR
((R&R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt	fileflags4scC@stS(s,Resolve the fileset expression for this repo(RX(R&texpr((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
getfileset8scC@sdS(s)handle the files command for this subrepoi((R&RHtmtfmtfmtR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
printfiles<sc
C@s_|dk	r:g|jD]}||r|^q}n|j}t|}t|}|jjtd|ddtdd|xt|D]\}}	|j|	}
d|
krdpd}d	|
k}|j	||j
d
|	|||j|	|jjtd||ddtdd|qW|jjtd|d|S(Nsarchiving (%s)itunitRttotaltxiiRjt/i(R#RRR.RHtprogressRRZRtaddfileRR(
R&tarchiverRRR@RRtrelpathRiRtflagstmodetsymlink((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytarchive@s". cC@sdS(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.pyRTscC@s
ggfS(N((R&RR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytforget[scC@s|jtd|jdS(sremove the matched files from the subrepository and the filesystem,
        possibly by force and/or after the file has been removed from the
        filesystem.  Return 0 on success, 1 on any warning.
        s)warning: removefiles not implemented (%s)i(tappendRR(R&RRtaftertforceRtwarnings((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytremovefiles^scO@s,|jjtd|d|dfgS(Ns)%s: reverting %s subrepos is unsupported
ii(RHR=R(R&RtpatsR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytrevertgscC@s|S(N((R&trevid((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRlscC@sdS(siverify the integrity of the repository.  Return 0 on success or
        warning, 1 on any error.
        i((R&((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytverifyoscC@s%tj|jjjj|jS(sIreturn vfs to access the working directory of this subrepository
        (RRRRGRRdR(R&((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRuscC@s%|jjt|jj|jS(sLreturn path to this subrepository as seen from outermost repository
        (RRRRRGR(R&((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR{sN('R)R*R%RRbRRRRRRRRRfRRRRRRRRRRRRRRR#RRR	RRRRt
propertycacheRR(((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRsD	
																											t	hgsubrepocB@seZdZdZdZdZedZdZdZ	dZ
edZed	Z
ed
ZedZedZed
Zed)dZeedZdZdZedZedZedZdZeedZedZedZedZedZ edZ!dZ"dZ#edZ$edZ%d Z&ed!Z'ed"Z(ed#Z)d$Z*d%Z+d&Z,ed'Z-ed(Z.RS(*cC@stt|j||||_|j}|j|}|oW|jjd|}tj	j
tj||krt
jtd|ntj|j|d||_|jj|krt
jd||jjfn||jkr|jj|_n|jj|_xNdgD]C\}}	|jj||	}
|
r)|jj||	|
dq)q)W|jjddd	d|j||d
|dS(Ns%s/.hgs+subrepo path contains illegal component: %stcreates9failed to reject unsafe subrepo path: %s (expanded to %s)RHtcommitsubreposR t_usedassubrepoRi(RHR(tsuperRR%t_stateRGtwjoinRtexistsRRtrealpathRRRR$RRSt
repositorytbaseuit_repoRtProgrammingErrort
unfilteredRHRt	setconfigt	_initrepo(R&RDRRlRRyRRRttktv((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR%s*	!
	 cC@s'|jj|j|SWdQXdS(N(Rtlockt_storeclean(R&R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRscC@spt}|j|}x6|j|D]%}|t|dkr%t}Pq%q%W|rlt|ddk}n|S(N(Rt_calcstorehasht_readstorehashcachetnextR#Rb(R&Rtcleant	itercachetfilehash((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR'scc@scd}dt|V|jj}x;|D]3}tj|j|j}d||fVq(WdS(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(R.sstore/phaserootssstore/00changelog.i(RRRRRttryreadR(R&RtfilelistRtrelnameR-((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR(s
cC@stj|jjdS(Nscache/storehash(RRRRd(R&((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_cachestorehashvfsscC@st|}|jj|dS(s7read the store hash cache for a given remote repositoryRy(RR2ttryreadlines(R&Rt	cachefile((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR)scC@s`t|}|jj?t|j|}|j}|j||dddtWdQXdS(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
        Rtwt
notindexedN(RRR&tlistR(R2t
writelinesR(R&RR4t	storehashR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_cachestorehashs
	cC@s<|jjdkr |jdS|jd}|j|SdS(sKfetch the context for this subrepo revision, possibly a workingctx
        iN(RRhR#RR(R&Rh((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_getctxs
c@s|j_|j_|rdgfd}tjdt}tjtdt}|d|||kr|d|njjdddt}z|jd	jWd|j	XndS(
Ns[paths]
c@s=|r9jd||fjjd||dndS(Ns%s = %s
RR (R
RHR"(tkeytvalue(RuR&(s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
addpathconfigsRVRsdefault-pushRR5RR
(
RRRRaRbRRtwriteRdtclose(R&t
parentrepoRNRR>tdefpathtdefpushpathtfp((RuR&s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR#s	
cK@s1tj||j||jj||j||S(N(RRRRRR(R&RHRRRR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRscC@sJtj|}t|d<tj|j||jj||j|||S(NR(tcopyRRRRRRR(R&RRRRR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs

cK@s<|jd}|j|}tj|j|j||||S(Ni(RRRRRH(R&RRRRhRD((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs

cK@syA|jd}|j|}|j|}|jj|||SWnXtjk
r}|jjtd|t|ft	jgggggggSXdS(Nis*warning: error "%s" in subrepository "%s"
(
RRRRtRepoLookupErrorRHR=RR.R(R&RRtrev1tctx1tctx2tinst((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs


c	K@syutj|jd}|dk	r7tj|}ntj||j||||dtj||j	dt
|Wn<tjk
r}|j
jtd|t|fnXdS(NiRtlistsubreposs*warning: error "%s" in subrepository "%s"
(RtbinRR#RtdiffordiffstatRRcRdRRRRFRHR=RR.(	R&RHRRRRRtnode1RJ((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRsc
C@s|j|jdtj||||}|jd}|j|}xY|jD]N}t||t}tj	||}	||j|||j
d|	7}qPW|S(NRSiR(RS(t_getRRRRRR Rtmatchmodt
subdirmatcherR(
R&RRRRRhRDtsubpathRttsubmatch((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR(s

(cC@s^|jd}|dkr$|r$tS|jd}||jjkrT|rTtS|jS(NiR
(RRRR#RthexR(R&RRyR5((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR4s

cC@s|jdjS(Nt.(RRT(R&((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR?scC@s|jj|jj|S(N(Rt_checknestedR(R&R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRBscC@sv|jts |jdjS|jjdt||jj|||}|si|jdjStj|S(NRUscommitting subrepo %s
(	RRRRTRHRwR.RR(R&RRRtn((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyREscC@s|j|jS(N(RR(R&Rl((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRQscC@s=|jjtdt|tj|jtjt	dS(Nsremoving subrepo %s
(
RHtnoteRR.RSR+RRtnullidRb(R&((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRUs c
C@s||\}}}||jjkr(tS||j_t|j}tj|ji|}t|jdkr|jj	t
dt||f|jj}|jj
jtj|jjji||jjdt\}}|j|_|j||dt|j|n^|jj	t
dt||f|j|}	tj|j||	rx|j|ntS(Niscloning subrepo %s from %s
tupdateRspulling subrepo %s from %s
(RR!RRRaRStpeerRRHRRR.RRtrmtreetcloneRRRbRR#R:RRtpull(
R&RlRNRkRmtsrcurltotherRAtclonedtcleansub((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRO\s0c
C@s|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(RORRHRwRR!thiddenR=RRSt
updaterepo(
R&RlRtinrepoRNRkRmRGturepoRD((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRfys	
		c@sjjdjdjfd}jd}jrkrtj|jr|qq|n|dS(NRUic@skrXjjkrXjjdttjjdn`krjjdtn7jjdttjjddtdS(Nsupdating subrepo %s
isskipping subrepo %s
smerging subrepo %s
tremind(	tbranchRHRwR.RSRZRRRb((tanctcurtdstR&Rl(s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt	mergefuncs$(RORtancestorR#RRRH(R&RlRlR((RiRjRkR&Rls5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs



!

cC@sG|jd}|jd}|jd}|jd}|j}x6t|D](}|j|j|dkrPtSqPWt|jt}|s|j	|r|j
jtdt
||fdSn|j
jtdt
||ftj|ji|d6|}	tj|j|	|d|}
|j||
jS(	NRt
new_branchtsshR
is4no changes made to subrepo %s since last push to %s
spushing subrepo %s to %s
t	newbranch(RfRRRqRMRRbRaRRRHRRR.R#RSR[RR:tcgresult(R&RRRpRotctsubsRttdsturlR`R3((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs*
			
cC@sod|ksd|krJtj|}|jdd|jddntj||jt|jt|S(NRhRh(RER"R#RSRRRaR(R&RHRR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs
cC@sod|ksd|krJtj|}|jdd|jddntj||jt|jt|S(NRhRh(RER"R#RSRRRaRb(R&RHRNR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs
cC@s*|jd}|j|}|jjS(Ni(RRtmanifesttkeys(R&RhRD((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs

cC@s"|jd}|j||jS(Ni(RRR9(R&RRh((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs
cC@s'|jd}|j|}|j|S(Ni(RRR(R&RRhRD((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs

cC@s[|jjdkr%|jd}n|jd}|j|}tj||||||S(Ni(RRhR#RRRR(R&RHRRRRRDRh((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs


c@s|jjdkr%|jd}n|jd}|j|}|j|}x|jD]|j}y*|jfd|j|DWqXt	j
k
r|jjt
d|jjt|qXXqXW|S(Nic3@s|]}d|VqdS(RN((t.0R@(RR(s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pys	<genexpr>ss#skipping missing subrepository: %s
(RRhR#RRRRRMtextendRtLookupErrorRHRRRRR(R&RRDRhRRM((RRs5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs

*%cC@s|jd}|j|S(N(RR#R(R&RRD((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs
cC@s1tj|j|j||jj||jtS(N(RR	RHRRRRR(R&RR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR	scC@s7tj|j|j||jj||j|||S(N(RRRHRRRR(R&RRRRRR
((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRscO@s|jjtd|d|jdsd|j}d|d<|d|d<|j||n|jds|j|dtndS(	Nsreverting subrepo %s
it	no_backupRiRhRR(RHRRRfRER#t
filerevertR(R&RRR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs
cO@sj|j|d}|jjj}|jdr>dg}ng}tj|j|j||||dS(NRhtallsset:modified()(RtdirstatetparentsRfRRRH(R&RRRDR~((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR{$scC@s|d S(Ni((R&R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR-scC@syu|jd}|jj|}|jrp|jj}|jtd|jtj	|j
jfndSWnMtjk
r|jjjtd|jtj	|j
jfdSXdS(Nis&subrepo '%s' is hidden in revision %s
is&subrepo '%s' not found in revision %s
(
RRR!RcRHR=RRRtshortRRRF(R&RhRDRH((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR0s
&#cC@s
|jjS(s7return own wvfs for efficiency and consistency
        (RR(R&((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRBscC@s
t|jS(sLreturn path to this subrepository as seen from outermost repository
        (RR(R&((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRHsN(/R)R*R%RR'R(RR2R)R:R;R8R#RRRRRR#RRbRRRRRRRORfRRRRRRRRRRR	RRR{RRRR(((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRsX			
	
				
										t
svnsubrepocB@seZdZdedZedZdZdZdZ	edZ
dZed	Z
ed
ZeedZedZd
ZedZdZRS(cC@s`tt|j||||_tjd|_|js\tjt	d|j
ndS(Ntsvns+'svn' executable not found for subrepo '%s'(RRR%RRtfindexet_exeRR$RR(R&RDRRlR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR%Ps		R
cC@s|jg}i}|jjsQtj|d<|ddkrQ|jdqQn|j||dk	r|jj	|j
jj|j
|}|j|nttj}|jd}|r||d<|d=nd	|d
<tj|ddd
tjdtjdtjdtd||}	|	j\}
}|j}|s|	jrntj|ped|	jn|r|jj|dqn|
|fS(NtstdiniRZtcheckoutRs--non-interactivetLC_ALLtLANGtCtLC_MESSAGEStbufsizeit	close_fdststdouttstderrtuniversal_newlinestenvsexited with code %ds
(RZRR(RRHtinteractivet
subprocesstPIPER
RxR#RRRRGtorigrootRtdictRtenvironRftPopenRtclosefdsRtcommunicateRet
returncodeRR$R=(R&tcommandstfilenametfailoktcmdtextrakwRRtlc_allRERR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_svncommandXs:




	cC@sy|jddgdd\}}tjd|}|sQtjtdnt|jdt|jdfS(Ns	--versions--quietRs
^(\d+)\.(\d+)s cannot retrieve svn tool versionii(	RR#RLtsearchRR$Rtinttgroup(R&toutputRCR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_svnversion~s
!cC@s|jddg\}}tjjj|}|jd}d\}}|rt|djdpmd}|djd}|rt|djdpd}qn||fS(	Ntinfos--xmltentryRiRkR(RR(RtxmltdomtminidomtparseStringtgetElementsByTagNameR/tgetAttribute(R&RRCtdoctentriestlastrevRhtcommits((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_wcrevss%cC@s|jdS(Ni(R(R&((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_wcrevsc
C@s~|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-statusititemtpropsRtexternaltmissingR
tnormaltunversionedtnone(R
RRR(R
RR(RRRRRRRR
R_RtsepRtboolRb(
R&RRCt	externalstchangesRRRRRtRRRtext((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
_wcchangeds,

"cC@s:|jds6|jd|jks/|r6tSntS(Nii(RRRRbR(R&R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRscC@sh|j\}}||krdy,|jdd|jd|fg|SWqdtjk
r`qdXn|S(NR7s%s@%si(RRRRR$(R&RRh((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs$c
C@s!|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 changesiiRZs-r(
RRRR$RRRHRRLRReR[tgroups(
R&RRRtchangedt
extchangedRt
commitinfoRCtnewrev((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs"
&cC@s|jr-|jjtd|jdS|jjtd|j|jjdty/|j	j
j}|j|j|jWnt
k
rnXdS(Ns-not removing repo %s because it has changes.
sremoving subrepo %s
tforcibly(RRHR=RRRXRR\RRRGt
removedirsRtOSError(R&tpwvfs((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs
cC@s6|r|jddgndg}|jdkrD|jdn|jd|d|dftj|d|j|d	t\}}t|j|jd
t	j
d|s"d|kr|jd
 ttfkr|j
|j|dtdStj|p|jdn|jj|dS(NRs--recursiveRiis--forces%s@%siRs.svnsChecked out revision [0-9]+.s-is already a working copy for a different URLiRi(ii(RRR
RtchecksafesshRRRHRRLRRRbRRfRR$R[R(R&RlRR'RRC((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRfs"	
"cC@s|jd}|d}|j}||kr|||kpH|jd}t|j||||r||j|tq|ndS(Nii(RRRRRHRfRb(R&RltoldtnewtwcrevR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs

cC@stS(N(R(R&R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRscC@s|jdddgd}tjjj|}g}x}|jdD]l}t|jd}|dkrtqGndjd	|jd
dj	D}|j
|jdqGW|S(NR7s--recursives--xmliRRmtfileR
cs@s*|] }|j|jkr|jVqdS(N(tnodeTypet	TEXT_NODER9(RwRr((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pys	<genexpr>%sRsutf-8(RRRRRRR/RRdt
childNodesR
RK(R&RRRRRRmR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRscC@s|jdg|dS(NRi(R(R&R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR+s(R)R*R%RbRRRRRRRRR8RRRfRRRR(((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyROs 	&				
	t
gitsubrepocB@seZdZdZedZedZd!edZ	d!edZ
d!ed!dZdZdZ
d	Zd
ZdZdZd
ZdZdZdZdZdZeedZdZeedZedZedZedZedZedZ d!dZ!edZ"edZ#edZ$edZ%d Z&RS("cC@sWtt|j||||_|jj||_|j|_|jdS(N(	RRR%RRGRt_abspathRt
_ensuregit(R&RDRRlR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR%0s
	cC@sy%d|_|jdg\}}Wn$tk
rK}td}td}|jtjkrtj||j|j	fqLt
jdkr&y%d|_|jdg\}}WqHtk
r"}|jtjkrtjtd|jd|q#tj||j|j	fqHXqLtjtd	|jd|nX|j|}|d
kr|j
jtdnI|dkrtjtd
n%|dkr|j
jtdndS(Ntgits	--versions(error executing git for subrepo '%s': %ss'check git is installed and in your PATHtntsgit.cmds1couldn't find 'git' or 'git.cmd' for subrepo '%s'R-s"couldn't find git for subrepo '%s'tunknownscannot retrieve git version
RVs,git subrepo requires at least 1.6.0 or latertwarnings-git subrepo requires at least 1.6.0 or later
(t_gitexecutablet	_gitnodirRRR;R<RR$RtstrerrorRRt
_checkversionRHR=(R&toutRCRRtgenericerrortnotfoundhintte2t
versionstatus((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR7s8	"	
cC@stjd|}|rRt|jdt|jdt|jdfStjd|}|rt|jdt|jddfSdS(Ns ^git version (\d+)\.(\d+)\.(\d+)iiis^git version (\d+)\.(\d+)ii(RLRRR(RR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_gitversionWs:+cC@sCtj|}|dkrdS|d
kr/dS|dkr?dSd	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'
        iRiiiRViRtok(iii(iii(RR(Rtversion((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRcscC@s|j|d|d|dS(NRtstreami(t_gitdir(R&RRR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_gitcommandscC@s"|j|d|d|d|jS(NRRtcwd(RR(R&RRR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRsc	C@s||jjd|jdj|f|dkrDtjj}nd|d<d|krgd|d<nd}|jjrt	tj
d}ntj|j
g|dd	d
|d|dtjd
tjd|}|r|jdfS|jjj}|j|jdkro|jdkro|d}|dkrD||jfStjtd||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,RRtGIT_ALLOW_PROTOCOLsfile:git:http:https:sshR5RiRRRRRiiscat-filessymbolic-refsgit %s error %d in %sN(scat-filessymbolic-ref(RHRwRRdR#RRREtquiettopentdevnullRRRRRRRRFRetwaitRRR$R(	R&RRRRterrpipeREtretdatatcommand((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs.&





cC@s|jjdS(Ns.git(RR(R&((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_gitmissingscC@s|jddgS(Ns	rev-parsetHEAD(R(R&((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt	_gitstatescC@s1|jdddg\}}|r-d}n|S(Nssymbolic-refRs--quiet(RR#(R&tcurrentRC((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_gitcurrentbranchs	cC@sO|jddd|g}|jdd}|jdtd}||S(NRtshows-ns
isURL: (RR]tindexR(R&RRtlineRi((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
_gitremotescC@s(|jdd|g\}}|dkS(Nscat-files-ei(R(R&RkRtcode((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_githavelocallyscC@s"|jd||g}||kS(Ns
merge-base(R(R&tr1tr2tbase((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_gitisancestorscC@s|jdddgdkS(NRs--bools	core.barettrue(R(R&((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
_gitisbarescC@s|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_gitupdatestatscC@si}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(RR]R_tendswitht
setdefaultR
(R&t
branch2revt
rev2branchRRRktref((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt
_gitbranchmaps
cC@si}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/RiRsbranch.%s.remotesbranch.%s.mergesrefs/remotes/%s/%s(R_R]R(R&tbranchesttrackingtbtbnameRR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_gittrackings
+cC@sQd|kr>|jd}|dkr>d|| kr>|Sn||_t|S(Ns://t:iR(tfindRRa(R&RNtcolon((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRas	cC@s|jrgtj||j|}|jjtd|j|f|jd||j	gn|j
|rzdS|jjtd|j|jdf|jdg|j
|st
jtd||jfndS(Nscloning subrepo %s from %s
R]spulling subrepo %s from %s
torigintfetchs)revision %s does not exist in subrepo %s
(RRRRaRHRRRRRRRRRR$(R&RNRk((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt_fetchs
cC@s|jr|jddkS|jr-tS|rQ|jd|jkrQtS|j|jdddg\}}|dkS(NiR
s
diff-indexs--quietR(RRRRRRR(R&RRR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs 
cC@s
|jS(N(R(R&((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR&sc@s|\}}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(NRs	core.baretfalsetresets--hardRc@s]dg}r2jddg|jdnj||tjjddS(NRRRs-fs.git(RR
RRHR(R'R(RR&(s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR@s	c@sGjjtdjjjtddgdS(Ns)checking out detached HEAD in subrepo %s
s5check out a git branch if you intend to make changes
s-q(RHR=RR((RRkR&(s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pytrawcheckoutKssrefs/heads/masters
refs/remotes/iRis-bRs--ffs.git(RRRRRRR#R_R
RvR]RRRRHR(R&RlRRNRmRRRR	tfirstlocalbranchRR
RR((RRRkR&s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRf)s`







cC@s|jr+tjtd|jnddd|g}tjj}|re|d|g7}n|rtj	|d|d<n|j
|d||jS(	Nssubrepo %s is missingRs-as-ms--authors%Y-%m-%dT%H:%M:%S %1%2tGIT_AUTHOR_DATER(RRR$RRRRRERtdatestrRR(R&RRRRR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs	c@s\}}j|jdjdgjjdddg\}}fd}jrjkrjjdkp|dk}tj|jdd d r|qqn|dS(	Ns
merge-baseis
diff-indexs--quietRc@sbkrjn,jdkrHjddgntjjddS(NiRs--no-commits.git(RfRRRRHR((RRkR&Rl(s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRls
ii(	RRRRRRRRRH(R&RlRNRmRRRlR((RRkR&Rls5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs
%c
C@s|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(NRissubrepo %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
(RfRRRRR$RRRR_RRR
RRHR=RbRR]R(
R&RRRRRRkRRtret((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs<
	!cK@s|jrgS|jddtdt\}}}}	}
}}t}
x'|||	|fD]}|
j|q\W|
}|j|jg}gtt|D]}||r|^q}x|D]}|j	|}dg}|r|j
dn|js|r1|jtd|j
|n||
krY|r|j
|qqn|jds|j||gqqWx.|D]&}|jtd|j|qW|S(NRR+Rs-fs
adding %s
Rs%s already tracked!
(RRR#RRXRZRxRRqtexactR
tverboseRtrelRfRR=tabs(R&RHRRRRtmodifiedtaddedtremovedtdeletedRtignoredR+ttrackedRjRtrejectedR@RR((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs6	1
	#
$cC@s|jrdS|jr=|jjtd|jdS|jjtd|j|jdddgxa|jj	D]P\}}|dkrqn|t
jkr|jj|q|jj
|qWdS(Ns-not removing repo %s because it has changes.
sremoving subrepo %s
Rs	core.bareRs.git(RRRHR=RRRXRRtreaddirtstattS_IFDIRR\R(R&R@Rm((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRsc
C@sd}|j\}}|s|S|j|||jd|gdt}tjd|dd}t|}	|jjt	d|	ddt	d	xt
|D]\}
}|jrqn|r||jrqn|j
r|j}n|j|j}|j||jd
|j|j|j
||d7}|jjt	d|	|
ddt	d	qW|jjt	d|	d|S(NiRRtfileobjRsr|sarchiving (%s)RRRi(RRRRttarfileRR.RHRRRZtisdirRtissymtlinknametextractfileRFRRRR#(
R&RRRRRNRkt	tarstreamttarRRiRR9((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs0)
 c	K@s|jd}|jrdS|js-dSx|jD]{}|jdd||fg}tj|j|jd|jj	d|j
j||}|j||j
q:WdS(NiRs%s:%sRtpathnamei(RtanypatsRRRtmakefileobjRRfRRRRR?R@(R&RRRRhR@RRD((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR.s

cK@s7|jd}|js |r?tjgggggggSggg}}}|j|r{ddd||g}ndd|g}|j|}x|jdD]}	|	jd}
|
dkrqn|	|
d|	|
d}}|d	kr	|j|q|d
kr%|j|q|dkr|j|qqWggggf\}
}}}dd
dg}|j	dr|dg7}n|j	dr|dg7}n|j|}t
}|j||j||j|x|jdD]}	|	sqn|	dd!}|	jddkrO|	djd\}}n|	d}d}|j
||r|j
|n|dkr|j|q|dkr|j|qqW|j	dr|jdg}x6|jdD]"}||kr|j|qqWntj||||
|||S(Nis	diff-trees--no-renamess-rs
diff-indexs
s	itMtAtDRs--porcelains-zRs--untracked-files=allR#s	--ignoredsiiis??s!!R+sls-files(RRRRRRR]RR
RfRXRZR#R(R&RRRGRR R!RRRttabRR@R"RR#R+tchangedfileststt	filename1t	filename2((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRAsj

	





cK@s|jd}ddg}|dr3|jdn|jd|j|jj||j}	|jr|jd|	d|	gn|jd	|	d
|	g|jr|jdn|j	r|jdn|j
|jd
gdkr
|jr
|jdn|j||r0|j|nd}
|j
r\|
|j|d7}
nz|j|d }g|D]}|D]}
|
^qqv}x>|D]6}
||
r|
|j|d|
gd7}
qqW|
jr|j|
ndS(NiRs--no-renamesR's--stats-U%ds--src-prefix=%s/s--dst-prefix=%s/s--src-prefix=a/%s/s--dst-prefix=b/%s/s--ignore-all-spaces--ignore-space-changes	--versioniis--ignore-blank-linesR
s
is--(iii(RR
tcontextRRRtnoprefixRxtignorewstignorewsamountRRtignoreblanklinestalwaysRReR?(R&RHRRRRRRNRt	gitprefixRR9tsublistR@R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs>

	

		!	
&
(cO@s|jjtd|d|jds|jd}|j}x_|D]T}tj|j|j|}|jj	td||f|j
j||qLWn|jds|j|dtngS(Nsreverting subrepo %s
iRzs#saving current version of %s as %s
RR(
RHRRRfR#RRtorigpathRRXRtrenameR(R&RRRRRRtbakname((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRs	
cC@s|d S(Ni((R&R((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyRsN('R)R*R%RtstaticmethodRRR#RbRRRRRRRRRRRRR
RaRR8RRRfRRRRRRRRRRR(((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyR/sF		 $(													
	U() C,RSRR(;t
__future__RRER;RRRcRLR'RR0R*txml.dom.minidomRti18nRR
RRRRRRRPRR	R
RRR#RSRRrRRR$RR8RlRvRRRR.RbRRaRRRR RRtobjectRRRRR(((s5/usr/lib/python2.7/dist-packages/mercurial/subrepo.pyt<module>sXL		
			\	n					
			!