\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@`sdZddlmZmZddlZddlZddlZddlZddlZddl Z ddl Z ddl m Z ddl mZmZmZmZmZmZmZmZmZmZmZmZmZddlmZejZejZe j Z!e j"Z#dZ$dZ%d Z&d Z'dZ(d Z)d Z*ej+d Z,dZ-dZ.dZ/dZ0iZ1ddZ2de3fdYZ4de3fdYZ5de6fdYZ7dZ8ddZ:de3fdYZ;ddddZ<dZ=d Z>d!Z?d"Z@d#ZAd$ZBidd6dd&6dd'6dd*6dd+6ZCd+d*d'gZDd-e3fd.YZEd/e3fd0YZFdd1ZGd2eFfd3YZHieHd46ZIiZJd5ZKeKd6d7ZLd8e3fd9YZMd:ZNd;eFfd<YZOd=e3fd>YZPd?ZQd@eFfdAYZRdBeRfdCYZSi dd&6ddD6ddI6ddJ6ddH6eTeUejVjWdK6ddN6ddO6ddP6ddR6ddT6ZXeYddUZZdVZ[dWZ\ddddXZ]dYZ^dZZ_d[Z`d\Zad]Zbd^Zcd_Zddddd`ZedaZfe2dbddgZgeTdhdidKggejVjWD]Zhdjeh^qZie2dNeidkZje2dlddoZke2dpdqZle2drdsZme2dtduZne2dvdwZoe2dxdyZpe2dzd{Zqd|ejrfd}YZse2d~ddZte2dddZue2dddZve2dddZwe2dJddZxe2dHddZye2dDdZze2ddZ{e2dddZ|e2ddZ}e2dddZ~e2dOdZe jdZe2ddZe2ddZe2dddZdZdS(sHandling 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: int32 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 `=`. 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: int32 The total number of Bytes used by the part header. 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 (restricted to [a-zA-Z0-9_:-]*) :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: 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 (, `. `chunksize` is an int32, `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. `chunksize` can be negative to trigger special case processing. No such processing is in place yet. 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. i(tabsolute_importtdivisionNi(t_( t bookmarkst changegrouptencodingterrortnodetobsoletetphasestpushkeytpycompatt streamclonettagsturltutil(t stringutils>is>Bs>Is>BBis[^a-zA-Z0-9_:-]cC`s*|jddr&|jd|ndS(s(debug regarding output stream (bundling)tdevels bundle2.debugsbundle2-output: %s N(t configbooltdebug(tuitmessage((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pytoutdebugscC`s*|jddr&|jd|ndS(s"debug on input stream (unbundling)Rs bundle2.debugsbundle2-input: %s N(RR(RR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pytindebugscC`s"tj|rt|ndS(s9raise ValueError if a parttype contains invalid characterN(t_parttypeforbiddentsearcht ValueError(tparttype((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pytvalidateparttypescC`s 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((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt_makefpartparamsizessc`s tfd}|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".''' ... c`s)j}|t|asc`sS(N(((R[(s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR\ds(t isinstancet unbundle20RLR1t processbundleRFt_processchangegroup(RHt unbundlerR[RORtkwargstop((R[s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt applybundleYs t partiteratorcB`s#eZdZdZdZRS(cC`s:||_||_||_d|_d|_d|_dS(Ni(RHRcRaR1titeratortcounttcurrent(R-RHRcRa((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR.is      c`s"fd}|_jS(Nc3`sZtjj}x>|D]6\}}|_|_|V|jd_qWdS(N(t enumerateRat iterpartsRgRhtconsumeR1(titrRgtp(R-(s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR%rs   (Rf(R-R%((R-s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt __enter__qs cC`s|js dSt|trt}y;|jr>|jjnx|jD]}|jqHWWntk rvt}nXt|_g}d}|j j dk r|j j j }|j j j }n||_ ||_|r|qn|jjjd|jdS(Ns%bundle2-input-bundle: %i parts total (RfR]t ExceptiontFalseRhRkRVtduringunbundle2R1RcRJt salvageoutputt capabilitiest _replycapst_bundle2salvagedoutputRHRRRg(R-ttypetexcttbt seekerrortparttsalvagedt replycaps((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt__exit__}s.        (RBRCR.RnR}(((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRehs  RGcC`s|dkr9|dkr!t}nt||d|}n|j|jjrdg}|jr{|jdt|jn|jdks|jtkr|jdn |jd|jd|jj dj |nt ||||S( s,This 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. Unknown Mandatory part will abort the process. It is temporarily possible to provide a prebuilt bundleoperation to the function. This is used to ensure output is properly propagated in case of an error during the unbundling. This output capturing part will likely be reworked and this ability will probably go away in the process. ROsbundle2-input-bundle:s %i paramss no-transactions with-transactions RGN( R1RXRFR$Rt debugflagR0R>RMRtjoint processparts(RHRaRPRcROtmsg((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR_s        cC`s=t|||%}x|D]}t||qWWdQXdS(N(Ret _processpart(RHRcRatpartsRz((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRs cK`s<|j|j||||}|jjdi|d6|S(NRtreturn(tapplyRHRIR3(RctcgR[RORRbtret((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR`s c C`sd}zytj|j}|dkrHd}tjd|jnt|jd|j|j|j }|rt |}|j ddj |}tjd|jd|nd}Wn:tjk r}|j rnt|jd |dSXWd|jjrd |jg}|j s9|jd nt|j}t|j |}|sg|r|jd |r|jd |n|r|jd|n|jdn|jd||jjdj |nX|S(Ntunknownsunsupported-typeRsfound a handler for part %ssunsupported-params (%s)s, R$t supporteds%ignoring unsupported advisory part %ssbundle2-input-part: "%s"s (advisory)s (params:s %i mandatorys %i advisoryt)s %s RG(R"R9RvR1RtBundleUnknownFeatureErrorRRt mandatorykeysR$tlisttsortRt mandatoryR~R0R>R( RcRztstatusthandlert unknownparamsRwRtnbmptnbap((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt _gethandlersJ           c C`st||}|dkrdSd}|jr_|jdk r_|jjdtdtd}nz|||Wd|dk r|jj}n|r|jjdd|dt }|j dt j |j dt nXdS( sprocess a single part from a bundle The part is guaranteed to have been fully consumed when the function exits (even if an exception is raised).NRtsubprocRGtoutputtdataRs in-reply-to(RR1RKRJRt pushbufferRVt popbuffertnewpartRptaddparamR tbytestrtid(RcRzRRtoutpart((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRs     cC`si}x|jD]}|s%qnd|krA|d}}n'|jdd\}}|jd}tj|}g|D]}tj|^q~}|||RNt Compression(NR(R1RRRRRR(R-talgtcompopts((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pytsetcompressiones  cC`s t|jS(s*total number of parts added to the bundler(R>R(R-((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pytnbpartsnscC`sg|stjdn|dd!tjtjkrMtjd|n|jj||fdS(sadd a stream level parametersempty parameter nameiisnon letter first character: %sN(RRTR Rtstringt ascii_lettersRR0(R-tnametvalue((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRts   cC`s&t|j|_|jj|dS(s_add a new part to the bundle2 container Parts contains the actual applicative payload.N(R>RRR0(R-Rz((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pytaddpart}scO`s#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 bundlepartR(R-ttypeidtargsRbRz((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRs  cc`s |jjrxd|jg}|jrB|jdt|jn|jdt|j|jjdj|nt |jd|j|jV|j }t |jd|t t t|V|r|Vnx+|j j|j|jD] }|VqWdS(Nsbundle2-output-bundle: "%s",s (%i params)s %i parts total RGsstart emission of %s streamsbundle parameter: %s(RR~t _magicstringRR0R>RRRRt _paramchunkt_packt_fstreamparamsizeRtcompressstreamt _getcorechunkR(R-Rtparamtchunk((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt getchunkss    cC`swg}xa|jD]V\}}tj|}|dk rYtj|}d||f}n|j|qWdj|S(s1return a encoded version of all stream parameterss%s=%st N(RRRR1R0R(R-tblockstparR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRs cc`st|jdxM|jD]B}t|jd|jx"|jd|jD] }|VqMWqWt|jdttdVdS(sUyield chunk for the core part of the bundle (all but headers and parameters)sstart of partssbundle part: "%s"Rs end of bundleiN(RRRRvRRt_fpartheadersize(R-RzR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRs cC`sFg}x9|jD].}|jjdr|j|jqqW|S(sreturn a list with a copy of all output parts in the bundle This is meant to be used during error handling to make sure we preserve server outputR(RRvt startswithR0tcopy(R-R{Rz((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRrs (N(RBRCRDRR.R1RtpropertyRRRRRRRRr(((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRPs     t unpackermixincB`s)eZdZdZdZdZRS(s6A mixin to extract bytes and struct data from a streamcC`s ||_dS(N(t_fp(R-tfp((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR.scC`s%|jtj|}t||S(sunpack this struct format from the stream This method is meant for internal usage by the bundle2 protocol only. They directly manipulate the low level stream including bundle2 level instruction. Do not use it to implement higher-level logic or methods.(t _readexacttstructtcalcsizet_unpack(R-tformatR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRscC`stj|j|S(sread exactly bytes from the stream This method is meant for internal usage by the bundle2 protocol only. They directly manipulate the low level stream including bundle2 level instruction. Do not use it to implement higher-level logic or methods.(Rt readexactlyR(R-tsize((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRs(RBRCRDR.RR(((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRs  cC`s|d kr!tj|d}n|dd!|dd!}}|dkrw|jd||ftjtdntj|}|d krtjtd|n|||}t |d||S( s7return a valid unbundler object for a given magicstringiiitHGs6error: invalid magic: %r (version %r), should be 'HG' snot a Mercurial bundlesunknown bundle version %ssstart processing of %s streamN( R1RRRRtAbortRt formatmapR9R(RRt magicstringtmagictversiontunbundlerclassRa((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt getunbundlers   R^cB`sqeZdZdZdZejdZdZdZ dZ e dZ dZ d Zd ZRS( s|interpret a bundle2 stream This class is fed with a binary stream and yields parts through its `iterparts` methods.RcC`sA||_tjjd|_d|_tt|j |dS(s<If header is specified, we do not read it out of the stream.RN( RRRRRR1t _compressedtsuperR^R.(R-RR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR.s  cC`svt|jdi}|jtd}|dkrKtjd|n|rr|j|}|j|}n|S(s%dictionary of stream level parameterss!reading bundle2 stream parametersisnegative bundle param size: %i(RRRRRtBundleValueErrorRt_processallparams(R-R$t paramssize((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR$s   cC`stj}x|jdD]{}|jdd}g|D]}tj|^q;}t|dkrx|jdn|j||d||dR0R1t _processparam(R-t paramsblockR$Rmti((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRs " cC`s|stdn|dd!tjtjkrGtd|nyt|j}WnPtk r|dd!jrt |j d|qt j d|fnX||||dS(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 nameiisnon letter first character: %ssignoring unknown parameter %sR$N( RR RRRtb2streamparamsmapR!tKeyErrortislowerRRRR(R-RRR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRs  cc`s%|jV|jtd}|dkr=tjd|ntt|V|ru|j|}|j||Vn|jj |j |_ d}x|dkr |jt d}tt |V|rd}n |d7}q|t krqn|dkrtjdn|j|VqWdS(sWutility to transfer a bundle2 as binary This is made necessary by the fact the 'getbundle' command over 'ssh' have no way to know then the reply end, relying on the bundle to be interpreted to know its end. This is terrible and we are sorry, but we needed to move forward to get general delta enabled. isnegative bundle param size: %iiisnegative chunk size: %iN( RRRRRRRRRtdecompressorreaderRRt flaginterrupt(R-RR$t emptycountR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt_forwardchunks7s2        cc`s|r tnt}|j|jj|j|_t|jd|j}xC|dk r||j||j}|V|j |j}qPWt|jddS(s'yield all parts contained in the streams!start extraction of bundle2 partssend of bundle2 streamN( tseekableunbundlepartt unbundlepartR$RRRRRt_readpartheaderR1Rk(R-tseekabletclst headerblockRz((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRj_s  cC`s`|jtd}|dkr5tjd|nt|jd||r\|j|SdS(sQreads a part header size and return the bytes blob returns None if emptyisnegative part header size: %ispart header size: %iN(RRRRRRRR1(R-t headersize((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRrs    cC`s|j|jS(N(R$R(R-((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt compressedscC`s&tj|jdr"|jjSdS(sclose underlying filetcloseN(Rt safehasattrRR (R-((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR s(RBRCRDRR.Rt propertycacheR$RRRRpRjRR R (((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR^s   (  t20c`sfd}|S(s/register a handler for a stream level parameterc`s|t<|S(N(R(R%(R(s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt decorators ((RR((Rs7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pytb2streamparamhandlerst compressioncC`sd|tjjkr3tjd|fd|fntjj||_|dk r`t|_ ndS(s<read compression parameter and install payload decompressionR$tvaluesN( RRtsupportedbundletypesRRRRR1RVR(RaRR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pytprocesscompressions  RcB`seZdZd d dedZdZdZedZej dZedZ edZ ded Z d Z d ZRS(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. RGcC`st|d|_||_||_t||_t||_t|_ xS|j|jD]A\}}||j krt j d|n|j j |q`Wd|_ ||_dS(Nsduplicated params: %s(RR1RRvt_dataRt_mandatoryparamst_advisoryparamstsett _seenparamsRRTR3t _generatedR(R-RtmandatoryparamstadvisoryparamsRRtpnamet__((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR.s      cC`sBd|jj|jjf}d|t||j|j|jfS(Ns%s.%ss2<%s object at %x; id: %s; type: %s; mandatory: %s>(t __class__RCRBRRvR(R-R((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt__repr__scC`s(|j|j|j|j|j|jS(sreturn a copy of the part The new part have the very same content but no partid assigned yet. Parts with generated data cannot be copied.(RRvRRRR(R-((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRscC`s|jS(N(R(R-((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRscC`s.|jdk r!tjdn||_dS(Nspart is being generated(RR1RtReadOnlyPartErrorR(R-R((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRscC`s t|jS(N(R8R(R-((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRscC`s t|jS(N(R8R(R-((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRscC`s|jdk r!tjdn||jkrCtd|n|jj||j}|rn|j}n|j ||fdS(sadd a parameter to the part If 'mandatory' is set to True, the remote handler must claim support for this parameter or the unbundling will be aborted. The 'name' and 'value' cannot exceed 255 bytes each. spart is being generatedsduplicated params: %sN( RR1RR RRR3RRR0(R-RRRR$((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRs  cc`s|jdk r!tjdnt|_|jrjd|jg}|js\|jdnt |j }t |j }|s|r|jd|r|jd|n|r|jd|n|jdn|j s|jdnTt j|j d st j|j d r*|jd n|jd t |j |jd |jdj|n|jr|jj}n|jj}t|dtj|j|fttt ||tt|jg}|j }|j }|jttt |t |g} x:|D]2\} } | jt | | jt | q%Wx:|D]2\} } | jt | | jt | qbWttt | d| } |j| x.|D]&\} } |j| |j| qWx.|D]&\} } |j| |j| qWydj|} Wn!tk r\td|nXt|dt | ttt | V| VyKxD|jD]6}t|dt |ttt |V|VqWWnt k r|jdnt!k r}t"j#|}|jd|t$j%d}d|}t&dd|fgdt}d|_ttdVx|j'd|D] }|VqWt|dttdVtj(||nXt|dttdVt)|_dS(Nspart can only be consumed oncesbundle2-output-part: "%s"s (advisory)s (params:s %i mandatorys %i advisoryRs empty payloadtnextt__next__s streamed payloads %i bytes payloads RGs part %s: "%s"is8Found a non-bytes trying to build bundle part header: %rsheader chunk size: %ispayload chunk size: %isbundle2-generatorexit s5bundle2-input-stream-interrupt: encoding exception %ssunexpected error: %ss error:abortRRiiRsclosing payload chunk(*RR1RRTRpR~RvRR0R>RRRRR RRtupperR!RR RRRt_fparttypesizet_fpartidt_fpartparamcountR t TypeErrorRt_payloadchunkst _fpayloadsizet GeneratorExitt BaseExceptionRt forcebytestrtsystexc_infoRRt raisewithtbRV(R-RRRRRtheadertmanpartadvpartparsizesRRt paramsizest headerchunkRRwtbexcRxt interpart((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRs        #  %              cc`stj|jds*tj|jdrotj|j}|jt}x;|rk|V|jt}qNWnt|jr|jVndS(smyield chunks of a the part payload Exists to handle the different methods to provide data to a part.R!R"N(RR Rt chunkbuffertreadtpreferedchunksizeR>(R-tbuffR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR(`s (((RBRCRDRVR.RRRRtsetterRRRRR((((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRs   gitinterrupthandlercB`s)eZdZdZdZdZRS(sread one part and process it with restricted capability This allows to transmit exception raised on the producer size during part iteration while the consumer is reading a part. Part processed in this manner only have access to a ui object,cC`s#tt|j|||_dS(N(RR=R.R(R-RR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR.{scC`s`|jtd}|dkr5tjd|nt|jd||r\|j|SdS(sQreads a part header size and return the bytes blob returns None if emptyisnegative part header size: %ispart header size: %i N(RRRRRRRR1(R-R((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRs    cC`s|jjdt|jd|j}|dkrLt|jddSt|j||j}t|j}t}z8yt ||Wn t t fk rt }nXWd|s|j nX|jjddS(Ns<bundle2-input-stream-interrupt: opening out of band context s0bundle2 stream interruption, looking for a part.s"no part found during interruption.s<bundle2-input-stream-interrupt: closing out of band context (RRRRR1RRtinterruptoperationRpRt SystemExittKeyboardInterruptRVRk(R-RRzRct hardabort((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt__call__s$   (RBRCRDR.RRB(((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR=ss  R>cB`s/eZdZdZedZdZRS(spA limited operation to be use by part handler during interruption It only have access to an ui object. cC`s||_d|_t|_dS(N(RR1RJRpRK(R-R((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR.s  cC`stjddS(Ns'no repo access from stream interruption(RRT(R-((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRHscC`stddS(Ns'no repo access from stream interruption(RW(R-((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRSs(RBRCRDR.RRHRS(((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR>s c c`s|jdd}|j}tjt}|j}|j}tj}|j }||||d} t |d| x| r}| dkr|| } t | | krt j tdt | | fn| Vn2| tkrt||nt jd| ||} t | |krSt j tdt | | fn|| d} |r{|d| q{q{WdS( sReads bundle2 part payload data into chunks. Part payload data consists of framed chunks. This function takes a file handle and emits those chunks. Rs bundle2.debugispayload chunk size: %is6stream ended unexpectedly (got %d bytes, expected %d)snegative payload chunk size: %ss&bundle2-input: payload chunk size: %i N(RRRtStructR)RtunpackRRR9RR>RRRRR=R( RtfhtdologRt headerstructRRDRR9t chunksizets((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pytdecodepayloadchunkss6           RcB`sYeZdZdZdZdZdZdZdZdZ d dZ RS( s a bundle part read from a bundlecC`stt|j|tj|do7tj|d|_||_||_d|_t |_ t |_ d|_ d|_d|_d|_d|_d|_|jd|_d|_dS(Ntseekttelli((RRR.RR t _seekableRt _headerdatat _headeroffsetRpt _initializedtconsumedR1RRvRRR$Rt _readheadert _mandatoryt_pos(R-RR0R((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR.s"             cC`s.|j}|j|||!}|||_|S(s+return the next byte from the header(RORN(R-RtoffsetR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt _fromheaders  cC`s%|jtj|}t||S(saread given format from header This automatically compute the size of the format to read.(RVRRR(R-RR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt _unpackheaderscC`sct||_t||_tj|j|_|jj|jtd|D|_dS(s7internal function to setup all logic related parameterscs`s|]}|dVqdS(iN((t.0Rm((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pys sN( R8RRRRR$RQR#R(R-RR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt _initparams s c C`s|jtd}|j||_t|jd|j|jtd|_t|jdtj |j|j|jj k|_ |jj |_|jt \}}t|jd||t ||}|j|}tt|ddd|ddd}|| }||}g}x9|D]1\} } |j|j| |j| fq;Wg} x9|D]1\} } | j|j| |j| fq}W|j|| tj|j|_t|_dS(s$read the header and setup the objectispart type: "%s"s part id: "%s"spart parameters: %iNii(RWR$RVRvRRR%RR RR!RR&R RtzipR0RYRR8R(t_payloadstreamRVRP( R-ttypesizetmancounttadvcountt fparamsizesR4tmansizestadvsizest manparamsRRt advparams((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRRs. /  ))cC`st|j|jS(s+Generator of decoded chunks in the payload.(RJRR(R-((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR(9scC`sQ|jr dS|jd}x.|rL|jt|7_|jd}qWdS(sRead the part payload until completion. By consuming the part data, the underlying stream read offset will be advanced to the next part (or end of stream). Ni(RQR9RTR>(R-R((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRk=s   cC`s|js|jn|dkr4|jj}n|jj|}|jt|7_|dksyt||kr|j r|jr|jj d|jnt |_n|S(sread payload datas*bundle2-input-part: total payload size %i N( RPRRR1R[R9RTR>RQRRRV(R-RR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR9Ks     N( RBRCRDR.RVRWRYRRR(RkR1R9(((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRs    #  RcB`sYeZdZdZddZdZdZejdZ ddZ dZ RS( sA bundle2 part in a bundle that is seekable. Regular ``unbundlepart`` instances can only be read once. This class extends ``unbundlepart`` to enable bi-directional seeking within the part. Bundle2 part data consists of framed chunks. Offsets when seeking refer to the decoded data, not the offsets in the underlying bundle2 stream. To facilitate quickly seeking within the decoded data, instances of this class maintain a mapping between offsets in the underlying stream and the decoded payload. This mapping will consume memory in proportion to the number of chunks within the payload (which almost certainly increases in proportion with the size of the part). cC`s)g|_tt|j|||dS(N(t _chunkindexRRR.(R-RR0R((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR.ls icc`st|jdkr4|jjd|jfn|j|j|d|j|d}xpt|j|jD]Y}|d7}|t|7}|t|jkr|jj||jfn|VqsWdS(s/seek to specified chunk and start yielding dataiiN(R>RdR0t_tellfpt_seekfpRJRR(R-tchunknumtposR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR(rs cC`syxft|jD]U\}\}}||kr8|dfS||kr|d||j|ddfSqWtddS(s>for a given payload position, return a chunk number and offsetiis Unknown chunkN(RiRdR(R-RhRtppostfpos((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt _findchunks "   %cC`s|jS(N(RT(R-((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRLscC`s|tjkr|}n|tjkr7|j|}nq|tjkr|js}|jd}x|ry|jd}qaWn|jdd|}ntd|f||jddkr|j r|jd}x|r|jd}qWnd|ko|jddkns-tdn|j|kr|j |\}}t j |j ||_ |j|}t||krtjtdn||_ndS(NiiisUnknown whence value: %risOffset out of ranges Seek failed (tostSEEK_SETtSEEK_CURRTtSEEK_ENDRQR9RdRRkRR8R(R[R>RRR(R-RUtwhencetnewposRtinternaloffsettadjust((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRKs0   ! 'cC`s2|jr|jj||SttddS(smove the underlying file pointer This method is meant for internal usage by the bundle2 protocol only. They directly manipulate the low level stream including bundle2 level instruction. Do not use it to implement higher-level logic or methods.sFile pointer is not seekableN(RMRRKtNotImplementedErrorR(R-RURp((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRfs cC`sX|jrTy|jjSWqTtk rP}|jtjkrJt|_qQqTXndS(s,return the file offset, or None if file is not seekable This method is meant for internal usage by the bundle2 protocol only. They directly manipulate the low level stream including bundle2 level instruction. Do not use it to implement higher-level logic or methods.N(RMRRLtIOErrorterrnotESPIPERpR1(R-te((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRes   ( RBRCRDR.R(RkRLRlRmRKRfRe(((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR[s    Rtaborttunsupportedcontentt pushracedR Rtlistkeystdigeststhttpthttpssremote-changegroupt hgtagsfnodessrev-branch-cachetheadsR tv2tstreamcC`sQ|dkrtjdntj}tttj||dst obsmarkerstpushbacksconcurrent-push-modes check-relatedtrelatedt checkheadsR Rslegacy.exchanget uncompressedt untrustedsbundle2.streamR(RR((R(RRTRsRR8RRtsupportedincomingversionsRt isenabledt exchangeopttformatsRtconfigt configlisttpopRRV(RHt allowpushbacktroleRtsupportedformattcpmodetstreamsupportedtfeaturesupported((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt getrepocapss,        cC`sH|jd}| r&|dkr&iStj|jd}t|S(s0return the bundle capabilities of a peer as dictRZRG(tcapableRRR(tremotetrawtcapsblob((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt bundle2capss cC`sB|jdd}g|D]%}|jdrt|d^qS(sNextract the list of supported obsmarkers versions from a bundle2caps dict RtVi((R9Rtint(Rtobscapstc((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pytobsmarkersversionsc  C`s|jdrLtj||d|} t|| ||d|d|d| S|jdsqtjd|ni} d|krd | d (tbranchtnodestclosedt utf8branchtn(t branchesdata(s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pytgenerateus%& scache:rev-branch-cacheRR( RRt changelogt collectionst defaultdictRt branchinfotrevR3RRp( RHRRRtclRRR R((Rs7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRks  cC`stjdjt|S(NR(RRRR(t requirements((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt_formatrequirementsspecscC`s)t|}dtjd|f}|S(Ns%s%ss requirements=(RRR(RR$((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt_formatrequirementsparamss c K`s|jdtsdStj|sItjtddtdnt|_|jd}|jd}|jj dd}|s|r| rtjtd nt}|j r t |j }|stjtd q |j j |kr t}q ntj||||\}} } t|j} |jd d | } | jd d| dt| jdd|dt| jd| dtdS(NRs<stream data requested but server does not allow this featurethintsrwell-behaved clients should not be requesting stream data from servers not advertising it; the client may be buggyt includepatst excludepatst experimentalsserver.stream-narrow-cloness,server does not support narrow stream clonessPserver has obsolescence markers, but client cannot receive them via stream clonetstream2Rt bytecounts%dRt filecountR(R9RpR tallowservergenerationRRRRRRRRRst_versionRVt generatev2RRRR( RRHRbRRt narrowstreamtincludeobsmarkerstremoteversionsRRtitRRz((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRs6      cC`sn|s dSt|j}tj|}|dkrCtdntj|td|}|jdd|S(sadd an obsmarker part to the bundler with No part is created if markers is empty. Raises ValueError if the bundler doesn't support any known obsmarker format. s0bundler does not support common obsmarker formatRRRN( R1RRsRt commonversionRt encodemarkersRVR(RtmarkersRRR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRs c `sI|dkrt|}|j||jddj}|jdjdjkr|jddjddtn|j} njd krtj t d nt |\} | t j jkrtj t d | nt j j| fd } | } tj|| |d |S(sWrite a bundle file and return its filename. Existing files will not be overwritten. If no filename is specified, a temporary file is created. bz2 compression can be turned off. The bundle file will be deleted in case of errors. RRRRRRs%dRRs.old bundle types only supports v1 changegroupss#unknown stream compression type: %sc3`s1Vx%jjD] }|VqWdS(N(RR(R(Rt compengineRR0(s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRsR(RRRRRRRRpRRRt bundletypesRRRRRR( RRRRRRRRRzRtcomp((RRRR0s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyRs&     cC`sg|jdD]}|jdd^q}d}d}x^|D]V}|dkr[d}Pn|dkrx||d7}q?|dkr?||d7}q?q?W|dkrd|}n|dkrd|}n|S(s:logic to combine 0 or more addchangegroup results into oneRRiii(RIR9(Rctrtresultst changedheadstresultR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pytcombinechangegroupresultss")        RRRt treemanifestRc C`sddlm}|j}|jjdd}tj||d}d}d|jkrvt|jjd}nd|jkrd|j j krt |j j dkrt jtdn|j j jd|j|j j|j j |j j|j j_|j jni}|jjd }|dk rQt||d RRRRR3tresolvestorevfsoptionsRtfeaturestsvfstoptionst_writerequirementsR`RJRRpRR RR( RctinpartRR[tunpackerversionRt nbchangesetst extrakwargsRRRz((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pythandlechangegroups8  *  RRs digest:%scC`sy|jd}Wn*tk r=tjtddnXtj|}|jtdkrtjtd|jnyt |jd}WnSt k rtjtddn*tk rtjtddnXi}xu|jj ddj D]X}d |}y|j|}Wn*tk r[tjtd|nX|||: the hexadecimal representation of the digest with that name. Like the size, it is used to validate what was retrieved by the client matches what the server knows about the bundle. When multiple digest types are given, all of them are checked. Rs&remote-changegroup: missing "%s" paramsremote-changegroups+remote-changegroup does not support %s urlsRs0remote-changegroup: invalid value for param "%s"R}RGs digest:%si(texchanges%s: not a bundle version 1.0RZsreply:changegroups in-reply-toRRs%isbundle at %s is corrupted: %sN($R$RRRRRRtschemeRsRRR9Rt digestcheckertopenRRSRGR t readbundleRHR]Rt cg1unpackert hidepasswordR`RJR1RRR RRRptvalidatetbytes(RcRtraw_urlt parsed_urlRR}ttypRRt real_partR[R RRRzRx((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pythandleremotechangegroup1sV    "  $ #sreply:changegroupRs in-reply-tocC`sGt|jd}t|jd}|jjdi|d6|dS(NRs in-reply-toR(RR$RIR3(RcRRtreplyto((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pythandlereplychangegrouptsscheck:bookmarksc C`stj|}d}d}d}x|D]\}}|jjj|}||kr(|dkr}||tj|f} nM|dkr||tj|f} n%||tj|tj|f} tj | q(q(WdS(scheck location of bookmarks This part is to be used to detect push race regarding bookmark, it contains binary encoded (bookmark, node) tuple. If the local state does not marks the one in the part, a PushRaced exception is raised s]remote repository changed while pushing - please try again (bookmark "%s" move from %s to %s)sbremote repository changed while pushing - please try again (bookmark "%s" is missing, expected %s)sfremote repository changed while pushing - please try again (bookmark "%s" set on %s, expected missing)N( Rt binarydecodeRHt _bookmarksR9R1tnodemodtshortRt PushRaced( RcRtbookdatat msgstandardt msgmissingtmsgexisttbookRt currentnodetfinalmsg((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pythandlecheckbookmarkszs   s check:headscC`s|jd}g}x2t|dkrI|j||jd}qW|jjddrl|jnt|t|jjkrt j dndS(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.iRtbundle2lazylockings:remote repository changed while pushing - please try againN( R9R>R0RRRSRRHRRR (RcRthR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pythandlecheckheadss  !scheck:updated-headscC`s|jd}g}x2t|dkrI|j||jd}qW|jjddrl|jnt}x*|jjj D]}|j |qWx,|D]$}||krt j dqqWdS(sNcheck for race on the heads touched by a push This is similar to 'check:heads' but focus on the heads actually updated during the push. If other activities happen on unrelated heads, it is ignored. This allow server with high traffic to avoid push contention as long as unrelated parts of the graph are involved.iRR)s:remote repository changed while pushing - please try againN( R9R>R0RRRSRRHt branchmapt itervaluesRQRR (RcRR*Rt currentheadstls((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pythandlecheckupdatedheadss      s check:phasesc C`stj|}|jj}|j}|j}d}xt|D]\}}xq|D]i} |j||j| } | |krV|t j | tj | tj |f} t j | qVqVWqCWdS(sjcheck that phase boundaries of the repository did not change This is used to detect a push race. sQremote repository changed while pushing - please try again (%s is %s expected %s)N(R RRHRRt _phasecacheRitphaseRRRt phasenamesRR ( RcRt phasetonodestunfiRt phasecacheRt expectedphaseRRt actualphaseR'((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pythandlecheckphasess     RcC`s;x4|jjD] }|jjtd|qWdS(s3forward output captured on the server to the clients remote: %s N(R9RRRR(RcRR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt handleoutputsR|cC`s=t|j}|jdkr9t|j||_ndS(sqNotify that a reply bundle should be created The payload contains the capabilities information for the replyN(RR9RJR1RR(RcRR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pythandlereplycapsst AbortFromPartcB`seZdZRS(s=Sub-class of Abort that denotes an error from a bundle2 part.(RBRCRD(((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyR<ss error:abortRRcC`s)t|jdd|jjddS(s*Used to transmit abort error over the wireRRN(R<R$R9(RcR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pythandleerrorabortss error:pushkeyt namespaceRtnewtoldRcC`shi}x9dD]1}|jj|}|dk r |||RR?R@Rs in-reply-toN(R>RR?R@R(R$R9R1Rt PushkeyFailedR t strkwargs(RcRRbRR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pythandleerrorpushkeys  serror:unsupportedcontentRR$cC`si}|jjd}|dk r1||dR|N(R$R t decodekeysR9RIR3(RcRR>R((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pythandlelistkeyss c C`stj}||jd}||jd}||jd}||jd}|jjddrw|jn|jj||||}i|d6|d6|d6|d6}|jjd||j dk r'|j j d} | j d t j|jd t| j d d |d tn|jr| ri} x1dD])}||jkrD|j|| |RR@R?RR)R s reply:pushkeys in-reply-toRRs%iRR7s%dN(R>RR?R@R(R tdecodeR$RRRSRHRIR3RJR1RRR RRRpRRRARB( RcRtdecR>RR@R?RtrecordtrpartRb((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt handlepushkeys2     c `stj|}jjjdd}jjdd}|dkrj}jj}|r7gx|D]\}}|j j } d| dRRGR@R?t prepushkeytthrowc`s1x*D]"}jjdtj|qWdS(NR (RHthookR RB(RL(tallhooksRc(s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pytrunhookbs RItbookmarkRsunkown bookmark mode: %sN(RRRHRRRNR9RSRRLRRthexR1R0RQRVR RBt applychangest _afterlockRIR3RRT( RcRtchangesRNt bookmarksmodeR[t bookstoreR%RRLRSRK((RRRcs7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pythandlebookmark7s8      %  s phase-headscC`s2tj|}tj|jj|j|dS(s%apply phases from bundle part to repoN(R Rt updatephasesRHRRS(RcRR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt handlephasesnss reply:pushkeycC`sGt|jd}t|jd}|jjdi|d6|dS(s(retrieve the result of a pushkey requestRs in-reply-toR N(RR$RIR3(RcRRR7((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pythandlepushkeyreplytsRcC`sC|j}|j}|jjddrJ|jjdt|n|j rz|jjj rz|jjj ddS|jjj ||}|jj |r|jjj td|n|jjdi|d6|jdk r?|jjd }|jd tj|jd t|jdd |d tndS( s&add a stream of obsmarkers to the repoRsobsmarkers-exchange-debugs&obsmarker-exchange: %i bytes received s3ignoring obsolescence markers, feature not enabled Ns%i new obsolescence markers RR?sreply:obsmarkerss in-reply-toRs%i(RSR9RRtwriteR>RRHRtreadonlyRt mergemarkerstinvalidatevolatilesetsRRRIR3RJR1RRR RRRp(RcRR[t markerdataR?RL((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pythandleobsmarker{s$     sreply:obsmarkerscC`sGt|jd}t|jd}|jjdi|d6|dS(s(retrieve the result of a pushkey requestR?s in-reply-toRN(RR$RIR3(RcRRR7((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pythandleobsmarkerreplyscC`s|jjddr"|jntj|jj}d}xztr|jd}|jd}t |dkst |dkr|jj dPn|j |||d7}qCW|j |jj d|dS( s|Applies .hgtags fnodes cache entries to the local repo. Payload is pairs of 20 byte changeset nodes and filenodes. RR)iis1ignoring incomplete received .hgtags fnodes data is'applied %i hgtags fnodes cache entries N( RRRSR RRHRRVR9R>RtsetfnodeR_(RcRRRgRR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pythandlehgtagsfnodess  $ s>IIIscache:rev-branch-cachec C`sQd}|jtj}|jj}|jjj}x|rBtj|}||d|d7}|j|d}tj |}xOt j |dD]:} |jd} |j | } |j || | tqWxOt j |dD]:} |jd} |j | } |j || | tqW|jtj}q<W|jdS(sreceive a rev-branch-cache payload and update the local cache The payload is a series of data related to each branch 1) branch name length 2) number of open heads 3) number of closed heads 4) open heads nodes 5) closed heads nodes iiiiN(R9RRRHRRRRDRttolocalR txrangeRtsetdataRpRVR_( RcRttotalt rawheaderRRR0RRtxRR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt handlerbcs&  tpushvarscC`si|jjddrei}x7|jD],\}}|j}d|}|||RRRRRR t applybundlev2(RcRzRRRRHR((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pythandlestreamv2bundles   c C`st|j}t}|j} x0|jd|D]} |j| j| q4W|rtj||d|d|d|} | j tt j gt |t ddt } |jdd| } | jd |d |jkr| jd d qn|S( sgenerates bundle2 for widening a narrow clone repo is the localrepository instance oldmatcher matches what the client already has newmatcher matches what the client needs (including what it already has) common is set of common heads between server and client known is a set of revs known on the client side (used in ellipses) cgversion is the changegroup version to send ellipses is boolean value telling whether to send ellipses data or not returns bundle2 of the data required for extending s::%lnt oldmatchertmatchert fullnodest narrow_widenRRRRRRY(RRRRRR3RRt getbundlerRRtnullidRRpRRR(RHRut newmatchertcommontknownRtellipsesRt commonnodesRRtpackertcgdataRz((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyt widen_bundles"   ((RGR((RR(RR(RR(((RyRzR{R (((R~R(((R(R(RRRR(Rs in-reply-to(RR(R>RR?R@Rs in-reply-to(RR$(R(R>(R>RR@R?(Rs in-reply-to(R?s in-reply-to(RRR(RDt __future__RRRRvRltreRRR-ti18nRRGRRRRRRRR R R R R RRtutilsRturlerrRRRRDRRRR$R%R)R&R:tcompileRRRRR R"R(tobjectR)RFt RuntimeErrorRWRXR1RdReR_RR`RRRRRtbundlepriorityRRRR^RRRRRRR=R>RJRRR8RtDIGESTStkeysRsRpRRRRRRRRRRRRRR tkt_remotechangegroupparamsRRR(R+R0R9R:R;RR<R=RCRDRFRHRMR[R]R^RdReRgRCRRnRrRtR(((s7/usr/lib64/python2.7/site-packages/mercurial/bundle2.pyts       X         /1  D$   (    y    0 1ux  '   *     ,  ' +*C   7