Plan 9 from Bell Labs’s /usr/web/sources/contrib/bichued/root/sys/lib/python/mercurial/subrepo.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


�
�c
@s�ddkZddkZddklZddkZddkZddkZddkZda	dZ
d�Zd�Zd�Z
ed�Zd�Zd	efd
��YZdS(i�N(t_tc	s�ti��dd��fd�}|d�h}d�jowyAx:�di�i�D]"}|i�\}}|||<q[WWq�tj
o#}|itijo�q�q�Xnh}x:�di�D](\}}||i	|d�f||<q�W|S(Ncsk|�joZy$�i|�|i�||�Wqgtj
o#}|itijo�qcqgXndS(N(tparsetdatatIOErrorterrnotENOENT(tftsectionstremapterr(tctxtp(s$/sys/lib/python/mercurial/subrepo.pytreads
$s.hgsubs.hgsubstateR(
tconfigtNoneRt
splitlinestsplitRRRtitemstget(	RR
trevtltrevisiontpathR
tstatetsrc((RRs$/sys/lib/python/mercurial/subrepo.pyRs$

 c	CsS|iddig}t|�D]}|d||d|fq ~�d�dS(Ns.hgsubstateRs%s %s
i(twwritetjointsorted(trepoRt_[1]ts((s$/sys/lib/python/mercurial/subrepo.pyt
writestate*s	
cCs||jo|i�}n|i}|i}|i}h}x�i�D]�}}	|i|t�}
||joF||}|	|jp
||
jo|	||<qKq,|	|
jo$|i|�i|�|||<q,|	d|djon|iitd�||	d|dftd�td�fd�o$|i|�i|�|||<q�q,|	d|
djo$|i|�i|�|||<q,|i|�i	|�|	||<qK|	|
jo|i|�i
�qK|iitd�|td�td�fd�o|i|�i
�qKqKWx�|i�D]�\}}||joq=q=||jo$|i|�i|�|||<q=|||joc|iitd	�|td�td�fd�djo$|i|�i|�|||<qq=q=Wt||�dS(
NisU subrepository sources for %s differ
use (l)ocal source (%s) or (r)emote source (%s)?s&Locals&RemoteisW local changed subrepository %s which remote removed
use (c)hanged version or (d)elete?s&Changeds&DeletesW remote changed subrepository %s which local removed
use (c)hanged version or (d)elete?(tp1tsubstateRRt	nullstatetsubtuitpromptchoiceRtmergetremoveR (Rtwctxtmctxtactxts1ts2tsatsmRRtatr((s$/sys/lib/python/mercurial/subrepo.pytsubmerge/sf
			




		
		


		%cCs�t|d�o�|i}|id�p
d|jo|Snt|i�}d|jo/|ddjo|d }n|d|Sntii||i�Sn|o3|ii	dd�o|ii	dd|i
�Sn|ii	dd|i
�S(Nt
_subparentt/s://i�tpathssdefault-pushtdefault(thasattrt
_subsourcet
startswitht
_abssourceR3tosRRR%Rtroot(Rtpushtsourcetparent((s$/sys/lib/python/mercurial/subrepo.pyR:is	
cCsddk}|ati|ii�|�|ii|t�}|did�ot	i
d|d��nt|||�S(Ni�it[sunknown subrepo source %s(thgtutiltpath_auditort_repoR<R"RR#R9terrortAbortt	hgsubrepo(RRthR((s$/sys/lib/python/mercurial/subrepo.pytsubrepoxsRGcBsGeZd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(cCs�||_||_|i}|i|�}tiitii|d��oti	|i
|�|_n,ti|�ti	|i
|dt
�|_||i_|d|i_dS(Ns.hgtcreatei(t_patht_stateRDtwjoinR;RtexistsRRAt
repositoryR%RBtmakedirstTrueR3R8(tselfRRRR1R<((s$/sys/lib/python/mercurial/subrepo.pyt__init__�s			"
cCs[|id}|djotSn|id}|i�|i|jotSn|i�S(NiR(RLRQRDRR!tdirty(RRR1tw((s$/sys/lib/python/mercurial/subrepo.pyRT�s


cCsA|ii|||�}|p|idi�Snti|�S(Nt.(RDtcommitthextnode(RRttexttusertdatetn((s$/sys/lib/python/mercurial/subrepo.pyRW�scCs=|iiitd�|i�ti|itit	�dS(Nsremoving subrepo %s
(
RDR%tnoteRRKRAtcleanRYtnullidtFalse(RR((s$/sys/lib/python/mercurial/subrepo.pyR(�s cCs�|\}}y|ii|�Wnytij
oj||i_|iiitd�|i�t	|i�}t
i|ii|�}|ii|�nXt
i
|i|t�dS(Nspulling subrepo %s
(RDtlookupREt	RepoErrorR8R%tstatusRRKR:RAROtpullR_Ra(RRRR>Rtsrcurltother((s$/sys/lib/python/mercurial/subrepo.pyR�s cCs!ti|i|ddt�dS(Nitremind(RAR'RDRa(RRR((s$/sys/lib/python/mercurial/subrepo.pyR'�scCs�|id}|i}x*t|�D]}|i|�i|�q#W|iiitd�|i�t	|it
�}ti|ii|�}|ii||�dS(NRspushing subrepo %s
(
RDR"RR$R=R%RdRRKR:RQRARO(RRtforcetctsubsRtdsturlRg((s$/sys/lib/python/mercurial/subrepo.pyR=�s
	
 (	t__name__t
__module__RSRTRWR(RR'R=(((s$/sys/lib/python/mercurial/subrepo.pyRG�s	
					
	(RR(RR;ti18nRRRBRYRERRAR#RR R2RaR:RItobjectRG(((s$/sys/lib/python/mercurial/subrepo.pys<module>s0			:	

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.