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

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


�
�c@sddklZlZlZlZddklZddkZddkZddk	Z	ddk
Z
ddkZddkZddk
Z
e
iZdefd��YZdefd��YZdefd	��YZd
efd��YZdefd
��YZdefd��YZdS(i�(tnullidtnullrevtshortthex(t_Nt	changectxcBs�eZdZdd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
ed
��Zed��Z
ed��Zed
��Zed��Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&d%�Z'd&�Z(d'�Z)d,d,d(�Z+d)�Z,d*�Z-d+�Z.RS(-s]A changecontext object makes access to data related to a particular
    changeset convenient.tcCs�|djo
d}n||_t|ttf�o%||_|iii|�|_n1|ii|�|_|iii	|i�|_dS(s+changeid is a revision number, node, or tagRt.N(
t_repot
isinstancetlongtintt_revt	changelogtnodet_nodetlookuptrev(tselftrepotchangeid((s$/sys/lib/python/mercurial/context.pyt__init__s

		cCst|i��S(N(RR(R((s$/sys/lib/python/mercurial/context.pyt__str__scCs
|i�S(N(R(R((s$/sys/lib/python/mercurial/context.pyt__int__!scCsdt|�S(Ns<changectx %s>(tstr(R((s$/sys/lib/python/mercurial/context.pyt__repr__$scCs5yt|i�SWntj
ot|�SnXdS(N(thashRtAttributeErrortid(R((s$/sys/lib/python/mercurial/context.pyt__hash__'scCs2y|i|ijSWntj
otSnXdS(N(RRtFalse(Rtother((s$/sys/lib/python/mercurial/context.pyt__eq__-scCs||jS(N((RR((s$/sys/lib/python/mercurial/context.pyt__ne__3scCs
|itjS(N(RR(R((s$/sys/lib/python/mercurial/context.pyt__nonzero__6scCs|iii|i��S(N(RR
treadR(R((s$/sys/lib/python/mercurial/context.pyt
_changeset9scCs|iii|id�S(Ni(RtmanifestR#R$(R((s$/sys/lib/python/mercurial/context.pyt	_manifest=scCs|iii|id�S(Ni(RR%t	readdeltaR$(R((s$/sys/lib/python/mercurial/context.pyt_manifestdeltaAscCsb|iii|i�}|dtjo|d }ng}|D]}|t|i|�qB~S(Nii�(RR
t
parentrevsRRR(Rtpt_[1]tx((s$/sys/lib/python/mercurial/context.pyt_parentsEscCs
ti|�S(N(tsubrepotstate(R((s$/sys/lib/python/mercurial/context.pytsubstateLscCs
||ijS(N(R&(Rtkey((s$/sys/lib/python/mercurial/context.pyt__contains__PscCs
|i|�S(N(tfilectx(RR1((s$/sys/lib/python/mercurial/context.pyt__getitem__Ssccs#xt|i�D]}|VqWdS(N(tsortedR&(Rtf((s$/sys/lib/python/mercurial/context.pyt__iter__VscCs|iS(N(R$(R((s$/sys/lib/python/mercurial/context.pyt	changesetZscCs|iS(N(R&(R((s$/sys/lib/python/mercurial/context.pyR%[scCs|idS(Ni(R$(R((s$/sys/lib/python/mercurial/context.pytmanifestnode\scCs|iS(N(R(R((s$/sys/lib/python/mercurial/context.pyR^scCs|iS(N(R(R((s$/sys/lib/python/mercurial/context.pyR_scCs
t|i�S(N(RR(R((s$/sys/lib/python/mercurial/context.pyR`scCs|idS(Ni(R$(R((s$/sys/lib/python/mercurial/context.pytuserascCs|idS(Ni(R$(R((s$/sys/lib/python/mercurial/context.pytdatebscCs|idS(Ni(R$(R((s$/sys/lib/python/mercurial/context.pytfilescscCs|idS(Ni(R$(R((s$/sys/lib/python/mercurial/context.pytdescriptiondscCs|idid�S(Nitbranch(R$tget(R((s$/sys/lib/python/mercurial/context.pyR>escCs|idS(Ni(R$(R((s$/sys/lib/python/mercurial/context.pytextrafscCs|ii|i�S(N(RtnodetagsR(R((s$/sys/lib/python/mercurial/context.pyttagsgscCs|iS(s)return contexts for each parent changeset(R-(R((s$/sys/lib/python/mercurial/context.pytparentsiscCs|idS(Ni(R-(R((s$/sys/lib/python/mercurial/context.pytp1mscCs5t|i�djo|idSnt|id�S(Niii�(tlenR-RR(R((s$/sys/lib/python/mercurial/context.pytp2pscCsC|iii|i�}g}|D]}|t|i|�q#~S(s(return contexts for each child changeset(RR
tchildrenRR(RtcR+R,((s$/sys/lib/python/mercurial/context.pyRGusccs8x1|iii|i�D]}t|i|�VqWdS(N(RR
t	ancestorsRR(Rta((s$/sys/lib/python/mercurial/context.pyRIzsccs8x1|iii|i�D]}t|i|�VqWdS(N(RR
tdescendantsRR(Rtd((s$/sys/lib/python/mercurial/context.pyRK~scCsd|ijoYy!|i||ii|�fSWqitj
o%ti|i|td���qiXnd|ijp||i�jo5||i	jo!|i	||i	i|�fSq�n|i
ii|i
d|�\}}|p"ti|i|td���n||fS(NR&snot found in manifestR(i(t__dict__R&tflagstKeyErrorterrortLookupErrorRRR<R(RR%tfindR$(RtpathRtflag((s$/sys/lib/python/mercurial/context.pyt	_fileinfo�s!#%%cCs|i|�dS(Ni(RU(RRS((s$/sys/lib/python/mercurial/context.pytfilenode�scCs6y|i|�dSWntij
odSnXdS(NiR(RURPRQ(RRS((s$/sys/lib/python/mercurial/context.pyRN�sc	CsB|djo|i|�}nt|i|d|d|d|�S(s&get a file context from this changesettfileidRtfilelogN(tNoneRVR3R(RRSRWRX((s$/sys/lib/python/mercurial/context.pyR3�s
cCs.|iii|i|i�}t|i|�S(s<
        return the ancestor context of self and c2
        (RR
tancestorRR(Rtc2tn((s$/sys/lib/python/mercurial/context.pyRZ�sccs�t|i��}|id�xh|D]`}xA|D]9}||jp|id|�o|i|�Pq3q3W||�o	|Vq&q&WxGt|�D]9}|i|dt|��o||�o	|Vq�q�WdS(NRs%s/sNo such file in rev (tsetR<tdiscardt
startswithtremoveR5tbadR(Rtmatchtfsettfntffn((s$/sys/lib/python/mercurial/context.pytwalk�s
!
	


*cCsti||�S(N(R.(RRS((s$/sys/lib/python/mercurial/context.pytsub�sN(/t__name__t
__module__t__doc__RRRRRR R!R"t
propertycacheR$R&R(R-R0R2R4R7R8R%R9RRRR:R;R<R=R>R@RBRCRDRFRGRIRKRURVRNRYR3RZRfRg(((s$/sys/lib/python/mercurial/context.pyRsV																																		R3cBs�eZdZd'd'd'd'd�Zed��Zed��Zed��Zed��Z	ed��Z
ed��Zd�Zd	�Z
d
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d �Z$d!�Z%d"�Z&d#�Z'd$�Z(e)d'd%�Z*d&�Z+RS((saA filecontext object makes access to data related to a particular
       filerevision convenient.cCs�||_||_|dj	p1|dj	p$|dj	ptd|||f�|o
||_n|dj	o
||_n|dj	o
||_n|dj	o
||_ndS(sechangeid can be a changeset revision, node, or tag.
           fileid can be a file revision or node.s.bad args: changeid=%r, fileid=%r, changectx=%rN(Rt_pathRYtAssertionErrort_filelogt	_changeidt
_changectxt_fileid(RRRSRRWRXR((s$/sys/lib/python/mercurial/context.pyR�s		







cCst|i|i�S(N(RRRo(R((s$/sys/lib/python/mercurial/context.pyRp�scCs|ii|i�S(N(RtfileRl(R((s$/sys/lib/python/mercurial/context.pyRn�scCs8d|ijo|ii�Sn|ii|i�SdS(NRp(RMRpRRntlinkrevt_filerev(R((s$/sys/lib/python/mercurial/context.pyRo�scCs>d|ijo|ii|i�Sn|ii|i�SdS(NRq(RMRnRRqRpRVRl(R((s$/sys/lib/python/mercurial/context.pyt	_filenode�scCs|ii|i�S(N(RnRRu(R((s$/sys/lib/python/mercurial/context.pyRt�scCs|iS(N(Rl(R((s$/sys/lib/python/mercurial/context.pyt	_repopath�scCs0y|itSWntij
otSnXdS(N(RutTrueRPRQR(R((s$/sys/lib/python/mercurial/context.pyR"�s
cCs d|i�t|i��fS(Ns%s@%s(RSRR(R((s$/sys/lib/python/mercurial/context.pyR�scCsdt|�S(Ns<filectx %s>(R(R((s$/sys/lib/python/mercurial/context.pyRscCs>yt|i|if�SWntj
ot|�SnXdS(N(RRlRqRR(R((s$/sys/lib/python/mercurial/context.pyRscCsEy'|i|ijo|i|ijSWntj
otSnXdS(N(RlRqRR(RR((s$/sys/lib/python/mercurial/context.pyR 
s
cCs||jS(N((RR((s$/sys/lib/python/mercurial/context.pyR!scCs"t|i|id|d|i�S(sMopens an arbitrary revision of the file without
        opening a new filelogRWRX(R3RRlRn(RRW((s$/sys/lib/python/mercurial/context.pyR3scCs|iS(N(Rt(R((s$/sys/lib/python/mercurial/context.pytfilerevscCs|iS(N(Ru(R((s$/sys/lib/python/mercurial/context.pyRVscCs|ii|i�S(N(RpRNRl(R((s$/sys/lib/python/mercurial/context.pyRNscCs|iS(N(Rn(R((s$/sys/lib/python/mercurial/context.pyRXscCsUd|ijo|ii�Snd|ijo|ii�Sn|ii|i�S(NRpRo(RMRpRRnRsRt(R((s$/sys/lib/python/mercurial/context.pyRs
cCs|ii|i�S(N(RnRsRt(R((s$/sys/lib/python/mercurial/context.pyRs&scCs
|ii�S(N(RpR(R((s$/sys/lib/python/mercurial/context.pyR'scCst|i��S(N(RR(R((s$/sys/lib/python/mercurial/context.pyR(scCs
|ii�S(N(RpR:(R((s$/sys/lib/python/mercurial/context.pyR:)scCs
|ii�S(N(RpR;(R((s$/sys/lib/python/mercurial/context.pyR;*scCs
|ii�S(N(RpR<(R((s$/sys/lib/python/mercurial/context.pyR<+scCs
|ii�S(N(RpR=(R((s$/sys/lib/python/mercurial/context.pyR=,scCs
|ii�S(N(RpR>(R((s$/sys/lib/python/mercurial/context.pyR>-scCs
|ii�S(N(RpR%(R((s$/sys/lib/python/mercurial/context.pyR%.scCs|iS(N(Rp(R((s$/sys/lib/python/mercurial/context.pyR/scCs|ii|i�S(N(RnR#Ru(R((s$/sys/lib/python/mercurial/context.pytdata1scCs|iS(N(Rl(R((s$/sys/lib/python/mercurial/context.pyRS2scCs|ii|i�S(N(RntsizeRt(R((s$/sys/lib/python/mercurial/context.pyRz3scCs|ii|i|�S(N(RntcmpRu(Rttext((s$/sys/lib/python/mercurial/context.pyR{5scCs�|ii|i�}|p|Sn|i�|i�jo|Sn|i�}|i}xR|ii�D]A}y"||i|�jodSnWqjt
ij
oqjXqjW|S(s#check if file was actually renamed in this changeset revision

        If rename logged in file revision, we report copy for changeset only
        if file revisions linkrev points back to the changeset in question
        or both changeset parents contain different file revisions.
        N(RntrenamedRuRRsRSRpRCRVRYRPRQ(RR}tnametfnodeR*((s$/sys/lib/python/mercurial/context.pyR}7s		c	Cs�|i}|i}g}|ii|i�D]}||||fq,~}|ii|i�}|o|d|ddf|d<ng}|D]?\}}}|tjo#|t|i|d|d|�q�q�~S(NiiRWRX(	RlRnRCRuR}RYRR3R(	RR*tflR+R\tpltrt_[2]tl((s$/sys/lib/python/mercurial/context.pyRCPs		9c
CsR|ii|i�}g}|D]+}|t|i|id|d|i�q ~S(NRWRX(RnRGRuR3RRl(RRHR+R,((s$/sys/lib/python/mercurial/context.pyRG\scs�d�}d�}d�}|d
jo|p|o|p|}d�}ti�fd�����fd��ti������fd�}�i��i�jo�i�i��}	n�}	hd|	<}
|	g}|	ig}x�|o�|id	�}
xp||
�D]b}||
jo?d|
|<|i	|�|i|jo|i	|i�q~q|
|cd7<qWq�g}x\|D]T}
g}|
D]-}|i|
jo||i�|fq�q�~}|i
|�q�Wh}x�t|�D]�\}}
||
i�|
�}x^||
�D]P}|t
jo=||||�}|
|cd8<|
|p||=q}q-q-W|||
<q�||
d	||
dit��S(sreturns a list of tuples of (ctx, line) for each line
        in the file, where ctx is the filectx of the node where
        that line was last changed.
        This returns tuples of ((ctx, linenumber), line) for each line,
        if "linenumber" parameter is NOT "None".
        In such tuples, linenumber means one at the first appearance
        in the managed file.
        To reduce annotation cost,
        this returns fixed value(False is used) as linenumber,
        if "linenumber" parameter is "False".cSs|gt|i��|fS(N(REt
splitlines(R|R((s$/sys/lib/python/mercurial/context.pytdecorate_compatnscSs#|tfgt|i��|fS(N(RRER�(R|R((s$/sys/lib/python/mercurial/context.pytwithout_linenumberqscSsJt|i��}g}td|d�D]}|||fq*~|fS(Ni(RER�txrange(R|RRzR+ti((s$/sys/lib/python/mercurial/context.pytwith_linenumbertscSsQxJti|d|d�D].\}}}}|d||!|d||+qW|S(Nii(tbdifftblocks(tparenttchildta1ta2tb1tb2((s$/sys/lib/python/mercurial/context.pytpair|s cs�ii|�S((RRr(R,(R(s$/sys/lib/python/mercurial/context.pyt<lambda>�scsB|�ijo
�ip
�|�}t�i|d|d|�S(NRWRX(RlRnR3R(RSRWtlog(Rtgetlog(s$/sys/lib/python/mercurial/context.pytgetctx�s&cs|i}|idjo=g}|i�D]}||i�|i�fq*~}n7g}|ii|i�D]}|||fqp~}�oF|i�}|o/|d�|d�i	|d�f|d<q�ng}|D]-\}}|t
jo|�||�q�q�S(Nii(RlRtRYRCRSRxRnR)R}RR(R6R*R+R\R�R�R�t_[3](R�R�tfollow(s$/sys/lib/python/mercurial/context.pyRC�s	=63iiN(RYtutiltlrucachefuncRRsR3RxRltpoptappendtextendR5RyRtzipR�Rw(RR�t
linenumberR�R�R�tdecorateR�RCtbasetneededtvisitR<R6R*R+R\RdthistR�tcurr((R�R�R�Rs$/sys/lib/python/mercurial/context.pytannotatebsZ					




A


cs+h�xt�|fD]f}|idjoPg}|i�D]}||i�|i�fq:~}|�|idf<qqWh�i�i<|i|i<����fd�}�i�if|i|if}}t	i	|||�}	|	o0|	\}
}t
�i|
d|d�|
�SndS(sQ
        find the common ancestor file context, if any, of self, and fc2
        cs�|�jo�|Sn|\}}|�jo�ii|��|<n�|}g}|i|�D]$}|tjo|||fqjqj~}|i|�}|o|i|�n|�|<|S(N(RRrRCRR}R�(tvertexR6R\R�R+R*R�tre(Rtacachetflcache(s$/sys/lib/python/mercurial/context.pyRC�s


A
RWRXN(RtRYRCRSRVRlRnRvRuRZR3R(Rtfc2RHR+R\R�RCRJtbtvR6((RR�R�s$/sys/lib/python/mercurial/context.pyRZ�s
9$%$N(,RhRiRjRYRRkRpRnRoRuRtRvR"RRRR R!R3RxRVRNRXRRsRRR:R;R<R=R>R%RRyRSRzR{R}RCRGRR�RZ(((s$/sys/lib/python/mercurial/context.pyR3�sP																													^t
workingctxcBsIeZdZddddddd�Zd�Zd�Zd�Zed��Z	ed��Z
ed��Zed	��Zed
��Z
d�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Zd�Zd�Z e!d�Z"RS( s�A workingctx object makes access to data related to
    the current working directory convenient.
    parents - a pair of parent nodeids, or None to use the dirstate.
    date - any valid date string or (unixtime, offset), or None.
    user - username string, or None.
    extra - a dictionary of extra values, or None.
    changes - a list of file lists as returned by localrepo.status()
               or None to use the repository status.
    RcCsp||_d|_d|_||_|oti|�|_n|o
||_n|o4g}|D]}	|t	|i|	�qg~|_
n|ot|�|_nh|_
|o|i�|_
nd|i
joj|iii�}
y|
id�id�}
Wn(tj
otitd���nX|
|i
d<n|i
ddjod|i
d<ndS(NR>sUTF-8sbranch name not in UTF-8!Rtdefault(RRYRRt_textR�t	parsedatet_datet_userRR-tlistt_statust_extratcopytdirstateR>tdecodetencodetUnicodeDecodeErrortAbortR(RRRCR|R:R;R@tchangesR+R*R>((s$/sys/lib/python/mercurial/context.pyR�s0				
4	cCst|id�dS(Nit+(RR-(R((s$/sys/lib/python/mercurial/context.pyR
scCstS(N(Rw(R((s$/sys/lib/python/mercurial/context.pyR"
scCs|ii|djS(Ns?r(RR�(RR1((s$/sys/lib/python/mercurial/context.pyR2scs8|idi�i��|iii����fd�}|iii|�}|id \}}}}}x�d|fd|fd|ffD]s\}}	xd|	D]\}
�i�i|
|
�t	�|�|
<y�i
|
||
��Wq�tj
oq�Xq�Wq�Wx*||D]}
|
�jo�|
=qqW�S(s:generate a manifest corresponding to the working directoryics�i�i||��S((RNR?(R,(tcopiedtman(s$/sys/lib/python/mercurial/context.pyR�siRJtmtu(R-R%R�RR�tcopiestflagfuncR�R?RR]tOSError(RtcftfftmodifiedtaddedtremovedtdeletedtunknownR�R�R6((R�R�s$/sys/lib/python/mercurial/context.pyR&s&"&

cCs|iidt�S(NR�(RtstatusRw(R((s$/sys/lib/python/mercurial/context.pyR�*scCs|iii�S(N(Rtuitusername(R((s$/sys/lib/python/mercurial/context.pyR�.scCs
ti�S(N(R�tmakedate(R((s$/sys/lib/python/mercurial/context.pyR�2scCsh|iii�}|dtjo|d }ng}|D]}|t|i|�q<~|_|iS(Nii�(RR�RCRRR-(RR*R+R,((s$/sys/lib/python/mercurial/context.pyR-6s
0cCs|iS(N(R&(R((s$/sys/lib/python/mercurial/context.pyR%>scCs|ip|iii�S(N(R�RR�R�(R((s$/sys/lib/python/mercurial/context.pyR:@scCs|iS(N(R�(R((s$/sys/lib/python/mercurial/context.pyR;AscCs|iS(N(R�(R((s$/sys/lib/python/mercurial/context.pyR=BscCs't|id|id|id�S(Niii(R5R�(R((s$/sys/lib/python/mercurial/context.pyR<CscCs|idS(Ni(R�(R((s$/sys/lib/python/mercurial/context.pyR�FscCs|idS(Ni(R�(R((s$/sys/lib/python/mercurial/context.pyR�GscCs|idS(Ni(R�(R((s$/sys/lib/python/mercurial/context.pyR�HscCs|idS(Ni(R�(R((s$/sys/lib/python/mercurial/context.pyR�IscCs|idS(Ni(R�(R((s$/sys/lib/python/mercurial/context.pyR�JscCs|idS(Ni(R�(R((s$/sys/lib/python/mercurial/context.pytcleanKscCs|idS(NR>(R�(R((s$/sys/lib/python/mercurial/context.pyR>LscCs|iS(N(R�(R((s$/sys/lib/python/mercurial/context.pyR@MscCs>g}g}|i�D]}||i|i��q~|S(N(RCR�RB(RttR+R*((s$/sys/lib/python/mercurial/context.pyRBOs4cCsgS(N((R((s$/sys/lib/python/mercurial/context.pyRGTsc	sd|ijo2y|ii|�SWqBtj
odSqBXn|idi�d}|iii�i	||�}|ii
i||�\}�y,|iii�fd��}||�SWnt
j
onX|p&||i�jp||i�jodSn�S(NR&Rics�pdS(R((R,(RT(s$/sys/lib/python/mercurial/context.pyR�bs(RMR&RNROR-R8RR�R�R?R%RRR�R�R�R�(RRStpnodetorigRR�((RTs$/sys/lib/python/mercurial/context.pyRNWs 
.cCst|i|d|d|�S(s-get a file context from the working directoryR�RX(tworkingfilectxR(RRSRX((s$/sys/lib/python/mercurial/context.pyR3kscCs|idi|�S(s*return the ancestor context of self and c2i(R-RZ(RR[((s$/sys/lib/python/mercurial/context.pyRZpscCst|iii|tt��S(N(R5RR�RfRwR(RRb((s$/sys/lib/python/mercurial/context.pyRftscCsd|i�pW|i�|i�i�jp8|i�p+|i�p|i�p|o
|i�S(s-check whether a working directory is modified(RFR>RDR�R�R�R�(Rtmissing((s$/sys/lib/python/mercurial/context.pytdirtyws,'N(#RhRiRjRYRRR"R2RkR&R�R�R�R-R%R:R;R=R<R�R�R�R�R�R�R>R@RBRGRNR3RZRfRR�(((s$/sys/lib/python/mercurial/context.pyR��s>																						R�cBs}eZdZddd�Zed��Zd�Zd�Zd�Z	d�Z
d�Zd�Zd	�Z
d
�Zd�ZRS(
suA workingfilectx object makes access to data related to a particular
       file in the working directory convenient.cCsW||_||_d|_d|_|_|o
||_n|o
||_ndS(sechangeid can be a changeset revision, node, or tag.
           fileid can be a file revision or node.N(RRlRYRoRtRuRnRp(RRRSRXR�((s$/sys/lib/python/mercurial/context.pyR�s			
cCs
t|i�S(N(R�R(R((s$/sys/lib/python/mercurial/context.pyRp�scCstS(N(Rw(R((s$/sys/lib/python/mercurial/context.pyR"�scCsd|i�|ifS(Ns%s@%s(RSRp(R((s$/sys/lib/python/mercurial/context.pyR�scCs|ii|i�S(N(RtwreadRl(R((s$/sys/lib/python/mercurial/context.pyRy�scCsJ|iii|i�}|pdSn||iidii|t	�fS(Ni(
RR�R�RlRYRpR-R&R?R(Rtrp((s$/sys/lib/python/mercurial/context.pyR}�sc
Cs�d�}|i}|i}|ii}|i�}|o|dg}n |||d|�|fg}x1|dD]%}|i||||�|f�quWg}|D]?\}	}
}|
tjo#|t|i	|	d|
d|�q�q�~S(s5return parent filectxs, following copies if necessarycSs|ii|t�S(N(R&R?R(tctxRS((s$/sys/lib/python/mercurial/context.pyRV�siiRWRXN(N(
RlRnRpR-R}RYR�RR3R(RRVRSR�tpclR}R�tpcR+R*R\R�((s$/sys/lib/python/mercurial/context.pyRC�s			#cCsgS(N((R((s$/sys/lib/python/mercurial/context.pyRG�scCsti|ii|i��iS(N(toststatRtwjoinRltst_size(R((s$/sys/lib/python/mercurial/context.pyRz�scCs�|ii�\}}y/tti|ii|i��i�|fSWn9t	j
o-}|i
t
ijo�n||fSnXdS(N(RpR;RR�tlstatRR�Rltst_mtimeR�terrnotENOENT(RR�ttzterr((s$/sys/lib/python/mercurial/context.pyR;�s/cCs|ii|i�|jS(N(RR�Rl(RR|((s$/sys/lib/python/mercurial/context.pyR{�sN(RhRiRjRYRRkRpR"RRyR}RCRGRzR;R{(((s$/sys/lib/python/mercurial/context.pyR�~s
								tmemctxcBs�eZdZdddd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�ZRS(s;Use memctx to perform in-memory commits via localrepo.commitctx().

    Revision information is supplied at initialization time while
    related files data and is made available through a callback
    mechanism.  'repo' is the current localrepo, 'parents' is a
    sequence of two parent revisions identifiers (pass None for every
    missing parent), 'text' is the commit message and 'files' lists
    names of files touched by the revision (normalized and relative to
    repository root).

    filectxfn(repo, memctx, path) is a callable receiving the
    repository, the current memctx object and the normalized path of
    requested file, relative to repository root. It is fired by the
    commit function for every file in 'files', but calls order is
    undefined. If the file is available in the revision being
    committed (updated or added), filectxfn returns a memfilectx
    object. If the file was removed, filectxfn raises an
    IOError. Moved files are represented by marking the source file
    removed and the new file added with copy information (see
    memfilectx).

    user receives the committer name and defaults to current
    repository username, date is the commit date in any format
    supported by util.parsedate() and defaults to current date, extra
    is a dictionary of metadata or is left empty.
    c		Cs\||_d|_d|_||_|oti|�p
ti�|_||_	g}	|D]}
|	|
pt
q^~	}|\}}g}
||fD]}
|
t|i|
�q�~
|_t
t|��}|ggggg|_||_|o
|i�ph|_d|ijod|id<n+|iid�djod|id<ndS(NR>R�R(RRYRRR�R�R�R�R�R�RRR-R5R]R�t
_filectxfnR�R�R?(RRRCR|R<t	filectxfnR:R;R@R+R*RDRFR�((s$/sys/lib/python/mercurial/context.pyR�s"				&	(6	cCst|id�dS(NiR�(RR-(R((s$/sys/lib/python/mercurial/context.pyR�scCs|iS(N(R(R((s$/sys/lib/python/mercurial/context.pyR�scCstS(N(Rw(R((s$/sys/lib/python/mercurial/context.pyR"�scCs
|i|�S(N(R3(RR1((s$/sys/lib/python/mercurial/context.pyR4�scCs|idS(Ni(R-(R((s$/sys/lib/python/mercurial/context.pyRD�scCs|idS(Ni(R-(R((s$/sys/lib/python/mercurial/context.pyRF�scCs|ip|iii�S(N(R�RR�R�(R((s$/sys/lib/python/mercurial/context.pyR:scCs|iS(N(R�(R((s$/sys/lib/python/mercurial/context.pyR;scCs|iS(N(R�(R((s$/sys/lib/python/mercurial/context.pyR=scCs
|i�S(N(R�(R((s$/sys/lib/python/mercurial/context.pyR<scCs|idS(Ni(R�(R((s$/sys/lib/python/mercurial/context.pyR�scCs|idS(Ni(R�(R((s$/sys/lib/python/mercurial/context.pyR�scCs|idS(Ni(R�(R((s$/sys/lib/python/mercurial/context.pyR�scCs|idS(Ni(R�(R((s$/sys/lib/python/mercurial/context.pyR�scCs|idS(Ni(R�(R((s$/sys/lib/python/mercurial/context.pyR�	scCs|idS(Ni(R�(R((s$/sys/lib/python/mercurial/context.pyR�
scCs|idS(NR>(R�(R((s$/sys/lib/python/mercurial/context.pyR>scCs|iS(N(R�(R((s$/sys/lib/python/mercurial/context.pyR@scCs||i�S(N(RN(RR6((s$/sys/lib/python/mercurial/context.pyRN
scCs|iS(s)return contexts for each parent changeset(R-(R((s$/sys/lib/python/mercurial/context.pyRCscCs|i|i||�S(s-get a file context from the working directory(R�R(RRSRX((s$/sys/lib/python/mercurial/context.pyR3sN(RhRiRjRYRRRR"R4RDRFR:R;R=R<R�R�R�R�R�R�R>R@RNRCR3(((s$/sys/lib/python/mercurial/context.pyR��s0																				t
memfilectxcBs_eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�ZRS(
sYmemfilectx represents an in-memory file to commit.

    See memctx for more details.
    cCsb||_||_|odpd|odpd|_d|_|o|tf|_ndS(sQ
        path is the normalized file path relative to repository root.
        data is the file content as a string.
        islink is True if the file is a symbolic link.
        isexec is True if the file is executable.
        copied is the source file path if current file was copied in the
        revision being committed, or None.R�RR,N(Rlt_datat_flagsRYt_copiedR(RRSRytislinktisexecR�((s$/sys/lib/python/mercurial/context.pyRs		)	cCstS(N(Rw(R((s$/sys/lib/python/mercurial/context.pyR"+scCsd|i�|ifS(Ns%s@%s(RSRp(R((s$/sys/lib/python/mercurial/context.pyR,scCs|iS(N(Rl(R((s$/sys/lib/python/mercurial/context.pyRS-scCs|iS(N(R�(R((s$/sys/lib/python/mercurial/context.pyRy.scCs|iS(N(R�(R((s$/sys/lib/python/mercurial/context.pyRN/scCs
d|ijS(NR,(R�(R((s$/sys/lib/python/mercurial/context.pyR�0scCs
d|ijS(NR�(R�(R((s$/sys/lib/python/mercurial/context.pyR�1scCs|iS(N(R�(R((s$/sys/lib/python/mercurial/context.pyR}2s(RhRiRjRR"RRSRyRNR�R�R}(((s$/sys/lib/python/mercurial/context.pyR�s								(RRRRRti18nRRZR�RPR�R.R�R�RktobjectRR3R�R�R�R�(((s$/sys/lib/python/mercurial/context.pys<module>s"<	���DU

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.