-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/mercurial/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/mercurial/bundle2.pyc


\,Tc@sdZddlZddlZddlZddlZddlZddlZddlZddlm	Z	ej
ZejZ
dZdZdZdZdZdZdZd	Zd
ZiZdAdZdefd
YZdefdYZdefdYZdZedZdZ dZ!defdYZ"defdYZ#de#fdYZ$defdYZ%de#fdYZ&d Z'ed!d"Z(ed#dBd&Z(ed'd(Z(ed)d*Z)ed+d,Z*ed-dCd0Z*ed1dDd4Z*ed5dEd6Z*ed7dFd9Z+ed:dGd>Z,ed?dHd@Z-dS(IsHandling of the new bundle2 format

The goal of bundle2 is to act as an atomically packet to transmit a set of
payloads in an application agnostic way. It consist in a sequence of "parts"
that will be handed to and processed by the application layer.


General format architecture
===========================

The format is architectured as follow

 - magic string
 - stream level parameters
 - payload parts (any number)
 - end of stream marker.

the Binary format
============================

All numbers are unsigned and big-endian.

stream level parameters
------------------------

Binary format is as follow

:params size: (16 bits integer)

  The total number of Bytes used by the parameters

:params value: arbitrary number of Bytes

  A blob of `params size` containing the serialized version of all stream level
  parameters.

  The blob contains a space separated list of parameters. Parameters with value
  are stored in the form `<name>=<value>`. Both name and value are urlquoted.

  Empty name are obviously forbidden.

  Name MUST start with a letter. If this first letter is lower case, the
  parameter is advisory and can be safely ignored. However when the first
  letter is capital, the parameter is mandatory and the bundling process MUST
  stop if he is not able to proceed it.

  Stream parameters use a simple textual format for two main reasons:

  - Stream level parameters should remain simple and we want to discourage any
    crazy usage.
  - Textual data allow easy human inspection of a bundle2 header in case of
    troubles.

  Any Applicative level options MUST go into a bundle2 part instead.

Payload part
------------------------

Binary format is as follow

:header size: (16 bits inter)

  The total number of Bytes used by the part headers. When the header is empty
  (size = 0) this is interpreted as the end of stream marker.

:header:

    The header defines how to interpret the part. It contains two piece of
    data: the part type, and the part parameters.

    The part type is used to route an application level handler, that can
    interpret payload.

    Part parameters are passed to the application level handler.  They are
    meant to convey information that will help the application level object to
    interpret the part payload.

    The binary format of the header is has follow

    :typesize: (one byte)

    :parttype: alphanumerical part name

    :partid: A 32bits integer (unique in the bundle) that can be used to refer
             to this part.

    :parameters:

        Part's parameter may have arbitrary content, the binary structure is::

            <mandatory-count><advisory-count><param-sizes><param-data>

        :mandatory-count: 1 byte, number of mandatory parameters

        :advisory-count:  1 byte, number of advisory parameters

        :param-sizes:

            N couple of bytes, where N is the total number of parameters. Each
            couple contains (<size-of-key>, <size-of-value) for one parameter.

        :param-data:

            A blob of bytes from which each parameter key and value can be
            retrieved using the list of size couples stored in the previous
            field.

            Mandatory parameters comes first, then the advisory ones.

            Each parameter's key MUST be unique within the part.

:payload:

    payload is a series of `<chunksize><chunkdata>`.

    `chunksize` is a 32 bits integer, `chunkdata` are plain bytes (as much as
    `chunksize` says)` The payload part is concluded by a zero size chunk.

    The current implementation always produces either zero or one chunk.
    This is an implementation limitation that will ultimately be lifted.

Bundle processing
============================

Each part is processed in order using a "part handler". Handler are registered
for a certain part type.

The matching of a part to its handler is case insensitive. The case of the
part type is used to know if a part is mandatory or advisory. If the Part type
contains any uppercase char it is considered mandatory. When no handler is
known for a Mandatory part, the process is aborted and an exception is raised.
If the part is advisory and no handler is known, the part is ignored. When the
process is aborted, the full bundle is still read from the stream to keep the
channel usable. But none of the part read from an abort are processed. In the
future, dropping the stream may become an option for channel we do not care to
preserve.
iN(t_tHG2Xs>Hs>Bs>Is>BBicCsdd|S(sreturn a struct format to read part parameter sizes

    The number parameters is variable so we need to build that format
    dynamically.
    t>tBB((tnbparams((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyt_makefpartparamsizesscsfd}|S(sdecorator that register a function as a bundle2 part handler

    eg::

        @parthandler('myparttype', ('mandatory', 'param', 'handled'))
        def myparttypehandler(...):
            '''process a part of type "my part".'''
            ...
    cs;j}|tkst|t|<t|_|S(N(tlowertparthandlermappingtAssertionErrort	frozensettparams(tfunct	lparttype(R
tparttype(s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyt
_decorators

((R
R
R((R
R
s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pytparthandlers
tunbundlerecordscBsPeZdZdZddZdZdZdZdZ	dZ
RS(	skeep record of what happens during and unbundle

    New records are added using `records.add('cat', obj)`. Where 'cat' is a
    category of record and obj is an arbitrary object.

    `records['cat']` will return all entries of this category 'cat'.

    Iterating on the object itself will yield `('category', obj)` tuples
    for all entries.

    All iterations happens in chronological order.
    cCsi|_g|_i|_dS(N(t_categoriest
_sequencest_replies(tself((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyt__init__s		cCs^|jj|gj||jj||f|dk	rZ|j|j||ndS(sadd a new record of a given category.

        The entry can then be retrieved in the list returned by
        self['category'].N(Rt
setdefaulttappendRtNonet
getrepliestadd(Rtcategorytentryt	inreplyto((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRscCs|jj|tS(s2get the subrecords that replies to a specific part(RRR(Rtpartid((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRscCst|jj|dS(N((ttupleRtget(Rtcat((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyt__getitem__scCs
t|jS(N(titerR(R((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyt__iter__scCs
t|jS(N(tlenR(R((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyt__len__scCs
t|jS(N(tboolR(R((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyt__nonzero__sN(t__name__t
__module__t__doc__RRRRR"R$R&R((((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRs	
				tbundleoperationcBseZdZdZRS(sPan object that represents a single bundling process

    Its purpose is to carry unbundle-related objects and states.

    A new object should be created at the beginning of each bundle processing.
    The object is to be returned by the processing function.

    The object has very little content now it will ultimately contain:
    * an access to the repo the bundle is applied to,
    * a ui object,
    * a way to retrieve a transaction to add changes to the repo,
    * a way to record the result of processing each part,
    * a way to construct a bundle response when applicable.
    cCs7||_|j|_t|_||_d|_dS(N(trepotuiRtrecordstgettransactionRtreply(RR-ttransactiongetter((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRs
		(R)R*R+R(((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyR,stTransactionUnavailablecBseZRS((R)R*(((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyR3scCs
tdS(sdefault method to get a transaction while processing a bundle

    Raise an exception to highlight the fact that no transaction was expected
    to be createdN(R3(((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyt_notransactionsc
Cs5t||}|j|j}d}yx|D]}|j}|j}ytj|}|dkrtj	d|n|j
jd||j|j}	|	rt
|	}	|	jtj	d|d|	nWnItj	k
r'}
||krn|j
jd|
|jq2nXd}|jdk	rY|j
jdtd}nz|||Wd|dk	r|j
j}nX|r|jjdd	|}|jd
t|jdtn|jq2WWnStk
r0}
|dk	r|jnx|D]}|jq
Wt|
_nX|S(sgThis function process a bundle, apply effect to/from a repo

    It iterates over each part then searches for and uses the proper handling
    code to process the part. Parts are processed in order.

    This is very early version of this function that will be strongly reworked
    before final usage.

    Unknown Mandatory part will abort the process.
    R
sfound a handler for part %r
R
s&ignoring unsupported advisory part %s
terrortNs
b2x:outputtdatasin-reply-tot	mandatory(R,R
t	iterpartsRttypeRRR R5tBundleValueErrorR.tdebugt
mandatorykeystlisttsorttreadR1t
pushbuffertTruet	popbuffertnewparttaddparamtstrtidtFalset	Exceptiontduringunbundle2(
R-t	unbundlerR2topR9tpartR
tkeythandlert
unknownparamstexctoutputtoutpart((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyt
processbundlesZ
	

	"

	cCsi}x|jD]}|s%qnd|krA|d}}n'|jdd\}}|jd}tj|}g|D]}tj|^q~}|||<qW|S(sdecode a bundle2 caps bytes blob into a dictionnary

    The blob is a list of capabilities (one per line)
    Capabilities may have values using a line of the form::

        capability=value1,value2,value3

    The values are always a list.t=it,((t
splitlinestsplitturllibtunquote(tblobtcapstlineRNtvalstv((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyt
decodecaps^s	"cCsg}x~t|D]p}||}tj|}g|D]}tj|^q9}|rvd|dj|f}n|j|qWdj|S(s2encode a bundle2 caps dictionary into a bytes blobs%s=%sRVs
(tsortedRYtquotetjoinR(R\tchunkstcaR^R_((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyt
encodecapsus
"tbundle20cBsYeZdZddZedZd	dZdZdZ	dZ
dZRS(
srepresent an outgoing bundle2 container

    Use the `addparam` method to add stream level parameter. and `newpart` to
    populate it. Then call `getchunks` to retrieve all the binary chunks of
    data that compose the bundle2 container.cCs.||_g|_g|_t||_dS(N(R.t_paramst_partstdicttcapabilities(RR.Rk((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRs			cCs
t|jS(s*total number of parts added to the bundler(R%Ri(R((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pytnbpartsscCsU|stdn|dtjkr;td|n|jj||fdS(sadd a stream level parametersempty parameter nameisnon letter first character: %rN(t
ValueErrortstringtlettersRhR(Rtnametvalue((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyREs
cCs;|jdkstt|j|_|jj|dS(s_add a new part to the bundle2 container

        Parts contains the actual applicative payload.N(RGRRR%RiR(RRM((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pytaddpartscOs#t|||}|j||S(sqcreate a new part and add it to the containers

        As the part is directly added to the containers. For now, this means
        that any failure to properly initialize the part after calling
        ``newpart`` should result in a failure of the whole bundling process.

        You can still fall back to manually create and add if you need better
        control.(t
bundlepartRr(RttypeidtargstkwargsRM((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRDs	
ccs|jjdttV|j}|jjd|ttt|V|r[|Vn|jjdxD|jD]9}|jjd|jx|j	D]}|VqWquW|jjddVdS(Nsstart emission of %s stream
sbundle parameter: %s
sstart of parts
sbundle part: "%s"
send of bundle
t(
R.R<t_magicstringt_paramchunkt_packt_fstreamparamsizeR%RiR:t	getchunks(RtparamRMtchunk((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyR|s
cCswg}xa|jD]V\}}tj|}|dk	rYtj|}d||f}n|j|qWdj|S(s1return a encoded version of all stream parameterss%s=%st N(RhRYRbRRRc(RtblockstparRq((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRys(N(R)R*R+RtpropertyRlRRERrRDR|Ry(((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRgs			t
unpackermixincBs)eZdZdZdZdZRS(s6A mixin to extract bytes and struct data from a streamcCs
||_dS(N(t_fp(Rtfp((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRscCs%|jtj|}t||S(s)unpack this struct format from the stream(t
_readexacttstructtcalcsizet_unpack(RtformatR7((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRscCstj|j|S(s)read exactly <size> bytes from the stream(tchangegrouptreadexactlyR(Rtsize((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRs(R)R*R+RRR(((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRs		t
unbundle20cBsGeZdZddZejdZdZdZ	dZ
RS(s|interpret a bundle2 stream

    This class is fed with a binary stream and yields parts through its
    `iterparts` methods.cCs||_tt|j||d	kr|jd}|dd!|dd!}}|dkrytjtdn|dkrtjtd|qn|jj	d|d	S(
s<If header is specified, we do not read it out of the stream.iiitHGsnot a Mercurial bundlet2Xsunknown bundle version %ssstart processing of %s stream
N(
R.tsuperRRRRtutiltAbortRR<(RR.Rtheadertmagictversion((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRs	cCs|jjdi}|jtd}|rx|j|jdD]{}|jdd}g|D]}tj|^qg}t|dkr|j	dn|j||d||d<qHWn|S(s%dictionary of stream level parameterss"reading bundle2 stream parameters
iRRUiiN(R.R<RR{RRXRYRZR%RRt
_processparam(RR
t
paramssizetpti((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyR
s"
cCs{|stdn|dtjkr;td|n|djrb|jjd|ntjd|fdS(sprocess a parameter, applying its effect if needed

        Parameter starting with a lower case letter are advisory and will be
        ignored when unknown.  Those starting with an upper case letter are
        mandatory and will this function will raise a KeyError when unknown.

        Note: no option are currently supported. Any input will be either
              ignored or failing.
        sempty parameter nameisnon letter first character: %rsignoring unknown parameter %r
R
N(RmRnRotislowerR.R<R5R;(RRpRq((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRs
ccss|j|jjd|j}x9|dk	r^t|j||j}|V|j}q&W|jjddS(s'yield all parts contained in the streams"start extraction of bundle2 parts
send of bundle2 stream
N(R
R.R<t_readpartheaderRtunbundlepartR(RtheaderblockRM((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyR9scCs>|jtd}|jjd||r:|j|SdS(sQreads a part header size and return the bytes blob

        returns None if emptyispart header size: %i
N(Rt_fpartheadersizeR.R<RR(Rt
headersize((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyR#s

N(R)R*R+RRRt
propertycacheR
RR9R(((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRs
		RscBseZdZd
dddZdZdZeeeZedZedZ	de
dZdZd	Z
RS(sA bundle2 part contains application level payload

    The part `type` is used to route the part to the application level
    handler.

    The part payload is contained in ``part.data``. It could be raw bytes or a
    generator of byte chunks.

    You can add parameters to the part using the ``addparam`` method.
    Parameters can be either mandatory (default) or advisory. Remote side
    should be able to safely ignore the advisory ones.

    Both data and parameters cannot be modified after the generation has begun.
    R6cCsd|_||_||_t||_t||_t|_xP|j|jD]>\}}||jkrt	d|n|jj
|qVWd|_dS(Nsduplicated params: %s(RRGR:t_dataR>t_mandatoryparamst_advisoryparamstsett_seenparamstRuntimeErrorRt
_generated(RR
tmandatoryparamstadvisoryparamsR7tpnamet__((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyR>s			cCs.|jdk	r!tjdn||_dS(Nspart is being generated(RRR5tReadOnlyPartErrorR(RR7((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyt	__setdataRscCs|jS(N(R(R((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyt	__getdataVscCs
t|jS(N(RR(R((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRZscCs
t|jS(N(RR(R((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyR_scCs|jdk	r!tjdn||jkrCtd|n|jj||j}|rn|j}n|j	||fdS(Nspart is being generatedsduplicated params: %s(
RRR5RRRmRRRR(RRpRqR8R
((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyREds	c
cs|jdk	rtdnt|_ttt|j|jtt|j	g}|j
}|j}|jtt
t|t|g}x:|D]2\}}|jt||jt|qWx:|D]2\}}|jt||jt|qWttt|d|}|j|x.|D]&\}}|j||j|qAWx.|D]&\}}|j||j|qrWdj|}ttt|V|Vx-|jD]}	ttt|	V|	VqWttdVt|_dS(Nspart can only be consumed onceiR6i(RRRRHRzt_fparttypesizeR%R:t_fpartidRGRRRt_fpartparamcountRRcRt_payloadchunkst
_fpayloadsizeRB(
RRtmanpartadvpartparsizesRNRqt
paramsizestheaderchunkR~((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyR|ps>			%


	ccsxtj|jdrZtj|j}|jt}x;|rV|V|jt}q9Wnt|jrt|jVndS(smyield chunks of a the part payload

        Exists to handle the different methods to provide data to a part.tnextN(RtsafehasattrR7tchunkbufferR@tpreferedchunksizeR%(RtbuffR~((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRs	(((R)R*R+Rt_bundlepart__setdatat_bundlepart__getdataRR7RRRBRER|R(((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRs.s			+RcBsGeZdZdZdZdZdZdZddZ	RS(s a bundle part read from a bundlecCstt|j|||_||_d|_t|_t|_d|_
d|_d|_d|_
d|_d|_d|_|jdS(Ni((RRRR.t_headerdatat
_headeroffsetRHt_initializedtconsumedRRGR:RRR
R=t_payloadstreamt_readheader(RR.RR((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRs												cCs.|j}|j|||!}|||_|S(s+return the next <size> byte from the header(RR(RRtoffsetR7((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyt_fromheaders	
cCs%|jtj|}t||S(saread given format from header

        This automatically compute the size of the format to read.(RRRR(RRR7((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyt
_unpackheaderscCsft||_t||_t|j|_|jjt|jtd|D|_dS(s7internal function to setup all logic related parameterscss|]}|dVqdS(iN((t.0R((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pys	<genexpr>sN(RRRRjR
tupdateR	R=(RRR((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyt_initparamss
c
sjtd}j|_jjdjjtd_jjdjjt\}}jjd||t	||}j|}t
|ddd|ddd}|| }||}g}x9|D]1\}	}
|jj|	j|
fqWg}x9|D]1\}	}
|jj|	j|
fqAWj||fd}t
j|_t_dS(	s$read the header and setup the objectispart type: "%s"
spart id: "%s"
spart parameters: %i
Niic3smjtd}jjd|x?|rhj|Vjtd}jjd|q*WdS(Nispayload chunk size: %i
(RRR.R<R(tpayloadsize(R(s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyt
payloadchunkss	(RRRR:R.R<RRGRRtzipRRRRRRBR(
RttypesizetmancounttadvcounttfparamsizesRtmansizestadvsizest	manparamsRNRqt	advparamsR((Rs5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRs,)

))cCst|js|jn|dkr4|jj}n|jj|}|dksdt||krpt|_n|S(sread payload dataN(RRRRR@R%RBR(RRR7((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyR@s	
N(
R)R*R+RRRRRRR@(((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRs				
	'cCsH|jd}|r&|dkr&iStj|jd}t|S(s/return the bundlecapabilities of a peer as dictsbundle2-expR6(tcapableRYRZR`(tremotetrawtcapsblob((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pytbundle2caps
s
sb2x:changegroupcCs|jtj|d}tj|j|dd}|jjdi|d6|jd	k	r|jj	d}|j
dt|jdt
|j
dd|dt
n|jstd	S(
sapply a changegroup part on the repo

    This is a very early implementation that will massive rework before being
    inflicted to any end-user.
    tUNtbundle2Rtreturnsb2x:reply:changegroupsin-reply-toR8s%iN(R0Rt
unbundle10taddchangegroupR-R/RR1RRDRERFRGRHR@R(RLtinparttcgtretRM((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pythandlechangegroups
sb2x:reply:changegroupRsin-reply-tocCsGt|jd}t|jd}|jjdi|d6|dS(NRsin-reply-toR(tintR
R/R(RLRRtreplyto((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyR*ssb2x:check:headscCs|jd}g}x2t|dkrI|j||jd}qW|sWt||jjkr~tjdndS(scheck that head of the repo did not change

    This is used to detect a push race when using unbundle.
    This replaces the "heads" argument of unbundle.is3repository changed while pushing - please try againN(R@R%RRR-theadsR5t	PushRaced(RLRthR((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyR0s

s
b2x:outputcCs5x.|jjD]}|jjd|qWdS(s3forward output captured on the server to the clientsremote: %s
N(R@RWR.twrite(RLRR]((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pythandleoutput@ss
b2x:replycapscCs=t|j}|jdkr9t|j||_ndS(sqNotify that a reply bundle should be created

    The payload contains the capabilities information for the replyN(R`R@R1RRgR.(RLRR\((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pythandlereplycapsFssb2x:error:aborttmessagethintcCs,tj|jdd|jjddS(s*Used to transmit abort error over the wireRRN(RRR
R (RLR((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyROssb2x:error:unsupportedcontentR
R
cCsxi}|jjd}|dk	r1||d<n|jjd}|dk	re|jd|d<ntj|dS(s4Used to transmit unknown content error over the wireR
R
tN(R
R RRXR5R;(RLRRvR
R
((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRTs
sb2x:error:pushracedcCs#tjtd|jddS(s.Used to transmit push race error over the wirespush failed:RN(R5t
ResponseErrorRR
(RLR((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyRassb2x:listkeyst	namespacecCs?|jd}tj|j}|jjd||fdS(s6retrieve pushkey namespace content stored in a bundle2RtlistkeysN(R
tpushkeyt
decodekeysR@R/R(RLRRtr((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pythandlelistkeysfs
sb2x:pushkeyRNtoldtnewc
Cstj}||jd}||jd}||jd}||jd}|jj||||}i|d6|d6|d6|d6}|jjd||jdk	r|jjd}	|	j	dt
|jdt|	j	d	d
|dtndS(sprocess a pushkey requestRRNRRRsb2x:reply:pushkeysin-reply-toR8Rs%iN(
RtdecodeR
R-R/RR1RRDRERFRGRH(
RLRtdecRRNRRRtrecordtrpart((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyt
handlepushkeyms	

sb2x:reply:pushkeycCsGt|jd}t|jd}|jjdi|d6|dS(s(retrieve the result of a pushkey requestRsin-reply-toRN(RR
R/R(RLRRR((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pythandlepushkeyreplys((sreturnsin-reply-to(smessageshint(sparttypesparams(smessage(s	namespace(s	namespaceskeysoldsnew(sreturnsin-reply-to(.R+RRRYRnRRR5ti18nRtpackRztunpackRRxR{RRRRRRRRRtobjectRR,RR3R4RTR`RfRgRRRsRRRRRRRR(((s5/usr/lib/python2.7/dist-packages/mercurial/bundle2.pyt<module>sX			-	L		MP|`		


Copyright © 2017 || Recoded By Mr.Bumblebee