Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/site-packages/mercurial/manifest.pyc

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


��c@s�ddlmZddlZddlZddlZddlZddlZddlZddlZddl	Z	de
fd��YZdejfd��YZdS(i�(t_NtmanifestdictcBsDeZddd�Zd�Zd�Zd�Zd�Zd�ZRS(cCsG|dkri}n|dkr*i}ntj||�||_dS(N(tNonetdictt__init__t_flags(tselftmappingtflags((s6/sys/lib/python2.7/site-packages/mercurial/manifest.pyR
s		cCs|jj|d�S(Nt(Rtget(Rtf((s6/sys/lib/python2.7/site-packages/mercurial/manifest.pyRscCst|jj��S(N(tsetRtkeys(R((s6/sys/lib/python2.7/site-packages/mercurial/manifest.pyt	withflagsscCs||j|<dS(N(R(RRR((s6/sys/lib/python2.7/site-packages/mercurial/manifest.pyRscCst|tj|j��S(N(RRtcopyR(R((s6/sys/lib/python2.7/site-packages/mercurial/manifest.pyRscCstj|j|jd�S(NR	(tdicthelperstdiffR(Rtd2((s6/sys/lib/python2.7/site-packages/mercurial/manifest.pyt	flagsdiffsN(	t__name__t
__module__RRRRRRR(((s6/sys/lib/python2.7/site-packages/mercurial/manifest.pyRs				tmanifestcBs_eZd�Zd�Zd�Zd�Zd�Zdd	d�Zd�Z	d	d	d	d�Z
RS(
cCs,tjd�|_tjj||d�dS(Nis00manifest.i(tutiltlrucachedictt	_mancachetrevlogR(Rtopener((s6/sys/lib/python2.7/site-packages/mercurial/manifest.pyR scCs#t�}tj||j|�|S(N(Rtparserstparse_manifestR(Rtlinestmfdict((s6/sys/lib/python2.7/site-packages/mercurial/manifest.pytparse%s	cCs:|j|�}|jtj|j|j|�|���S(N(trevR tmdifft	patchtexttrevdifftdeltaparent(Rtnodetr((s6/sys/lib/python2.7/site-packages/mercurial/manifest.pyt	readdelta*scCs\|j|�}|j|�}|tjkrO||j|�krO|j|�S|j|�S(s#use the faster of readdelta or read(R!R%Rtnullrevt
parentrevsR(tread(RR&R'R%((s6/sys/lib/python2.7/site-packages/mercurial/manifest.pytreadfast.s
$
cCs{|tjkrt�S||jkr4|j|dS|j|�}tjd|�}|j|�}||f|j|<|S(Nitc(RtnullidRRtrevisiontarrayR (RR&ttextt	arraytextR((s6/sys/lib/python2.7/site-packages/mercurial/manifest.pyR+6sic
s.��fd�}|s"||fSt���|s=�}nx�||kr�||d}|}x.|dkr��|ddkr�|d8}qcW||d�}�||!|kr�||dd�d}q@|}q@W||d�}�||!}	||	kr ||dd�}||dfS||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.

        m should be a buffer or a string
        s is a stringcs1x*|�kr,�||kr,|d7}qW|S(Ni((tiR-(tlenmtm(s6/sys/lib/python2.7/site-packages/mercurial/manifest.pytadvanceJsiiis
ti(N(tlen(
RR5tstlothiR6tmidtstarttendtfound((R4R5s6/sys/lib/python2.7/site-packages/mercurial/manifest.pyt_searchAs*	
	#

c	Cs�||jkr<|j|d}|j|�|j|�fS|j|�}|j||�\}}||krsdS|||!}|jd�\}}tj|d �|dd!fS(smlook up entry for a single file efficiently.
        return (node, flags) pair if found, (None, None) if not.iR7i(i�N(NN(	RR
RR/R@RtsplitRtbin(	RR&RRR1R=R>tltn((s6/sys/lib/python2.7/site-packages/mercurial/manifest.pytfindis
c
s�d�}d�}|o*|o*||jks�t��}	||	�tj�j��dj���fd�|	D��}
tjd|
�}d}n(|\}
}|j|d}||
�g|
D]}|tf^q�}|j	d�|D��|j
�g}d}d}dg}d}tj|�}x!|D]\}}|j
|||�\}}|s�d	|tj�|��j|�f}n+||kr�ttd
�|��nd}|dk	r
||kr
||kr
||kr�}n|rM|j|�qMq4|dk	r8|j||dj|�g�n|}|}|g}q4W|dk	r|j||dj|�g�n|||�\}}|j|�|f}|}tj|�}
|j|
|||||�}�|f|j|<|S(NcSs�d}tjd�}xM|D]E\}}}||||!7}|r[|tjd|�7}n|}qW|||7}djd�|D��}||fS(NiR-R	css:|]0\}}}tjd||t|��|VqdS(s>lllN(tstructtpackR8(t.0R=R>tcontent((s6/sys/lib/python2.7/site-packages/mercurial/manifest.pys	<genexpr>�s(R0tjoin(taddlisttxtcurrentpositiont
newaddlistR=R>RIt	deltatext((s6/sys/lib/python2.7/site-packages/mercurial/manifest.pytaddlistdelta{s

cSsIxB|D]:}d|ks%d|krtjtd�|��qqWdS(Ns
s
s)'\n' and '\r' disallowed in filenames: %r(terrortRevlogErrorR(RCR((s6/sys/lib/python2.7/site-packages/mercurial/manifest.pytcheckforbidden�s
R	c3s2|](}d|��|��|�fVqdS(s%s%s%s
N((RHR(Rthextmap(s6/sys/lib/python2.7/site-packages/mercurial/manifest.pys	<genexpr>�sR-icss|]}|tfVqdS(N(tTrue(RHRL((s6/sys/lib/python2.7/site-packages/mercurial/manifest.pys	<genexpr>�sis%s%s%s
s!failed to remove %s from manifest(RtsortedRRTRRJR0RtFalsetextendtsortRtbufferR@tAssertionErrorRtappendR!taddrevision(RRUttransactiontlinktp1tp2tchangedRPRStfilesR1R2t
cachedeltataddedtremovedRKRLtworktdeltatdstarttdendtdlineR=taddbufRttodeleteR>RCRORD((RRTRUs6/sys/lib/python2.7/site-packages/mercurial/manifest.pytaddwsb		

	

	,$	"
"N(RRRR R(R,R+RR@RERo(((s6/sys/lib/python2.7/site-packages/mercurial/manifest.pyRs					(	(
ti18nRR"RRQRRRR0RFRRR(((s6/sys/lib/python2.7/site-packages/mercurial/manifest.pyt<module>sH

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.