�
�c
@s�ddklZddkZddkZddkZddkZddkZddkZdefd��YZ deifd��YZ
dS(i�(t_NtmanifestdictcBs2eZddd�Zd�Zd�Zd�ZRS(cCsK|djo
h}n|djo
h}nti||�||_dS(N(tNonetdictt__init__t_flags(tselftmappingtflags((s%/sys/lib/python/mercurial/manifest.pyR
scCs|ii|d�S(Nt(Rtget(Rtf((s%/sys/lib/python/mercurial/manifest.pyRscCs||i|<dS(N(R(RRR((s%/sys/lib/python/mercurial/manifest.pytsetscCs"tti|�ti|i��S(N(RRtcopyR(R((s%/sys/lib/python/mercurial/manifest.pyR
sN(t__name__t
__module__RRRRR
(((s%/sys/lib/python/mercurial/manifest.pyRs tmanifestcBsVeZd�Zd�Zd�Zd�Zddd�Zd�Zdddd�Z RS( cCs,d|_d|_tii||d�dS(Ns00manifest.i(Rtmapcachet listcachetrevlogR(Rtopener((s%/sys/lib/python/mercurial/manifest.pyRs cCs#t�}ti||i|�|S(N(Rtparserstparse_manifestR(Rtlinestmfdict((s%/sys/lib/python/mercurial/manifest.pytparses cCs5|i|�}|iti|i|d|���S(Ni(trevRtmdifft patchtexttrevdiff(Rtnodetr((s%/sys/lib/python/mercurial/manifest.pyt readdelta$scCs�|tijot�Sn|io#|id|jo|idSn|i|�}tid|�|_|i|�}||f|_|S(Niitc(RtnullidRRtrevisiontarrayRR(RRttextR((s%/sys/lib/python/mercurial/manifest.pytread(sic
sJ��fd�}|p||fSnt���|p
�}nx�||jo�||d}|}x1|djo#�|ddjo|d8}qkW||d�}�||!|jo||dd�d}qG|}qGW||d�}�||!} t|| �djo%||dd�}||dfSn||fSdS( s�return a tuple (start, end) that says where to find s within m.
If the string is found m[start:end] are the line containing
that string. If start == end the string was not found and
they indicate the proper sorted insertion point. This was
taken from bisect_left, and modified to find line start/end as
it goes along.
m should be a buffer or a string
s is a stringcs4x-|�jo�||jo|d7}qW|S(Ni((tiR!(tmtlenm(s%/sys/lib/python/mercurial/manifest.pytadvance>s!iiis
ti(N(tlentcmp(
RR(tstlothiR*tmidtstarttendtfound((R(R)s%/sys/lib/python/mercurial/manifest.pyt_search3s*
%
cCs�|ioB||idjo.|idi|�|idi|�fSn|i|�}|i||�\}}||jodSn|||!}|id�\}}ti|d �|dd!fS(smlook up entry for a single file efficiently.
return (node, flags) pair if found, (None, None) if not.iiR+i(i�N(NN( RR
RR#R5RtsplitRtbin(RRRR%R2R3tltn((s%/sys/lib/python/mercurial/manifest.pytfind]s.
c
Csrd�}d�}|o"|io|o|id|jp�t|�} || �ti|i}
}g}| D]*}
|d|
|
||
�||
�fqr~}tiddi|��|_d}nl|i}||d�g}|dD]}||dgq�}g}|dD]}||dgq~|t |�)|i
�g}d}d}dg}d}t|�}xN|D]F}|d}
|i||
|�\}}|ddjo-d|
ti||
�|i|
�f}nd}||jo+|ddjot
td�|
��n|djoM||jo@||jo3||jo
|}n|o|i|�q�q�|djo#|i||di|�g�n|}|}|g}q�W|djo#|i||di|�g�n|||�}|id|i�jo
d}n||_|it|i�|||||�}||f|_|S( NcSs�t|�}xv|djoh|d8}||d}||d}||do%tid||d�|||+q|||5qWdig}|D]9}|tid|d|dt|d��|dq�~�S(NiiiR!R s>lll(R,R$tjointstructtpack(taddlisttxR'R2R3t_[1]td((s%/sys/lib/python/mercurial/manifest.pytaddlistdeltans
%
cSsLxE|D]=}d|jp
d|jotitd�|��qqWdS(Ns
s
s)'\n' and '\r' disallowed in filenames: %r(terrortRevlogErrorR(R8R((s%/sys/lib/python/mercurial/manifest.pytcheckforbidden}s
is%s%s%s
R!R is!failed to remove %s from manifest(RRtsortedRthexRR$R;RR,tsorttbufferR5tAssertionErrorRtappendttiptaddrevision(Rtmapttransactiontlinktp1tp2tchangedRBREtfilesRGRR@RR%t
cachedeltaR>t_[2]R?tworkt_[3]tdeltatdstarttdendtdlineR2taddbuftwR3R8R9((s%/sys/lib/python/mercurial/manifest.pytaddjsf ,
7
+5
-'
#
#
N(
RRRRR R&RR5R:R_(((s%/sys/lib/python/mercurial/manifest.pyRs *
(ti18nRRRRCRR$R<RRR(((s%/sys/lib/python/mercurial/manifest.pys<module>s0
|