\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c @@sddlmZddlZddlZddlmZddlmZmZm Z m Z ddl m Z ddl mZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z"m#Z#ddl$m%Z%e#j&Z&e#j'Z'd Z(id d 6d d 6dd6d d6Z)iie*d6d d6e+d6e+d6e+d6e+d6d 6ie*d6d d6e+d6e+d6e*d6e*d6d 6idd6d6Z,e,d e,de=d0d1Z?e=d2d3Z@e=d4d5ZAe=d6d7ZBd8ZCd9ZDgZEiZFdd:ZGd;ZHd<ZIeGd=d>ZJeGd?d@ZKeGd0dAZLeGd2dBZMdCZNdDZOeGdEdFZPeGd6dGZQdHZRdIZSdJZTeGdKdLddMZUdNZVdOZWdPZXejYdQZZdRZ[dSZ\dTe0fdUYZ]dVe#j^fdWYZ_dXZ`dYZade+dddddddZZbgZciZdd[Zed\Zfeed]d^Zgeedd_Zhd`ZidaZjdbZkdcZlddZmdeZndfZodgZpddhZqdiZrgZsiZtddjZudkZvddddlZweudmdnZxeuddddddoZyeud6dddpZzeudqdddrZ{eudEddddsZ|eudddddtZ}eududddddvZ~eudwdddddxZdyZdzZd{Zd|Zd}Ze+d~Zde0fdYZdZdZdS(i(tabsolute_importNi(t_(tbinthextnullidtnullrev(tattr(t bookmarkstbundle2t changegroupt discoveryterrort exchangev2tlockt logexchanget narrowspectobsoletetphasestpushkeytpycompatt repositorytscmutiltsslutilt streamcloneturltutil(t stringutilt narrowhgaclt01tv1t02tv2ts1tpacked1RR s cg.versiont obsolescenceRttagsfnodescachetrevbranchcachetstreamv2tgziptbzip2tnonet bundlespeccB@sPeZejZejZejZejZejZejZ RS(( t__name__t __module__Rtibt compressiontwirecompressiontversiont wireversiontparamst contentopts(((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyR)[s      cC@sd}|r7d|kr7tjtd|nd|kr|jdd\}}|tjjkrtjtd|n||\}}|tkr|tjtd|q|n| st ||\}}|tjjkr3|}d}d|j krd }n|t kr|d }q|nI|tkrc|d krTd }nd }|}ntjtd ||dkr|t krtjtd|n|d kr"d|kr"t |djd}||j }|r"tjtddjt|q"ntj|ij} d|krp|dd krptd} | j| ntjj|} | j\}} t|} t|| || || S(sParse a bundle string specification into parts. Bundle specifications denote a well-defined bundle/exchange format. The content of a given specification should not change over time in order to ensure that bundles produced by a newer version of Mercurial are readable from an older version. The string currently has the form: -[;[;]] Where is one of the supported compression formats and is (currently) a version string. A ";" can follow the type and all text afterwards is interpreted as URI encoded, ";" delimited key=value pairs. If ``strict`` is True (the default) is required. Otherwise, it is optional. Returns a bundlespec object of (compression, version, parameters). Compression will be ``None`` if not in strict mode and a compression isn't defined. An ``InvalidBundleSpecification`` is raised when the specification is not syntactically well formed. An ``UnsupportedBundleSpecification`` is raised when the compression or bundle type/version is not recognized. Note: this function will likely eventually return a more complex data structure, including bundle2 part information. cS@sd|kr|ifSi}|jdd\}}x|jdD]n}d|krrtjtd|n|jdd\}}tj|}tj|}||| function mapping and appended to the list of steps. Beware that decorated function will be added in order (this may matter). You can only use this decorator for a new step, if you want to wrap a step from an extension, change the pushdiscovery dictionary directly.c@s-tkst|tss::%ln( Rt isenabledRUt exchangeopttobsstoreRRRJRtrelevantmarkersR(RRUtnodes((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt_pushdiscoveryobsmarkerss  Rc @s$|j}|jj}|j}|jdd}|jrstj|jj |j}|jj |dt }nt |d}t g|jD]}|jj|^q}tj|}tj||j|} dfd} g| D]} | | ^q} t||||| S(Nschecking for updated bookmarks t inclusiveRcS@s|dkr|St|S(N(RdR(tx((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pytsafehexs c@s5g|D]*\}}}|||f^qS(N((RRtscidtdcid(R (s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pythexifycompbookmarkss((RkRURRRRRtmaplistRtrevt ancestorstTrueRRJRt _bookmarkst expandnametbookmodtunhexlifybookmarkstcomparebookmarkst_processcompared( RRkRURRtrevnumstremotebookmarktbookmarktexplicitRR tmarks((R s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt_pushdiscoverybookmarkss"    ( cC@s |\}}}}} } } } |j} xl|D]d\}}}||krY|j|n| sv| |j|kr.|jj|||fq.q.WxL|D]D\}}}||kr|j||jj|d|fqqWxft|t| t| D]D\}}}||kr|j||jj|||fqqWxL|D]D\}}}||krU|j||jj||dfqUqUWx3| D]+\}}}||kr|j|qqW|rt|}|jjt d|dd|_ n|jj dS(s~take decision on bookmark to pull from the remote bookmark Exist to help extensions who want to alter this behavior. Rs>bookmark %s does not exist on the local or remote repository! iiN( RUtremoveRRRRRMRktwarnRRtsort(RtpushedRt remotebmsRtaddsrctadddsttadvsrctadvdsttdivergetdiffertinvalidtsameRURR R ((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRs8      0          c C@s|j}|jj}|js>tj|j||jtS|j s|j rt d}t d}t d}it dd6|d6|d6}xp|j D]b}||}|j rtj||q|jrtj||jd|qqWntj|ntS( Ns%push includes obsolete changeset: %s!s,push includes phase-divergent changeset: %s!s.push includes content-divergent changeset: %s!s#push includes orphan changeset: %s!torphansphase-divergentscontent-divergenti(RRURRRtnochangesfoundRktexcludedRRRRRRR Rgt isunstablet instabilitiesR t checkheadsR( RRRtmsotmspdtmscdtmstRtctx((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt_pushcheckoutgoings*           +c@sfd}|S(swdecorator for function generating bundle2 part The function is added to the step -> function mapping and appended to the list of steps. Beware that decorated functions will be added in order (this may matter). You can only use this decorator for new steps, if you want to wrap a step from an extension, attack the b2partsgenmapping dictionary directly.c@sLtkst|t<dkr8tjntj|S(N(tb2partsgenmappingRHRdtb2partsgenorderRtinsert(R(tidxR(s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRs   ((RR9R((R9Rs8/usr/lib64/python2.7/site-packages/mercurial/exchange.pytb2partsgenerator s c C@s|j r|jjrd|jjddk}|jdk}| sM|rl|jddt|j qt }xr|jj D]a\}}|\}}} } |dk rt |} |t | | @O}|| t |O}qqW|rtt |} |jdd| qndS(sdGenerate race condition checking parts Exists as an independent function to aid extensions trelatedR/s check:headstdatascheck:updated-headsN(( RRRt capabilitiesRORRdtnewparttiterRRJt iteritemsRM( Rtbundlertallowunrelatedt emptyremotetaffectedtbranchRRtnewheadst unsyncedheadstdiscardedheadsRR<((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt_pushb2ctxcheckheads s    cC@s+t|jjp'|jp'|jp'|jS(s&return True if we are pushing anything(tboolRRRRR(R((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt_pushing8s  scheck-bookmarksc C@st| s|jrdStj|j}d|k}|joD|sKdSg}x9|jD].\}}}t|}|j||fq[Wtj |}|j dd|dS(sinsert bookmark move checkingNRscheck:bookmarksR<( RKRRt bundle2capsRRRRRt binaryencodeR>( RRAtb2capsthasbookmarkcheckR<tbooktoldtnewt checkdata((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt_pushb2checkbookmarks?s  s check-phasescC@st| s|jrdStj|j}d|jddk}|jdk r|rgtj D] }g^qc}|tj j |jj |tj j |jjt|rx|D]}|jqWtj|}|jdd|qndS(sinsert phase move checkingNRRs check:phasesR<((RKRRRLRRORRdRt allphasestpublicRt publicheadstdraftRtanyRRMR>(RRARNt hasphaseheadsR;tchecksRRS((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt_pushb2checkphasesOs  c@s_djkrdSjjdts3dSjjt|tjj}d}|j d}|rg|D]$}|t j jkr|^q}|st t dnt|}nt jjj|d}|jdd||r$jd|nd jjkrIjd d nfd }|S( swhandle changegroup push through bundle2 addchangegroup result is stored in the ``pushop.cgresult`` attribute. t changesetsNRR sno common changegroup versionRR<R/t treemanifestt1c@sJ|jjj}t|ddks1t|ddd_dS(s0extract addchangegroup returns from server replyR iitreturnN(trecordst getrepliestidtlenRHR(Rt cgreplies(tcgpartR(s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt handlereplys(RtaddR5RUtprepushoutgoinghooksRIRRLRROR tsupportedoutgoingversionst ValueErrorRtmaxt makestreamRR>taddparamRA(RRARNR/t cgversionstvtcgstreamRg((RfRs8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt _pushb2ctxas4     cC@sd|jkrdStj|j}|jj}d|jddk}d|k}d|jddk}|r| rt||S|rt ||SdS(s!handle phase push through bundle2RNRslegacy.exchangeRR(( RRRLRRURkRROt_pushb2phaseheadst_pushb2phasespushkey(RRARNRkt legacyphaset haspushkeyRZ((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt _pushb2phasess    cC@s||jjd|jrxgtjD] }g^q#}|djd|jDtj|}|jdd|ndS(s6push phase information through a bundle2 - binary partRics@s|]}|jVqdS(N(R(Rth((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pys ss phase-headsR<N(RRhRRRURRMR>(RRAR;tupdatest phasedata((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRss  c@sjjdgfd}tj}xjD]}|jd}|jd|d|jd||j|jd|dtj |jd|dtj j |j |f|j |j RnRRRXRVRRcR(RRARtenct newremoteheadRRg((RRs8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRts  t obsmarkerscC@s}d|jkrdStj|j}tj|dkr>dS|jjd|jryt |j}tj ||ndS(NR( RRtobsmarkersversionR=Rt commonversionRdRhRRMtbuildobsmarkerspart(RRAtremoteversionstmarkers((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt_pushb2obsmarkerss cC@sd|jkrdStj|j}|jjjdd}d|k}| rid|krit||Sd|krt||SdS(s$handle bookmark push through bundle2RNRslegacy.exchangeR( RRRLRRURkRt_pushb2bookmarkspartt_pushb2bookmarkspushkey(RRARNtlegacyt legacybooks((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt_pushb2bookmarkss   cC@s|s dS|sdSdS(s"small utility for bookmark pushingRRRR((RQRR((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt _bmactions c@sjjdjsdSgg}xUjD]J\}}}t|}|j||fj|t||fq3Wtj|}|jdd|fd}|S(NRR<c@s=j}x-D]%\}}|jt|d|qWdS(Ni(Rktstatust bookmsgmap(RRkRPtaction(t allactionsR(s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRgs ( RRhRRRRRRMR>(RRAR<RPRQRRRSRg((RRs8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRs   c @sjjdgtj}fd}xjD]\}}}|jd}|jd|d|jd|||jd|||jd||d}|sd }n|sd }nj|j||f|j |jRnRRcR( RRARRRPRQRRRRRg((RRs8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRs&   RR9c C@s|j}|ri}xX|D]P}d|krJd}tj||n|jdd\}}|||s(RJ(th1th2tres(R(s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt headsofdiffsc@s)jd||}td|DS(sReturns heads((h1 + h2) - null)sheads((%ln + %ln - null))cs@s|]}|jVqdS(N(R(RR4((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pys s(RJ(RRR(R(s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt headsofunionsc3@s|]}j|VqdS(N(R(RR(tunficl(s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pys s( RRRRRdt _pullbundle2RtNARROW_REQUIREMENTRAtallRRRJ(RUtpullopRRt old_headstclstartt new_heads((RRs8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt_fullpullbundle2s"      c C@s|d kri}n|s!|rB|p-t}|p<t}n|j\}}tj|tj|t||||d|d|d|d|d| tj|} | jj } | rt| j | j j } | rt ddjt| } tj| qnt|d|j| _|j|j| j|jd rptj| nbt| tj| t| | jrt|| nt | t!| t"| t#| Wd QXWd QXWd QX|j$j%d d r t&j'||n| S( sjFetch repository data from a remote. This is the main function used to retrieve data from a remote repository. ``repo`` is the local repository to clone into. ``remote`` is a peer instance. ``heads`` is an iterable of revisions we want to pull. ``None`` (the default) means to pull everything from the remote. ``bookmarks`` is an iterable of bookmarks requesting to be pulled. By default, all remote bookmarks are pulled. ``opargs`` are additional keyword arguments to pass to ``pulloperation`` initialization. ``streamclonerequested`` is a boolean indicating whether a "streaming clone" is requested. A "streaming clone" is essentially a raw file copy of revlogs from the server. This only works when the local repository is empty. The default value of ``None`` means to respect the server configuration for preferring stream clones. ``includepats`` and ``excludepats`` define explicit file patterns to include and exclude in storage, respectively. If not defined, narrow patterns from the repo instance are used, if available. ``depth`` is an integer indicating the DAG depth of history we're interested in. If defined, for each revision specified in ``heads``, we will fetch up to this many of its ancestors and data associated with them. Returns the ``pulloperation`` created for this pull. RRRRRs:required features are not supported in the destination: %ss, tpullscommand-changesetdataNRR((RdRJt narrowpatsRtvalidatepatternsRRRRRRARURRRLRMR RgRRRRR RR Rt_maybeapplyclonebundleRtmaybeperformlegacystreamclonet_pulldiscoveryRRt_pullchangesett _pullphaset_pullbookmarkst _pullobsoleteRkRRR(RURRRRRRRRRRt peerlocalRR((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRsL               c@sfd}|S(s|decorator for function performing discovery before pull The function is added to the step -> function mapping and appended to the list of steps. Beware that decorated function will be added in order (this may matter). You can only use this decorator for a new step, if you want to wrap a step from an extension, change the pulldiscovery dictionary directly.c@s-tkst|thook function so that extensions can extend the getbundle callN((RR((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyR sc C@sd|jkrdS|jjd|jsR|jjjtdd|_dS|j}|j dkrt |j t gkr|jjjtdn0|j dkr|jjdr|j|_ n|jjdr|jjdd |j d |j p |j}n|j dkrf|jj0}|jdi|jd 6dd 6j}WdQXnu|jjdstjtd nK|jj:}|jdi|jd6|j d 6dd 6j}WdQXtj|j||d|jj}tj||_dS(s0pull changeset from unbundle into the local repoR Nsno changes found isrequesting all changes tchangegroupsubsetR RRRRRsWpartial pull cannot be done because other repository doesn't support changegroupsubset.tbases(RRhRRURkRRRRRRdRRRRRRR RRRR RgRt applybundleRR(RttrRRtbundleop((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRs<   '!     cC@s6d|jkrdSt|jd}t||dS(NR(RRRR(RR((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRsc C@sd|jkrdS|jjdt|jdt}|ru| rutj|j|j|\}}|j}n|j}g}|jj }|j j }|j j j}tj} tj} g|D]'} |||| | kr| ^q}|r"|j} tj|j| | |ng|D]'} |||| | kr)| ^q)}|r|j} tj|j| | |ndS(s/apply phase movement from observed remote stateRNR(RRhRJRORRRRURRt _phasecacheRRRRVRXRR( RRRRt_drtdheadsRRRRVRXtpnR((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRs0       4 4 cC@sjd|jkrdS|jjd|j}|j}tj|j|||jj|j d|j dS(s?process the remote bookmark information to update the local oneRNR( RRhRURRtupdatefromremoteRkRRRR(RRUR((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyR(s    cC@sd|jkrdS|jjdd}tj|jtjr|jjjdt |j d}d|kr|j }g}x^t |dt D]J}|jdrtj||}tj|\}}||7}qqW|r|jjj||n|jjqn|S(sVutility function to pull obsolete markers from a remote The `gettransaction` is function that return the pull transaction, creating one if necessary. We return the transaction to inform the calling code that a new transaction have been created (when applicable). Exists mostly to allow overriding for experimentation purposeRNs!fetching remote obsolete markers Rtdump0Rtdump(RRhRdRRRURRkRRRRRMRReRt b85decodet _readmarkersRtinvalidatevolatilesets(RRt remoteobsRR<R<R/tnewmarks((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyR4s&  c C@s|j}|j|jjdp*|j}|jt|d|jtd}|jt|d|jtd}|stjt dj t|ng|D]"}|dkrdnd |^q}g|D]"}|dkrdnd |^q}t |jd g}t |jd g}t j ||||\}}} | r}tjt d j || ni} | j|t| d s c@sh|]}|qS(((RR(R=(s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pys s cS@si|]}d|qS(i((RRx((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pys s c@sZ|j|xBt|dkrU|\}}||||}qWdS(s=Add a root to an ellipsis head, splitting heads with 3 roots.iN(RhRd(theadt curchangetchildtroots(t ellipsisrootst splitheadt splitroots(s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pytaddroots c@sH|j||j||j||j|dS(N(tdifference_updateRhRRtdiscard(R>R@RA(RB(s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRDsc@st|\}}}x||f||f||ffD]\}}jd||||}x\|D]T}||kr|||ffS|kst|dkri|||ffSqiWq;Wtjtd||||fdS(Ns%sort(merge() & %d::%d & %d::%d, -rev)is;Failed to split up ellipsis node! head: %d, roots: %d %d %d(RMRRdR RgR(R>tr1tr2tr3tnr1tnr2tmidtj(RBRU(s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRCs.   "RRiiN(Rt manifestlogRRt collectionst defaultdictRJRtfindmissingrevstreversedRtchangelogrevisiont parentrevsRdtminRORtmanifesttreadRJtdiffRdRYtwalkRh(RURRtknowntmatchRRtmflt commonrevst headsrevstrevdeptht ellipsisheadsRERtvisittrelevant_nodestmt visitnodestrequiredRtprevtpstcurdepthR;tneededtshallow_enoughtcurmftp1mftp2mfR>R((R=RBRURCRDs8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt_computeellipsis}sl       " .   .        cC@sEdh}tjtj|d|}|jdtj||S(sFreturn a set with appropriate options to use bundle20 during getbundletHG20Rsbundle2=(RRRRhR7tquote(RURtcapsR((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyR s c@sfd}|S(sdecorator for function generating bundle2 part for getbundle The function is added to the step -> function mapping and appended to the list of steps. Beware that decorated functions will be added in order (this may matter). You can only use this decorator for new steps, if you want to wrap a step from an extension, attack the getbundle2partsmapping dictionary directly.c@sLtkst|t<dkr8tjntj|S(N(tgetbundle2partsmappingRHRdtgetbundle2partsorderRR8(R(R9R(s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRs   ((RR9R((R9Rs8/usr/lib64/python2.7/site-packages/mercurial/exchange.pytgetbundle2partsgenerator s cC@s$|dk r td|DStS(Ncs@s|]}|jdVqdS(tHG2N(Re(Rtcap((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pys s(RdRYR(R((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pytbundle2requesteds c K@stj|}i}t|}|s|rU|jdt rUttdn|rttddjt|j nt |||}d|d<|t j ||d|d|fSd |dRnRdRARL(RARURRRNRRRR/RoRpRRRRRqRtnarrowspecpart((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt_getbundlechangegrouppartUsH ! !!!$ cK@su|jdtsdSd|kr7ttdntj|}tj|}|rq|jdd|ndS(s+add a bookmark part to the requested bundleRNs#no common bookmarks exchange methodR<(RORRkRRtlistbinbookmarksRMR>(RARURRRNRRR<((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt_getbundlebookmarkparts Rc K@sm|jdd}xT|D]L}|jd}|jd||j|j} tj| |_qWdS(s@add parts containing listkeys namespaces to the requested bundleRRN((ROR>RnRtitemsRt encodekeysR<( RARURRRNRRRRR|((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt_getbundlelistkeyspartss  c K@s|jdtr|dkr-|j}ng|jd|D]}|j^q@}|jj|} t| } t j || ndS(s8add an obsolescence markers part to the requested bundleRs::%lnN( RORRdRRJRRRRMRR( RARURRRNRRRtsubsetR((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt_getbundleobsmarkerparts + cK@s|jdtrd|jdkr<ttdn|dkrW|j}ntjt}|j r||t j (RARURRRNRRt headsbyphaseRRRRxt seenphasest draftheadsRWRt extraheadsRt phasemappingRz((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt_getbundlephasesparts8      $ !t hgtagsfnodesc K@sK|jdtod|ks"dSt|||}tj|||dS(sTransfer the .hgtags filenodes mapping. Only values for heads in this bundle will be transferred. The part data consists of pairs of 20 byte changeset node and .hgtags filenodes raw values. RRN(RORRRtaddparttagsfnodescache( RARURRRNRRRR((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt_getbundletagsfnodessscache:rev-branch-cachec K@sp|jdt sCd|ksC|jdtsC|jjtrGdSt|||}tj|||dS(sTransfer the rev-branch-cache mapping 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 Rsrev-branch-cacheR.N( RORRRkt has_sectionR3RRtaddpartrevbranchcache( RARURRRNRRRR((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt_getbundlerevbranchcaches cC@sw|j}tjdjt|j}|dgkpZ||kpZ|d|gksstjd|ndS(sVcheck if the heads of a repo have been modified Used by peer for unbundling. RRthasheds.repository changed while %s - please try againN(Rthashlibtsha1RLRMtdigestR t PushRaced(RUt their_headstcontextRt heads_hash((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt check_heads s  $ c @s{ddddgd}jjdd}jdsNjdrWt}nzt|dt|tjsdj t j g}j Gj |1}tj||} tj| WdQXWdQXn?dyfd } jjdd s2| ntj| d |d d } ztj|d| } Wd| j|rdk rjjdtdtfd}nXddk rdjnWnVtk r0} t| _|r*dk r*j| _fd}nnXWdtjddd|dk rv|jjnXS(sApply a bundle to a repo. this function makes sure the repo is locked during the application and have mechanism to check that no push race occurred between the creation of the bundle and its application. If the push was raced as PushRaced exception is raised.iRsbundle2-output-captures remote:http:s remote:https:suploading changess Nc@s{dssjd<jd<jd<djd<djdR(R(R(s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt recordoutN sic@s,tjdd|dt}j|dS(NRR<R(Rt bundlepartRR(RR(tparts(s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRV s i(RdRkRReRRR{RR}RLRRR RRRRRRt pushbufferRt BaseExceptiontduringunbundle2t salvageoutputt_bundle2salvagedoutputtlockmodRt popbuffer( RURRRRRRttxnnameRRRR}((RRRRURRs8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyR sP         cC@s|j}|j}|jjdds+dSt|r;dS|jrHdS|jds[dS|j}|jdij }WdQXt |_ t ||}|s|jj tddSt||d|j}|s|jjtd|jjtddSt|j|}|dd }|jjtd |t|j||rv|jjtd nO|jjdd r|jjtd n!tjtddtddS(s0Apply a clone bundle from a remote, if possible.RkRNsDno clone bundles available on remote; falling back to regular clone RsOno compatible clone bundles available on server; falling back to regular clone s5(you may want to report this to the server operator) itURLsapplying clone bundle from %s sfinished applying clone bundle tclonebundlefallbacksfalling back to normal clone serror applying bundleRys}if this error persists, consider contacting the server operator or disable clone bundles via "--config ui.clonebundles=false"(RURRkRRdRRRRRRRtparseclonebundlesmanifesttnoteRtfilterclonebundleentriesRRtsortclonebundleentriesRttrypullbundlefromurlR Rg(RRURRRtentriesR((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRa s@     c C@sg}x|jD]}|j}|s1qni|dd6}x|dD]}|jdd\}}tj|}tj|}|||<|dkrMy-t||} | j|d<| j|d scC@s|j|dkS(Ni(R(RR((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt__ne__A s( R*R+RRRRRRRRR(((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyR s  "     c@s}|jdds"t|SgD]}|jdd^q)tfd|D}g|D]}|j^qjS(NRktclonebundleprefersR4ic3@s|]}t|VqdS(N(R(RRp(R(s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pys K s(RRR5RMR=(RkRR;Rti((Rs8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRD s  %cC@s |j|jd}ygtj||}t||d}t|tjrh|j|nt j |||d|t SWnnt j k r}|jtdtj|n9t jk r}|jtdtj|jnXtSWdQXWdQXdS(s%Attempt to apply a bundle from a URL.t bundleurlRCRsHTTP error fetching bundle: %s serror fetching bundle: %s N(R RturlmodtopenRrR{RRjtapplyRRRturlerrt httperrorRRRRturlerrortreasonR(RkRURRRlRR((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRN s  (((t __future__RRPRti18nRRRRRRt thirdpartyRRRRRR R R R R RRRRRRRRRRRRRRtutilsRRR7R3RGRRRNRQRIR9tobjectR)R[RdRrRRRRRRRRRRRRRRRR5R7R6R:RIRKRTR\RrRwRsRtRRRRRRRRRRVRRRRt transactionalRRRRRRRRRRRR RRRRRR<RoR RtRsRuRxRRRRRRRRRRRRRRRRRR(((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyts   "|         <  w     C  5 , $   ( #    - 6 ( <  N  &   Q  ! z  .  #  - ~   / 0    -    J C # 0@