HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //proc/self/root/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyc
�
1�3\c@@s�ddlmZddlZddlZddlZddlmZddlmZm	Z	m
Z
mZddlm
Z
mZmZmZmZmZmZejd�Zejd�Zejd	�Zd
ZejZd�Zd�Zd
�Zd�Zed�Z de!fd��YZ"de"fd��YZ#de#fd��YZ$de!fd��YZ%d�Z&d�Z'd�Z(ee)eeed�Z*de!fd��YZ+e)e)eed�Z,e)e)eed�Z-e)e)eed �Z.ie,e"fd!6e-e#fd"6e.e$fd#6Z/d$�Z0d%�Z1d&�Z2d'�Z3d(�Z4eeee)e)eed)�Z5ed*�Z6d+�Z7e)ed,�Z8e)eed-�Z9d.�Z:dS(/i(tabsolute_importNi(t_(thextnullidtnullrevtshort(terrortmatchtmdifftphasestpycompatt
repositorytutilt20s20s20s20st20s20s20s20s20ss>20s20s20s20s20sHtlfscC@sht|d�}tjd|�d}|dkrW|rStjtd�|��ndSt||d�S(s-return the next chunk from stream as a stringis>lisinvalid chunk length %dt(treadexactlytstructtunpackRtAbortR(tstreamtdtl((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytgetchunk(scC@stjd|d�S(s*return a changegroup chunk header (string)s>li(Rtpack(tlength((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytchunkheader2scC@stjdd�S(sBreturn a changegroup chunk header (string) for a zero-length chunks>li(RR(((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt
closechunk6scC@stt|��|S(s3Obtain a changegroup chunk header for a named path.(Rtlen(tpath((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt_fileheader:scC@s�d}d}z�|rE|r0|j|d�}qut|dd�}n0tjdddd�\}}tj|d�}|}x|D]}|j|�q�Wd}|SWd|dk	r�|j�n|dk	r�|r�|r�|j|�q�tj|�nXdS(s�Write chunks to a file and return its filename.

    The stream is assumed to be a bundle file.
    Existing files will not be overwritten.
    If no filename is specified, a temporary file is created.
    twbitprefixs
hg-bundle-tsuffixs.hgN(	tNonetopenR
tmkstemptostfdopentwritetclosetunlink(tuitchunkstfilenametvfstfhtcleanuptfdtc((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytwritechunks>s(

tcg1unpackercB@s�eZdZeZejZdZdZdd�Z
d�Zd�Zd�Z
d�Zd�Zd	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zejdd�Zd�ZRS(s�Unpacker for cg1 changegroup streams.

    A changegroup unpacker handles the framing of the revision data in
    the wire format. Most consumers will want to use the apply()
    method to add the changes from the changegroup to a repository.

    If you're forwarding a changegroup unmodified to another consumer,
    use getchunks(), which returns an iterator of changegroup
    chunks. This is mostly useful for cases where you need to know the
    data stream has ended by observing the end of the changegroup.

    deltachunk() is useful only if you're applying delta data. Most
    consumers should prefer apply() instead.

    A few other public methods exist. Those are used only for
    bundlerepo and some debug commands - their use is discouraged.
    t01icC@s�|dkrd}n|tjjkrCtjtd�|��n|dkrXd}ntjj|�}|j|�|_	||_
|p�i|_d|_dS(NtUNs#unknown stream compression type: %stBZt_truncatedBZ(
R#RtcompenginestsupportedbundletypesRRRt
forbundletypetdecompressorreadert_streamt_typetextrastcallback(tselfR/talgR?t
compengine((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt__init__ws	
		cC@s|jdk	o|jdkS(NR6(R>R#(RA((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt
compressed�scC@s|jj|�S(N(R=tread(RAR((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyRF�scC@s|jj|�S(N(R=tseek(RAtpos((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyRG�scC@s
|jj�S(N(R=ttell(RA((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyRI�scC@s
|jj�S(N(R=R)(RA((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyR)�scC@sxt|jd�}tjd|�d}|dkrZ|rVtjtd�|��ndS|jrp|j�n|dS(Nis>lisinvalid chunk length %d(RR=RRRRRR@(RARR((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt_chunklength�s	
cC@siS(s*v10 does not have a changelog header chunk((RA((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytchangelogheader�scC@siS(s)v10 does not have a manifest header chunk((RA((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytmanifestheader�scC@s3|j�}|siSt|j|�}i|d6S(sBreturn the header of the filelogs chunk, v10 only has the filenameR-(RJRR=(RARtfname((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt
filelogheader�s
c	C@sI|\}}}}|dkr'|}n|}d}||||||fS(Ni(R#(	RAtheadertupletprevnodetnodetp1tp2tcst	deltabasetflags((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt_deltaheader�s	cC@s�|j�}|siSt|j|j�}|jj|�}t|j||j�}|j||�\}}}}	}
}||||
|	||fS(N(RJRR=tdeltaheadersizetdeltaheaderRRW(RARPRt
headerdatatheadertdeltaRQRRRSRURTRV((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt
deltachunk�s$cc@s�d}x�|d|jkr�t}x�tr�t|�}|sm|dkrV|d7}n|ri|d7}nPnt}tt|��Vd}x2|t|�kr�|d}|||!V|}q�Wq%Wt�Vq	WdS(s"returns all the chunks contains in the bundle

        Used when you need to forward the binary stream to a file or another
        network API. To do so, it parse the changegroup data, otherwise it will
        block in case of sshrepo because it don't know the end of the stream.
        iiiiNi(t_grouplistcounttTrueRtFalseRRR(RAtpartst	noentriestchunkRHtnext((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt	getchunks�s&	


cC@sX|j|_|j�|j�}|jjd�j|||�|j�d|_dS(NR(	t	incrementR@RLt	deltaitertmanifestlogt
getstoragetaddgrouptcompleteR#(RAtrepotrevmapttrptprogtdeltas((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt_unpackmanifests�s

c"@s��j����fd�}�fd�}d}	}
}zI|jjd|�}|jjd|�}�jddttj|j���j��j|�t	�j
���tj|�}�j
jtd��t����j
jtd	�d
td�d|�}
|
j|_t	���fd
�}|j�|j�}�j|||d|�}t���|s��j
jddd�nt��}|�}	|
j�d#|_�j
jtd���j
jtd�d
td�d|	�}
|j�|||
�i}�j
jdd�r��j��j}xxtj�|�D]a}�j|�j}||j �}x6|j!�D](\}}|j|t	��j"|�q�WqLWn�j
jtd��t#�|||�|�\}}||7}|
|7}
d}�rj�j
�}t|�t��}x:|D]/}|�kr4�|j$�r4|d8}q4q4Wnd}|r�td�|}n�j
jtd�|	||
|f��j%�|	dkr�d|jkr"t&�j'���|jd<t&�j'|d��|jd<t(|j��nEt(|j��t&�j'����d<t&�j'|d���d<�jddttj���ngtj�|�D]}�j'|�^q��d#} |d$kr��j)�r�t*j+}} q�t*j,}} n�rt*j-�||��n| d#k	r9t*j.�|| |�n|	dkr������fd ��|j/d!���fd"��nWd#�j
j0�X|dkr�|d}!n
|d}!|!S(%s�Add the changegroup returned by source.read() to this repo.
        srctype is a string like 'push', 'pull', or 'unbundle'.  url is
        the URL of the repo where this changegroup is coming from.

        Return an integer summarizing the change to this repo:
        - nothing changed or no source: 0
        - more heads than before: 1+added heads (2..n)
        - fewer heads than before: -1-removed heads (-2..-n)
        - number of heads stays the same: 1
        c@s$�jjdt|��t��S(Nsadd changeset %s
(R+tdebugRR(tx(tclRl(s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytcsmapsc@s
�j|�S(N(trev(Rs(Rt(s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyRmsitsourceturltprechangegrouptthrowsadding changesets
t
changesetstunitR,ttotalc@s�j|j|��dS(N(tupdatet	readfiles(RtRQ(tefiles(s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytonchangelog)st
addrevisioncbs(applied empty changelog from changegrouptconfigswarn-empty-changegroupsadding manifests
t	manifeststservertvalidatesadding file changes
iRs (%+d heads)s2added %d changesets with %d changes to %d files%s
RQt	node_lasttpretxnchangegrouptpushtservec
@s��t��krdS�jdtj���xJ�D]B}�j�}t|�|d<|d=�jdtj|��q6Wg�j�D]}|�kr�|^q�}�jjddt��dj	g|D]}t|d �^q���dS(NtchangegroupRQR�tincomings$%d incoming changes - new heads: %s
s, i(
RthookR
t	strkwargstcopyRtheadsR+tlogtjoin(tntargsthtnewheadsR2(taddedtclstartthookargstoldheadsRl(s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytrunhooks�s
	schangegroup-runhooks-%020ic@s
�j��S(N(t
_afterlock(ttr(RlR�(s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt<lambda>�RN(R�R�(1t
unfilteredR�t
setdefaultR�R_R
R�t	changelogtdelayupdatetsetR�tweakreftproxyR+tstatusRRtmakeprogressRfR@RKRgRjt	develwarnRkR#Rqt
configboolRhtxrangetchangelogrevisiontmanifestt	readdeltat	iteritemstaddt_addchangegroupfilestclosesbranchtinvalidatevolatilesetsRRQtdictt
publishingR	tpublictdrafttregisternewtadvanceboundarytaddpostclosetflush("RARlR�tsrctypeRxttargetphaset
expectedtotalRuRmR{tfilest	revisionsRntprogressR�Rptcgnodestclendt	needfilestmltcsettmfnodetmfesttfR�tnewrevstnewfilest
deltaheadsR�R�thtexttrtphasealltret((R�RtR�R�R�R�RlR�s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytapply�s�	
!		



	!			'



 .


c#@s?d�x2t��fd�i�D]}|V|d�q"WdS(s�
        returns an iterator of the deltas in this changegroup

        Useful for passing to the underlying storage system to be stored.
        c@s
�j��S(N(R]((tchainRA(s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyR��RiN(R#titer(RAt	chunkdata((R�RAs;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyRg�s"N(t__name__t
__module__t__doc__t_CHANGEGROUPV1_DELTA_HEADERRYtsizeRXtversionR^R#RDRERFRGRIR)RJRKRLRNRWR]ReRqR	R�R�Rg(((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyR4`s,													
	-	�tcg2unpackercB@s,eZdZeZejZdZd�ZRS(s�Unpacker for cg2 streams.

    cg2 streams add support for generaldelta, so the delta header
    format is slightly different. All other features about the data
    remain the same.
    t02c	C@s1|\}}}}}d}||||||fS(Ni((	RARORPRQRRRSRURTRV((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyRW�s(	R�R�R�t_CHANGEGROUPV2_DELTA_HEADERRYR�RXR�RW(((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyR��s
	tcg3unpackercB@s;eZdZeZejZdZdZd�Z	d�Z
RS(s�Unpacker for cg3 streams.

    cg3 streams add support for exchanging treemanifests and revlog
    flags. It adds the revlog flags to the delta header and an empty chunk
    separating manifests and files.
    t03ic	C@s.|\}}}}}}||||||fS(N((	RARORPRQRRRSRURTRV((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyRW�scC@s�tt|�j||||�x}t|ji�D]i}|d}|jjd|�|j�}|jj	|�j
|||�s2tjt
d���q2q2WdS(NR-sadding %s revisions
s"received dir revlog group is empty(tsuperR�RqR�RNR+RrRgRhRiRjRRR(RARlRmRnRoR�RRp((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyRq�s
!(R�R�R�t_CHANGEGROUPV3_DELTA_HEADERRYR�RXR�R^RWRq(((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyR��s		theaderlessfixupcB@seZd�Zd�ZRS(cC@s||_||_dS(N(t_ht_fh(RAR/R�((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyRD�s	cC@sp|jr`|j| |j|}|_t|�|kr\|t|j|t|��7}n|St|j|�S(N(R�RRR�(RAR�R((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyRF�s	#(R�R�RDRF(((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyR��s	cc@s�|jdk	r"d|j}}nT|jtkrR|j}tjt|��}n$|j}tj|j	t|��}||�}t
t|�t|�t|��V|V|r�|Vn|VdS(s0Serialize a revisiondelta to changegroup chunks.RN(R\R#tbasenodeRtrevisionRttrivialdiffheaderRtreplacediffheadertbaserevisionsizeR(R\theaderfnR!tdatatmeta((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt_revisiondeltatochunks�s			%c@s"��fd�}t|d|�S(s&Sort nodes for changegroup generation.c@s�j�|��S(N(Rv(R�(Rttlookup(s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyR�Rtkey(tsorted(tstoretnodesRtR�R�((RtR�s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt_sortnodesellipsissc	@s��|}	�������fd��|	sM�j��ttfkr]tt}
}n\t|	�dkr�t�fd�|	D��\}
t}n"t�fd�|	D��\}
}�j|
��j|�}}
||
|fS(Nc@s7|tkrtS�r|S|g}x
|r2|d}|d}|�krT�|S|�kr�|jg�j|�D]}|tkrv|^qv�q&|�kr�|jg�|D]}|tkr�|^q��q&x6tj�dd�D]}�j|�|kr�|Sq�Wtjd�j�|f��q&WtS(s�Turn a changelog revnum into a local revnum.

        The ellipsis dag is stored as revnums on the changelog,
        but when we're producing ellipsis entries for
        non-changelog revlogs, we need to turn those numbers into
        something local. This does that for us, and during the
        changelog sending phase will also expand the stored
        mappings as needed.
        iii����s=unable to resolve parent while packing %r %r for changeset %r(	Rtextendt
parentrevsR
R�tlinkrevRRt	indexfile(tclrevtwalktptppti(RttclrevtolocalrevtfullclnodestischangelogtprecomputedellipsisRvR�(s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytlocal!s.
		

ic3@s|]}�|�VqdS(N((t.0R�(R(s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pys	<genexpr>csc3@s|]}�|�VqdS(N((RR�(R(s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pys	<genexpr>fs(R�RRR�RQ(RtR�R�RvR�tlinknodeR�R�R�tlinkparentsRRRStp1nodetp2node((RtR�R�R�RR�RvR�s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt_resolvenarrowrevisioninfos
!>	"cc@sb|s
dS|j}|r"d}n*|rFt||||�}d}nd}|r1g}
i}i}x�|D]�}|j|�}||�}|j|�}|||<||	kr�|||<nY||
kr�qknGt||||||||	|
�	\}}}||f||<|||<|
j|�qkW|
}nd}|dk	rp|jj|dtd�dt	|��}n|j
|d|dtd	|d
|�}x�t|�D]�\}}|r�|j
|d�n|r*||j}|j|kr9||j\}}||_||_|jtjO_q9n||j�}||_|Vq�W|r^|j�ndS(s�Calculate deltas for a set of revisions.

    Is a generator of ``revisiondelta`` instances.

    If topic is not None, progress detail will be generated using this
    topic name (e.g. changesets, manifests, etc).
    NtstorageR�R|R,R}t
nodesordertrevisiondatatassumehaveparentrevisionst
deltapreviousi(R�R�R#RvRtappendR+R�RRt
emitrevisionsR_t	enumerateR~RQRRRVRtREVISION_FLAG_ELLIPSISRRk(RlR�R�R�R�tforcedeltaparentprevttopictellipsesR�R�R�RtRtfilteredtadjustedparentst	linknodesRQRvRR�RRR�R�R�R�((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt
deltagrouplsl			



		
				tcgpackercB@sSeZedeeddd�Zed�Zd�Zd�Zd�Z	d�Z
RS(c

C@s�|st�|st�||_||_||_||_||_||_|	|_|dkrot	�}n||_
|
|_||_||_
||_|jjjr�|jjjr�|jjj|_nd�|_dS(s�Given a source repo, construct a bundler.

        oldmatcher is a matcher that matches on files the client already has.
        These will not be included in the changegroup.

        matcher is a matcher that matches on files to include in the
        changegroup. Used to facilitate sparse changegroups.

        forcedeltaparentprev indicates whether delta parents must be against
        the previous revision in a delta group. This should only be used for
        compatibility with changegroup version 1.

        builddeltaheader is a callable that constructs the header for a group
        delta.

        manifestsend is a chunk to send after manifests have been fully emitted.

        ellipses indicates whether ellipsis serving mode is enabled.

        bundlecaps is optional and can be used to specify the set of
        capabilities which can be used to build the bundle. While bundlecaps is
        unused in core Mercurial, extensions rely on this feature to communicate
        capabilities to customize the changegroup packer.

        shallow indicates whether shallow data might be sent. The packer may
        need to pack file contents not introduced by the changes being packed.

        fullnodes is the set of changelog nodes which should not be ellipsis
        nodes. We store this rather than the set of nodes that should be
        ellipsis because for very large histories we expect this to be
        significantly smaller.
        cS@sdS(N(R#(ts((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyR�RN(tAssertionErrort_oldmatchert_matcherR�t_forcedeltaparentprevt_builddeltaheadert
_manifestsendt	_ellipsesR#R�t_bundlecapst
_isshallowt_fullclnodest_precomputedellipsist_repoR+tverboset	debugflagtnotet_verbosenote(
RARlt
oldmatchertmatcherR�tbuilddeltaheadertmanifestsendRt
bundlecapsRtshallowt
ellipsisrootst	fullnodes((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyRD�s&%												c	#@s�|j}|j�|jtd��d}|j�|�\}}	xI|	D]A}
|rJx2t|
|j�D]}|t|�7}|VqiWqJqJWt�}|t|�7}t�V|jtd�|�|d}
|d}|d}|o�d|j	k}i}d}|j
||
|||||d�}x�|D]�\}}	|r}|jd	ksYt�t
|�}|t|�7}|VnxF|	D]>}
t|
|j�}x#|D]}|t|�7}|Vq�Wq�Wt�}|t|�7}|Vq2W|jtd
�|�|jVd}|jr]|jr]g|j�D](\}}|jj|j�|f^q,}n|j�t�fd�|D��}|j|||||||�}x�|D]�\}}	t
|�}t|�}|VxF|	D]>}
t|
|j�}x#|D]}|t|�7}|Vq�Wq�Wt�}|t|�7}|V|jtd�||f�q�Wt�V|r�|jd
dt|d�d|�ndS(s�Yield a sequence of changegroup byte chunks.
        If changelog is False, changelog data won't be added to changegroup
        s%uncompressed size of bundle content:
is%8.i (changelog)
t
clrevorderR�tchangedfilesttreemanifesttclrevtomanifestrevR�s%8.i (manifests)
c3@s|]}�j|�VqdS(N(Rv(RRs(Rt(s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pys	<genexpr>oss	%8.i  %s
toutgoingRQRwN(R$R�R(Rt_generatechangelogR�RRRtrequirementstgeneratemanifestsR�RRRR#RR!R�RhRFtclearR�t
generatefilesR�R(RAt
commonrevstclnodestfastpathlinkrevRwR�RlR�tclstateRpR\RcR)R1R�R2tfnodestitttreeR,tmfdictsR�tlrtclrevsRR�((Rts;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytgenerates�		
		






		;
	


	!c@s�i�i��jj�t��i��������fd�}i�d6�d6�d6�d6}t�j�|t|�jd�jdtd�d	id
�jd�j	�}||fS(s�Generate data for changelog chunks.

        Returns a 2-tuple of a dict containing state and an iterable of
        byte chunks. The state will not be fully populated until the
        chunk stream has been fully consumed.
        c@s��j|�}t���|<�jr�|�jksO�j|��jkr�|j}�j||��j�j|��j|��n�jr��j	�|jj
�j��q��j	|j�n#�j|j|��j	|j�|S(N(
R�RRR"RvR#R�R�R!R~RFtkeysR�(RsR2tmanifestnode(R2RtR1R4R�tmflRA(s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytlookupcl�s			#R1R�R2R4RRR{R�R�R�(
R$RhR�RR_RRRR"R#(RARtR�RItstatetgen((R2RtR1R4R�RHRAs;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyR6�s(	!%
			c#@sn|j}|j�i�d6�������fd�}	x*�ri�j�\}
}�j|
�}|jj|jd p�d�s�g}
n|j|||�}
|
r�|
r�q@n|	|
|�}t|j||
t	||j
d|jdtd�d|d	|j
d
|j�}|jj|jd p-d�sA|
|fVq@x|D]}qHW|
s@|
gfVq@q@WdS(s�Returns an iterator of changegroup chunks containing manifests.

        `source` is unused here, but is used by extensions like remotefilelog to
        change what is sent based in pulls vs pushes, etc.
        Rc@s<�r�st��jS������fd�}|S(Nc@s��|}�j�|�jdt�}x�|j�D]�\}}}|dkr��|d}�j|i�}|j||�}�|�|kr�|||<q�q5�|}	�j|	i�}
|
j||�}�|�|kr5||
|<q5q5W|S(sPCallback for looking up the linknode for manifests.

                Returns the linkrev node for the specified manifest.

                SIDE EFFECT:

                1) fclnodes gets populated with the list of relevant
                   file nodes if we're not using fastpathlinkrev
                2) When treemanifests are in use, collects treemanifest nodes
                   to send

                Note that this means manifests must be completely sent to
                the client before you can trust the list of files and
                treemanifests to send.
                R.ttt/(tgettreadfastR_titerentriesR�(RstclnodetmdataR�R�tfltsubtreet
tmfclnodest	tmfclnodeR�tfclnodestfclnode(R1R?RHR�ttmfnodesRA(s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytlookupmflinknode�s

(Rt__getitem__(RAR�RZ(R1R=R?R�RHRY(R�RAs;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytmakelookupmflinknode�s

 i����t.RRR�R�R�R�N(R$RhtpopitemRiRtvisitdirRAt_prunemanifestsRR`RRRR"R#R(RAR;R1R=R�R?RwR�RlR\RAR�R�tprunednodestlookupfnRpR((R1R=R?R�RHRYs;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyR8�s6		
'		
			
cC@sB|j|j}}g|D]$}|||��|kr|^qS(N(RvR�(RAR�R�R;tfrevtflrR�((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyR`.sc#@sJg|D]+}|j|�r|j|�r|^q}|sP�fd��n!|jjj���fd��i�|jr�g|D]}	|j|	^q��|jjj������fd�}
n�}
|j}|jjt	d�dt	d�dt
|��}x-tt|��D]\}
}|j
|�}|s\tjt	d�|��n�j�|
||���fd�}|j|j}}g�D]$}|||��|kr�|^q�}|s�qn|j|
d	d
|�t|j||t||jd|jd�d
|jd|j�}||fVqW|j�dS(Nc@s�j|i�S(N(RN(tunusedRM(R?(s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytnormallinknodes?sc@sH|j�|j��fd�|D�}t���fd�|D��S(Nc3@s!|]}|�|�fVqdS(N((RR�(tflinkrev(s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pys	<genexpr>Gsc3@s9|]/\}}|�kr�|��|�fVqdS(N((RR�RC(tclnRDtfnode(s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pys	<genexpr>Hs(R�RQR�(R�RMtrevs(RhRD(RgRis;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyRfDs
		c@s�xQ�D]I}y,|j|�}|j|��|j�<Wqtjk
rOqXqW�||�}t|�t��kr�xh�D]]\}}|j|d�}||kr�t|||d��||<q�|r�|||<q�q�Wn|S(NR�(tfilenodeRvRtManifestLookupErrorRRNR#tmin(tflogRMR2RitlinkstmfRC(R�R�t
commonctxsRBRf(s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyRTs
 R�R|R}s!empty or missing file data for %sc@s�|S(N((Rs(tlinkrevnodes(s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt
lookupfilelogusititemRR�R�R�(RRR$R�RQR!RvR+R�RRRR�tfileRRR9R�R~RR`RRR"R#Rk(RAR2R;RwRBR=R?RDR�R2RRlR�R�RMt
filerevlogRsRcRdR�t	filenodesRp((	RhR�RDR�RqR?RrRBRfs;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyR:9sL
+	 	!


$			N(R�R�R`R#RDR_RER6R8R`R:(((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyR�s>o	G	\	c	C@sLd�}t|||dd|dddtd|d|d	|d
|d|�S(NcS@s"tj|j|j|j|j�S(N(R�RRQRRR(R((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyR��sR5R+R,RRR-RR.R/R0(RR_(	RlR)R*R-RR.R/R0R+((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt_makecg1packer�s	c	C@sFd�}t|||dd|ddd|d|d|d	|d
|�S(NcS@s(tj|j|j|j|j|j�S(N(R�RRQRRR�R(R((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyR��sR�R+R,RR-RR.R/R0(R(	RlR)R*R-RR.R/R0R+((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt_makecg2packer�s	c	C@sId�}t|||dd|dt�d|d|d|d|d	|�S(
NcS@s.tj|j|j|j|j|j|j�S(N(R�RRQRRR�RRV(R((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyR��sR�R+R,R-RR.R/R0(RR(	RlR)R*R-RR.R/R0R+((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt_makecg3packer�s		R5R�R�cC@s_ttj��}|jjdd�pH|jjdd�pHd|jks[|jd�n|S(Ntexperimentaltchangegroup3R3R�(R�t
_packermapRFR+R�R7tdiscard(Rltversions((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytallsupportedversions�scC@s
t|�S(N(R�(Rl((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytsupportedincomingversions�scC@s�t|�}d|jkr8|jd�|jd�ntj|jkrg|jd�|jd�nt|jkr�|jd�|jd�n|S(NR3R5R�(R�R7R~RtNARROW_REQUIREMENTtLFS_REQUIREMENT(RlR((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytsupportedoutgoingversions�s


cC@stt|��S(N(tmaxR�(Rl((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytlocalversion�scC@sAt|�}d|jkr+|jd�n|s7t�t|�S(NtgeneraldeltaR5(R�R7R~RRm(RlR((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytsafeversion�s
c	

C@s|t|�kst�|dkr<tj|jd�}n|dkr`tj|jd�}n|dkr�|j�r�tj	d��n|r�|dkr�tj
td�|��n|j|�}t
|d}	|	||||d|d|d	|d
|�S(NRR5s;version 01 changegroups do not support sparse file matchersR�sSellipsis nodes require at least cg3 on client and server, but negotiated version %siRR.R/R0(R5R�(R�RR#tmatchmodt
alwaysmatchertroottnevermatchertalwaysRtProgrammingErrorRRtnarrowmatchR}(
R�RlR-R)R*RR.R/R0tfn((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt
getbundler�s 	
cC@st|d||d|�S(NiR?(R}(R�R/RBR?((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytgetunbundlerscC@s�|jjs|dkr;|jjtd�t|��n|jjr�|jjd�x+|D] }|jjdt|��q^WndS(Ntbundles%d changesets found
slist of changesets:
s%s
(R+R%R�RRR&RrR(RlR�RwRQ((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt_changegroupinfos#
c	C@sMt||||d|d|�}t|tj|�dit|j�d6�S(NtfastpathR-tclcount(t
makestreamR�RtchunkbufferR#Rtmissing(RlR5R�RwR�R-tcgstream((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pytmakechangegroup scC@s�t||d|d|�}|j�}|j}|j}	|j}
|
j�|pv|jdkov|
t|j	��k}|j
ddtd|�t||	|�|j
||	||�S(NR-R*tpreoutgoingRzRw(R�R�tcommonR�tmissingheadstsortt
filternameR#R�R�R�R_R�RE(RlR5R�RwR�R-R*tbundlerR;tcsetsR�R=((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyR�'s				
'cC@sMd}d}|jjtd�dtd�d|�}xvt|ji�D]b}	|d7}|	d}
|jjd|
�|j�|j|
�}t|�}y=|j	�}
|j
|
||�s�tjtd���nWn/tj
k
r
}tjtd	�|��nX|t|�|7}|
|krI||
}x`tj|t|��D]F}|j|�}||kr|j|�qNtjtd
���qNW|s�||
=q�qIqIW|j�x�|j�D]y\}
}|j|
�}x[|D]S}y|j|�Wq�tjk
r:tjtd�|
t|�f��q�Xq�Wq�W||fS(NiR�R|R}iR-sadding %s revisions
s#received file revlog group is emptys#received delta base is censored: %ss#received spurious file revlog entrys+missing file data for %s:%s - run hg verify(R+R�RR�RNRrRfRuRRgRjRRtCensoredBaseErrorR
R�RQtremoveRkR�RvtLookupErrorR(RlRwRmRnt
expectedfilesR�R�R�R�R�R�RStoRptetneedstnewR�((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyR�;sN!	





	"(;t
__future__RR&RR�ti18nRRQRRRRRRRR�RR	R
RRtStructR�R�R�R�RRRRRR#R3tobjectR4R�R�R�R�R�RR`RRRxRyRzR}R�R�R�R�R�R�R�R�R�R�R�(((s;/usr/lib64/python2.7/site-packages/mercurial/changegroup.pyt<module>sj"4
		
			"�X			P	j��