\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||\}}|tkrotjtd|qon||\}}|tjjkr&|}d}d|j krd }n|t krod }qonI|tkrV|d krGd }nd }|}ntjtd ||dkr|t krtjtd|n|d krd|krt |djd}||j }|rtjtddj t|qntj|ij} d|krc|dd krctd} | 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|tss::%ln( Rt isenabledRTt exchangeopttobsstoreRRRIRtrelevantmarkersR(RRTtnodes((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(RcR(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((RjRTRRRRRtmaplistRtrevt ancestorstTrueRRIRt _bookmarkst expandnametbookmodtunhexlifybookmarkstcomparebookmarkst_processcompared( RRjRTRRtrevnumstremotebookmarktbookmarktexplicitRR tmarks((Rs8/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( RTtremoveR RRRRLRjtwarnRRtsort(RtpushedRt remotebmsRtaddsrctadddsttadvsrctadvdsttdivergetdiffertinvalidtsameRTRR 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(RRTRRRtnochangesfoundRjtexcludedRRRRRRR Rft 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@s:|t<dkr&tjntj|S(N(tb2partsgenmappingRctb2partsgenorderRtinsert(R(tidxR(s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRs   ((RR8R((R8Rs8/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 capabilitiesRNRRctnewparttiterRRIt iteritemsRL( 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;( RJRRt bundle2capsRRRRRt binaryencodeR=( RR@tb2capsthasbookmarkcheckR;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;((RJRRRKRRNRRcRt allphasestpublicRt publicheadstdraftRtanyRRLR=(RR@RMt hasphaseheadsR;tchecksRRR((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@s.|jjj}|ddd_dS(s0extract addchangegroup returns from server replyR itreturnN(trecordst getrepliestidR(Rt cgreplies(tcgpartR(s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt handlereplys(RtaddR4RTtprepushoutgoinghooksRHRRKRRNR tsupportedoutgoingversionst ValueErrorRtmaxt makestreamRR=taddparamRA(RR@RMR/t cgversionstvtcgstreamRe((RdRs8/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(( RRRKRRTRjRRNt_pushb2phaseheadst_pushb2phasespushkey(RR@RMRjt legacyphaset haspushkeyRY((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(RRfRRRTRRLR=(RR@R;tupdatest phasedata((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRqs  c@sjjdgfd}tj}xjD]}|jd}|jd|d|jd||j|jd|dtj |jd|dtj j |j |f|j |j dS|jjd|jryt |j}tj ||ndS(NR( RRtobsmarkersversionR<Rt commonversionRcRfRRLtbuildobsmarkerspart(RR@tremoteversionstmarkers((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( RRRKRRTRjRt_pushb2bookmarkspartt_pushb2bookmarkspushkey(RR@RMtlegacyt legacybooks((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyt_pushb2bookmarkss   cC@s|s dS|sdSdS(s"small utility for bookmark pushingRRRQ((RPRQ((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(Rjtstatust bookmsgmap(RRjROtaction(t allactionsR(s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRes ( RRfRRRRRRLR=(RR@R;RORPRQRRRe((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 |js(RI(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(RR3((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pys s(RI(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( RRRRtlent _pullbundle2RtNARROW_REQUIREMENTRAtallRRRI(RTtpullopRRt 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((RcRIt narrowpatsRtvalidatepatternsRRRRRRARTRRRKRLR RfRRRRR RR Rt_maybeapplyclonebundleRtmaybeperformlegacystreamclonet_pulldiscoveryRRt_pullchangesett _pullphaset_pullbookmarkst _pullobsoleteRjRRR(RTRRRRRRRRRRt 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|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 tchangegroupsubsetRRRRRRsWpartial pull cannot be done because other repository doesn't support changegroupsubset.tbases(RRfRRTRjRRRRRRcRRRRRRRRRRR RfRt 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(RRfRIRNRRRRTRRt _phasecacheRRRRURWRR( RRRRt_drtdheadsRRR RURWtpnR((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( RRfRTRRtupdatefromremoteRjRRRR(RRTR((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(RRfRcRRRTRRjRRRRRLRRdRt 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((RRv((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(RfR(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_updateRfRQtdiscard(R=R?R@(RA(s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRCsc@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(RLRRR RfR(R=tr1tr2tr3tnr1tnr2tmidtj(RART(s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRBs.   "RRiiN(Rt manifestlogR Rt collectionst defaultdictRIRtfindmissingrevstreversedRtchangelogrevisiont parentrevsRctminRNRtmanifesttreadRItdiffRRXtwalkRf(RTRRtknowntmatchRRtmflt commonrevst headsrevstrevdeptht ellipsisheadsRDRtvisittrelevant_nodestmt visitnodestrequiredR tprevtpstcurdepthR;tneededtshallow_enoughtcurmftp1mftp2mfR=R((R<RARTRBRCs8/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=(RRRRfR7tquote(RTRtcapsR((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@s:|t<dkr&tjntj|S(N(tgetbundle2partsmappingRctgetbundle2partsorderRR7(R(R8R(s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRs   ((RR8R((R8Rs8/usr/lib64/python2.7/site-packages/mercurial/exchange.pytgetbundle2partsgenerator s cC@s$|dk r td|DStS(Ncs@s|]}|jdVqdS(tHG2N(Rd(Rtcap((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pys s(RcRXR(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 |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(NRjtclonebundleprefersR4ic3@s|]}t|VqdS(N(R(RRn(R(s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pys K s(RRR5RLR=(RjRR;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 RturlmodtopenRqRzRRitapplyRRRturlerrt httperrorRRRRturlerrortreasonR(RjRTRRRkRR((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyRN s  (((t __future__RRORti18nRRRRRRt thirdpartyRRRRRR R R R R RRRRRRRRRRRRRRtutilsRRR7R2RGRRRMRPRHR9tobjectR)RZRcRqRRRRRRRRRRRRRRRR4R6R5R9RHRJRSR[RpRuRqRrRRRRRRRRRRURRRRt transactionalRRRRRRRRRRRR RRRRRR;RnR RsRrRtRwRRRRRRRRRRRRRRRRRR(((s8/usr/lib64/python2.7/site-packages/mercurial/exchange.pyts   "|         <  w     C  5 , $   ( #    - 6 ( <  N  &   Q  ! z  .  #  - ~   / 0    -    J C # 0@