Ë 8ú§’�¤ã ó¨—ddlZddlmZddlmZddlmZddlmZm Z m Z m Z ddl mZe jZdZd Zd Zd „Zd „Zd ddegZej,Gd„d««ZddddddœZdddddddœdddddddœdddddddœddddddddœddddddddœddiddidœZeded<d iiZhd!£Zd"„Zeeed#œZd$„Zd,d%„Zd&„Z d'„Z! d-d(„Z"Gd)„d*«Z#d+„Z$y).éN)Úcasté)Ú_)Úattr)ÚerrorÚ requirementsÚsslutilÚutil)Ú stringutils bundle-cachesclonebundles.manifestspeer-bundle-cache://cóT—|jjt«}|j«D�cgc]}|j dd«‘Œ}}g}|D]@}t ||d«}t |«dk(r|dz}n d||dfz}|j|«ŒBdj|«Scc}w)z>get the bundle manifest to be served to a client from a serveró rró s%s %s ó) ÚvfsÚtryreadÚCB_MANIFEST_FILEÚ splitlinesÚsplitÚalter_bundle_urlÚlenÚappendÚjoin)ÚrepoÚraw_textÚeÚentriesÚ new_linesÚurlÚlines ú:usr/lib/python3.12/site-packages/mercurial/bundlecaches.pyÚ get_manifestr!s«€à�x‰x×ÑÔ 0Ó1€HØ)1×)<Ñ)<Ô)>Ó?Ñ)> Aˆq�w‰w�t˜QÕÐ)>€GÐ?à€IÛ ˆÜ˜t Q q¡TÓ*ˆÜ ˆq‹6�QŠ;ؘ‘;‰Dà  a¨¡d  Ñ+ˆDØ×јÕð ð �8‰8�IÓ Ðùò@s²B%có—|S)z¬a function that exist to help extension and hosting to alter the url This will typically be used to inject authentication information in the url of cached bundles.©)rrs r rr/s €ð €Jrshttp://shttps://s largefile://có—eZdZej«Zej«Zej«Zej«Zej«Z ej«Z e d„«Z e d„«Z dd„Zd„Zy)Ú bundlespeccóV—tj|j|j«S©N)Ú collectionsÚChainMapÚ_explicit_paramsÚ _default_opts©Úselfs r Úparamszbundlespec.paramsLs!€ä×#Ñ# D×$9Ñ$9¸4×;MÑ;MÓNÐNrcó—|jSr')r.r,s r Ú contentoptszbundlespec.contentoptsPs€ð�{‰{ÐrcóD—|s||jvr||j|<yy)zOSet a bundle parameter value. Will only overwrite if overwrite is trueN)r*)r-ÚkeyÚvalueÚ overwrites r Ú set_paramzbundlespec.set_paramUs)€ñ ˜ 4×#8Ñ#8Ñ8Ø).ˆD× !Ñ ! #Ò &ð9rcóÔ—d|j|jfzg}t|jj ««D]}|j d|z«Œdj |«S)Ns%s-%ss%s=%só;)Ú compressionÚversionÚsortedr*Úitemsrr)r-ÚpartsÚparams r Úas_speczbundlespec.as_spec\s\€Ø˜T×-Ñ-¨t¯|©|Ð<Ñ<Ð=ˆÜ˜D×1Ñ1×7Ñ7Ó9Ö:ˆEØ �L‰L˜ EÑ)Õ *ð;à�y‰y˜ÓÐrN©T)Ú__name__Ú __module__Ú __qualname__rÚibr8Úwirecompressionr9Ú wireversionr*r+Úpropertyr.r0r5r>r#rr r%r%?s…„à�$—'‘'“)€KØ�d—g‘g“i€O؈d�g‰g‹i€GØ�$—'‘'“)€Kà�t—w‘w“yÐð�D—G‘G“I€Mà ñOóðOðñóðó/ó rr%s01ó02s03ós1)óv1óv2óv3ópacked1óbundle2TF)ó changegroupó cg.versionó obsolescenceóphasesótagsfnodescacheórevbranchcache)rNrOrPrQóstreamv2rRrS)rNrOrPrQó streamv3-exprRrSrO)rIrJrKrTrUrLrMrJrMrT>ógzipónoneóbzip2có‚—tj|«}|€'td«}|||fz}tj|«‚|S)z'make a boolean out of a parameter values'parameter %s should be a boolean ('%s'))r Ú parseboolrrÚInvalidBundleSpecification)r2r3ÚbÚmsgs r Ú param_boolr^§sF€ä×јUÓ#€AØ€yÜÐ:Ó;ˆØ ��Uˆ|шÜ×.Ñ.¨sÓ3Ð3Ø €Hr)rPsobsolescence-mandatoryrQcóŽ—d|vr|ifSi}|jdd«\}}td«}|jd«D]„}d|vr||z}tj|«‚|jdd«\}}tj |«}tj |«}t j|«} | � | ||«}|||<Œ†||fS)z~parse bundlespec parameter section input: "comp-version;params" string return: (spec; {param_key: param_value}) r7rs:invalid bundle specification: missing "=" in parameter: %só=)rrrr[ÚurlreqÚunquoteÚbundle_spec_param_processingÚget) Úsr.r9ÚparamstrÚerrÚpr]r2r3Úprocesss r Ú _parseparamsrj¹sÔ€ð �1�}Ø�"ˆuˆ à €FØŸ™  aÓ(Ñ€GˆXä Ð IÓ J€CØ �^‰^˜DÖ !ˆØ �q‰=ؘ‘'ˆCÜ×2Ñ2°3Ó7Ð 7à—W‘W˜T 1Ó%‰ ˆˆUÜ�n‰n˜SÓ!ˆÜ—‘˜uÓ%ˆÜ.×2Ñ2°3Ó7ˆØ Ð Ù˜C Ó'ˆE؈ˆsŠ ð"ð �Fˆ?Ðrcó€—|r%d|vr!tjtd«|z«‚|jdd«d}d|vr‰|jdd«\}}|tj j vr!tjtd«|z«‚t|«\}}|tvrÑtjtd«|z«‚|rJ‚t|«\}}|tj j vrL|}d}tj|jvrd }ntj|jvrd }|tvr9d }n6|tvr |d k(rd }nd }|}n!tjtd «|z«‚|dk(r)|tvr!tjtd«|z«‚|d k(r}d|vrytt!t"|d«jd««}|tj$z }|r9tjtd«dj't)|««z«‚d|vr|dd k(rd}|ddk(rd}tj+|i«j-«} |dk(s|dk(rd }tj j/|«} | j1«\}} t|d} t3|| || || «S)aòParse 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. ó-sCinvalid bundle specification; must be prefixed with compression: %sr7rrs%s compression is not supporteds%%s is not a recognized bundle versionrIrJrLrWrXs+%s is not a recognized bundle specifications4compression engine %s is not supported on v1 bundless requirementsó,s+missing support for repository features: %ss, sstreamrTsv3-exprUrO)rr[rrr Ú compenginesÚsupportedbundlenamesÚUnsupportedBundleSpecificationrjÚ_bundlespeccontentoptsÚrequirementsmodÚGENERALDELTA_REQUIREMENTrÚREVLOGV2_REQUIREMENTÚ_bundlespecv1compenginesÚsetrÚbytesÚSTREAM_FIXED_REQUIREMENTSrr:rdÚcopyÚ forbundlenameÚ bundletyper%) rÚspecÚstrictÚpre_argsr8r9r.rÚ missingreqsr0ÚenginerDrEs r Úparsebundlespecr�×sñ€ñB�$˜dÑ"Ü×.Ñ.Ü ð9ó ðñ  ó ð ð�z‰z˜$ Ó" 1Ñ%€HØ ˆxÑØ#Ÿz™z¨$°Ó2ш �Wà œd×.Ñ.×CÑCÑ CÜ×6Ñ6ÜÐ4Ó5¸ ÑCóð ô' wÓ/‰ˆ�à Ô0Ñ 0Ü×6Ñ6ÜÐ:Ó;¸gÑEóð ñ Јzä# DÓ)‰ ˆˆfà ”4×#Ñ#×8Ñ8Ñ 8؈K؈Gä×7Ñ7¸4×;LÑ;LÑLØ‘Ü ×5Ñ5¸×9JÑ9JÑJØ�àÔ":Ñ:Ø‘Ø Ô+Ñ +Ø�zÒ!Ø%‘ à&� ؉Gä×6Ñ6ÜÐ@ÓAÀDÑHóð ð �%Ò˜KÔ/GÑGÜ×2Ñ2Ü ÐEÓ FØñ ó ð ð�*Ò °FÑ!:Üœ4¤ v¨oÑ'>Ó?×EÑEÀdÓKÓLˆ Ø"¤_×%NÑ%NÑNˆ Ù Ü×6Ñ6ÜÐ@ÓAØ—*‘*œV KÓ0Ó1ñ2óð ð �FÑð �)Ñ  Ò %Ø!ˆGØ �)Ñ   Ò )Ø%ˆGÜ(×,Ñ,¨W°bÓ9×>Ñ>Ó@€KØ�+Ò ¨OÒ!;àˆä × Ñ × +Ñ +¨KÓ 8€FØ#)×#4Ñ#4Ó#6Ñ €K�Ü(¨Ñ1°-Ñ@€Kä Ø�_ g¨{¸FÀKó ðrcó —g}|j«D]À}|j«}|sŒd|di}|ddD]‹}|jdd«\}}tjj |«}tjj |«}|||<|dk(sŒa t ||«} | j |d<| j|d<Œ�|j|«ŒÂ|S#tj$rYŒ¸tj$rYŒÌwxYw) z¾Parses the raw text of a clone bundles manifest. Returns a list of dicts. The dicts have a ``URL`` key corresponding to the URL and other keys are the attributes for the entry. óURLrrNr`ó BUNDLESPECs COMPRESSIONsVERSION) rrr rarbr�r8r9rr[rpr) rreÚmrÚfieldsÚattrsÚrawattrr2r3r%s r Úparseclonebundlesmanifestr‰Zs€ð €AØ— ‘ –ˆØ—‘“ˆÙØ Ø˜ ™Ð#ˆØ˜a˜b“zˆGØ Ÿ™ t¨QÓ/‰JˆC�Ü—+‘+×%Ñ% cÓ*ˆCÜ—K‘K×'Ñ'¨Ó.ˆE؈E�#‰Jð �mÓ#ðÜ!0°°uÓ!=�JØ,6×,BÑ,B�E˜.Ñ)Ø(2×(:Ñ(:�E˜*Ò%ð"ð& �‰��ð1ð4 €Høô×7Ñ7òÙÜ×;Ñ;òÙðúsÂ*CÃDÃ-DÄDcóì—|jdk(r|jdk(ry|jdk(rF|jdk(r7|jjd«s|jjd«ryy)NsUNrHTrGrTrUF)rDrEr0rd)r%s r Úisstreamclonespecr‹~sn€à×!Ñ! UÒ*¨z×/EÑ/EÈÒ/NØð ×"Ñ" eÒ+Ø × "Ñ " eÒ +à × "Ñ "× &Ñ & {Ô 3Ø×%Ñ%×)Ñ)¨/Ô:ðà rc óÀ—g}|D�]w}|jd«}|sKttD�cgc]}|j|«‘Œc}«s|jj d|z«Œb|jd«}|r< t ||d¬«} |r*t| «s|jj d|z«Œ°n!|r|jj d |z«ŒÒd |vr0tjs |jj d |z«�Œd |vr] tj |d «} |jj%«} | �(| dz| kr |jj d|z«�Œg|j'|«�Œz|Scc}w#tj$r<} |jj tj| «dz«Yd} ~ �ŒÌd} ~ wtj$r>} |jj d |tj| «fz«Yd} ~ �Œd} ~ wwxYw#tj"$r"|jj d|z«Y�ŒWwxYw)auRemove incompatible clone bundle manifest entries. Accepts a list of entries parsed with ``parseclonebundlesmanifest`` and returns a new list consisting of only the entries that this client should be able to apply. There is no guarantee we'll be able to apply all returned entries because the metadata we use to filter on may be missing or wrong. rƒs8filtering %s because not a supported clonebundle scheme r„T)r}s(filtering %s because not a stream clone rNs1filtering %s because unsupported bundle spec: %s s?filtering %s because cannot determine if a stream clone bundle s REQUIRESNIs'filtering %s because SNI not supported s REQUIREDRAMs0filtering %s due to a bad REQUIREDRAM attribute g…ëQ¸å?s8filtering %s as it needs more than 2/3 of system memory )rdÚanyÚSUPPORTED_CLONEBUNDLE_SCHEMESÚ startswithÚuiÚdebugr�r‹rr[r Ú forcebytestrrpr Úhassnir Ú sizetointÚ ParseErrorÚestimatememoryr) rrÚstreamclonerequestedÚ pullbundlesÚ newentriesÚentryrÚschemer|r%rÚ requiredramÚ actualrams r Úfilterclonebundleentriesrž‘s<€ð€J܈Ø�i‰i˜ÓˆÙ¤3Ý2OÓ PÑ2O¨ˆS�^‰^˜FÕ #Ð2OÑ Pô$ ð �G‰G�M‰MØLØñô ð à�y‰y˜Ó'ˆÙ ð Ü,¨T°4ÀÔE� ñ(Ô0AÀ*Ô0MØ—G‘G—M‘MØDÀsÑJôðøñ"Ø �G‰G�M‰Mð"Ø$'ñ(ô ð à ˜EÑ !¬'¯.ª.Ø �G‰G�M‰MÐEÈÑKÔ LÙ à ˜UÑ "ð Ü"Ÿn™n¨U°>Ñ-BÓC� ð Ÿ™×.Ñ.Ó0ˆIØÐ$¨°TÑ)9¸KÒ)GØ—‘— ‘ ØPØñôñà×ј%Ö ð}ð@ Ðùò{ Qøô*×3Ñ3ò Ø—‘— ‘ œj×5Ñ5°aÓ8¸5Ñ@ÔAÝûÜ×7Ñ7ò Ø—‘— ‘ ð"Ø%(¬*×*AÑ*AÀ!Ó*DÐ$EñFôõûð  ûô,×#Ñ#ò Ø—‘— ‘ ØHÈ3ÑNôòð  ús;©F Á;9FÄH(ÆH%Æ1GÇH%Ç'3H È H%È(1IÉIcó@—eZdZdZd„Zd„Zd„Zd„Zd„Zd„Z d„Z d „Z y ) ÚclonebundleentryzàRepresents an item in a clone bundles manifest. This rich class is needed to support sorting since sorted() in Python 3 doesn't support ``cmp`` and our comparison is complex enough that ``key=`` won't work. có —||_||_yr')r3Úprefers)r-r3r¢s r Ú__init__zclonebundleentry.__init__és€ØˆŒ ؈� rcóö—|jD]j\}}|jj|«}|jj|«}|� |€||k(ry|� |€||k(ry|�|€ŒW||k(rŒ]||k(ry||k(ryŒly)Néÿÿÿÿrr)r¢r3rd)r-ÚotherÚprefkeyÚ prefvalueÚavalueÚbvalues r Ú_cmpzclonebundleentry._cmpís¢€Ø"&§,¤,Ñ ˆG�YØ—Z‘Z—^‘^ GÓ,ˆFØ—[‘[—_‘_ WÓ-ˆFðÐ! f n¸À9Ò9LÙðÐ! f n¸À9Ò9LÙðˆ~  Øð˜ÒØð˜Ò"ÙØ˜Ò"Ùð ð7#/ð>rcó*—|j|«dkS©Nr©r«©r-r¦s r Ú__lt__zclonebundleentry.__lt__ó€Ø�y‰y˜Ó !Ñ#Ð#rcó*—|j|«dkDSr­r®r¯s r Ú__gt__zclonebundleentry.__gt__r±rcó*—|j|«dk(Sr­r®r¯s r Ú__eq__zclonebundleentry.__eq__ó€Ø�y‰y˜Ó 1Ñ$Ð$rcó*—|j|«dkSr­r®r¯s r Ú__le__zclonebundleentry.__le__r¶rcó*—|j|«dk\Sr­r®r¯s r Ú__ge__zclonebundleentry.__ge__r¶rcó*—|j|«dk7Sr­r®r¯s r Ú__ne__zclonebundleentry.__ne__r¶rN) r@rArBÚ__doc__r£r«r°r³rµr¸rºr¼r#rr r r ás0„ñòò òD$ò$ò%ò%ò%ó%rr có䇗|jdd«Š‰s t|«Sd„}‰D�cgc] }||«‘Œ c}Štˆfd„|D««}|D�cgc]}|j‘Œc}Scc}wcc}w)NsuisclonebundlepreferscóŠ—d|vr.td«}tjtd«|z|¬«‚|jdd«S)Nr`s3each comma separated item should be key=value pairss&invalid ui.clonebundleprefers item: %s)Úhintr)rrÚAbortr)rhrÀs r Ú_splitz&sortclonebundleentries.._split'sH€Ø �q‰=ÜÐKÓLˆDÜ—+‘+ÜÐ;Ó<¸qÑ@Àtôð ð�w‰w�t˜QÓÐrc3ó6•K—|]}t|‰«–—Œy­wr')r )Ú.0Úvr¢s €r Ú z)sortclonebundleentries..1søèø€ÐA¹°AÔ# A w×/¹ùsƒ)Ú configlistÚlistr:r3)r�rrÂrhr;Úir¢s @r ÚsortclonebundleentriesrÊ"ssø€Ø�m‰m˜EÐ#8Ó9€GÙ Ü�G‹}Ðò ñ#*Ó*¡'˜Q‰v�a�y 'Ñ*€Gä ÓA¹ÓAÓ A€EÙ"Ó #™U˜ˆA�G‹G˜UÑ #Ð#ùò+ùò $s ¨A(ÁA-r?)FF)%r(ÚtypingrÚi18nrÚ thirdpartyrÚrrrrr r Úutilsr raÚBUNDLE_CACHE_DIRrÚCLONEBUNDLESCHEMEr!rrŽrer%Ú_bundlespeccgversionsrqÚ_bundlespecvariantsrur^rcrjr�r‰r‹ržr rÊr#rr ÚrÔs®ðó õõå÷óõ à �‰€à"ÐØ+ÐØ+Ðò ò ðØØØð !Ðð‡�÷  ð  óð  ðJ Ø Ø ØØñ ÐðØØØØ!Ø ñ  ðØØØØ Øñ  ðØØØØ Øñ  ðØØØØØ!Ø ñðØØØØØ!Ø ñð �uðð �uðñ]1Ððd&<¸EÑ%BÐ�zÑ"à" BÐ'Ðò8Ðò ð Ø)Øñ Ðòó<@òF! òHð(%ñ>%óB$r