Ë 8Áœ^” eãó8—ddlZddlZddlmZddlmZmZddlmZm Z m Z ddl m Z m Z mZmZmZmZddlmZd„Zd „Zd „Zdd „Zdd „Zdd „Zdd„Zdd„ZeeeeeedœZddhZee«Zd„Z dd„Z!d„Z"Gd„d«Z#Gd„d«Z$ejJ«Z&d„Z'y)éNé)Ú_)ÚhexÚnullrev)ÚdelattrÚgetattrÚsetattr)ÚerrorÚobsoleteÚphasesÚpycompatÚtagsÚutil)Ú repoviewutilcó¢—tj|d«}|jj|tj «}t |«}||zS)akRevision candidates to be hidden This is a standalone function to allow extensions to wrap it. Because we use the set of immutable changesets as a fallback subset in branchmap (see mercurial.utils.repoviewutils.subsettable), you cannot set "public" changesets as "hideable". Doing so would break multiple code assertions and lead to crashes.sobsolete)r ÚgetrevsÚ _phasecacheÚ getrevsetr ÚlocalhiddenphasesÚ frozenset)ÚrepoÚ obsoletesÚ internalss ú6usr/lib/python3.12/site-packages/mercurial/repoview.pyÚ hideablerevsr"sI€ô× Ñ   {Ó3€IØ× Ñ ×*Ñ*¨4´×1IÑ1IÓJ€Iܘ)Ó$€IØ �yÑ Ð ócóT‡ —|j}t«}|j|dj«D�cgc]}|j «‘Œc}«|j|j j «D�cgc]}|j |«‘Œc}«i}tj|j||i«|rO|jjŠ |jˆ fd„|j «D««|jd«ddl m}|jj|«}|j!«r\|j#«rL|j$|j&fD]1}|jj|«Š ‰ €Œ!|j)‰ «Œ3|Scc}wcc}w)z8revisions blocking hidden changesets from being filteredNc3ó4•K—|]}‰|d«–—Œy­w©rN©)Ú.0ÚtÚrevs €rÚ zpinnedrevs..=søèø€Ð7© A‘c˜!˜A™$—i©ùsƒr)Ú mergestate)Ú changelogÚsetÚupdateÚparentsr#Ú _bookmarksÚvaluesÚtagsmodÚ readlocaltagsÚuiÚindexÚget_revÚdiscardÚr%ÚreadÚactiveÚunresolvedcountÚlocalÚotherÚadd) rÚclÚpinnedÚparÚbmrr%ÚmsÚnoder#s @rÚ pinnedrevsr?1sCø€ð �‰€BÜ ‹U€FØ ‡M�M¨¨T© ×(:Ñ(:Ô(<Ó=Ñ(< �3—7‘7•9Ð(<Ñ=Ô>Ø ‡M�M¨¯©×(>Ñ(>Ô(@ÓAÑ(@ "�2—6‘6˜"•:Ð(@ÑAÔBà €DÜ ×ј$Ÿ'™' 4¨¨rÔ2Ù Ø�h‰h×шØ� ‰ Ó7¨¯©¬Ó7Ô7Ø�‰�tÔõ à × Ñ × #Ñ # DÓ )€BØ ‡y�y„{�r×)Ñ)Ô+Ø—X‘X˜rŸx™xÓ(ˆDØ—(‘(×"Ñ" 4Ó(ˆC؉ؗ ‘ ˜3•ð)ð €Mùò->ùÚAs ¸F Á=F%có¾—t|«}|rP||j««D]3}|tk7sŒ ||vsŒ|j|«|j |«Œ5|rŒOyy)aQreveals contiguous chains of hidden ancestors of 'revs' by removing them from 'hidden' - pfunc(r): a funtion returning parent of 'r', - hidden: the (preliminary) hidden revisions, to be updated - revs: iterable of revnum, (Ancestors are revealed exclusively, i.e. the elements in 'revs' are *not* revealed) N)ÚlistÚpoprÚremoveÚappend)ÚpfuncÚhiddenÚrevsÚstackÚps rÚ_revealancestorsrJOsN€ô �‹J€EÙ Ù�u—y‘y“{Ö#ˆAØ”G‹|  V¢ Ø— ‘ ˜aÔ Ø— ‘ ˜Q•ð$ô rcóB—|jjrJ‚t|«}|rpt|t |«z «}|r||z}|jj }|j j|tj«}||z }t|||«t|«S)zbcompute the set of hidden revision to filter During most operation hidden should be filtered.) r&Ú filteredrevsrr'r?Ú parentrevsrrr Ú mutablephasesrJr)rÚvisibilityexceptionsrFrEÚmutableÚvisibles rÚ computehiddenrRbs”€ð�~‰~×*Ò*Ð*Ð *ä ˜$Ó €FÙ Ü�Vœj¨Ó.Ñ.Ó/ˆÙ Ø Ð*Ñ *ˆFØ—‘×)Ñ)ˆØ×"Ñ"×,Ñ,¨T´6×3GÑ3GÓHˆà˜FÑ"ˆÜ˜ ¨Ô0Ü �VÓ Ðrcóœ—|jjrJ‚|jj|tj «}t |«S)z‹compute the set of revision that can never be exposed through hgweb Changeset in the secret phase (or above) should stay unaccessible.)r&rLrrr Úremotehiddenphasesr)rrOÚsecretss rÚ computesecretrVus@€ð�~‰~×*Ò*Ð*Ð *Ø×Ñ×(Ñ(¨¬v×/HÑ/HÓI€GÜ �WÓ Ðrcó†—|jjrJ‚t|d«}t|d«}|rt||z«S|S)z†compute the set of revision that should be filtered when used a server Secret and hidden changeset should not pretend to be here.óvisibleó served.hidden)r&rLÚ filterrevsr)rrOÚhiddensrUs rÚcomputeunservedr\~sH€ð�~‰~×*Ò*Ð*Ð *䘘zÓ*€GܘÐ/Ó0€GÙܘ 7Ñ*Ó+Ð+àˆrcóâ—|jjrJ‚|jj|«r3t |jj |t j««St «S©N)r&rLrÚhasnonpublicphasesrrr rN)rrOs rÚcomputemutabler`ŒsU€Ø�~‰~×*Ò*Ð*Ð *à ×Ñ×*Ñ*¨4Ô0ܘ×)Ñ)×3Ñ3°D¼&×:NÑ:NÓOÓPÐPÜ ‹;Ðrcó,‡—|jjrJ‚|jŠt‰«}|jj |«}|rt |t ˆfd„|D«««}t d|«}tt|t‰«««S)a/Everything impactable by mutable revision The immutable filter still have some chance to get invalidated. This will happen when: - you garbage collect hidden changeset, - public phase is moved backward, - something is changed in the filtering (this could be fixed) This filter out any mutable changeset and any public changeset that may be impacted by something happening to a mutable revision. This is achieved by filtered everything with a revision number equal or higher than the first mutable changeset is filtered.c3ó@•K—|]}‰j|«–—Œy­wr^)r#)r!Úrr9s €rr$z$computeimpactable..¨søèø€Ð,FÁ¸1¨R¯V©V°A¯YÁùsƒr) r&rLÚlenrÚnonpublicphaserootsÚminÚmaxrÚrange)rrOÚ firstmutableÚrootsr9s @rÚcomputeimpactablerk”s|ø€ð�~‰~×*Ò*Ð*Ð *Ø �‰€BÜ�r“7€LØ × Ñ × 0Ñ 0°Ó 6€E٠ܘ<¬Ó,FÁÓ,FÓ)FÓGˆ ä�q˜,Ó'€LÜ ”U˜<¬¨R«Ó1Ó 2Ð2r)rXóvisible-hiddenrYsserveds immutableóbaserXrlcóf‡‡‡—|jdd«Š‰€ytjtjd‰«j ««ddŠˆfd„}t j}|d«tvr9tD]0Šˆˆfd„}|t|‰«<‰|vsŒ||‰«||‰«<Œ2‰S) z®initialize extra filter and return its id If extra filtering is configured, we make sure the associated filtered view are declared and return the associated id. s experimentalsextra-filter-revsNssha1é có•—|dz‰zS)Nó%r )ÚfnameÚfids €rÚzextrafilter..Ïsø€˜E D™L¨3Ò.rrmcóf•—t‰|g|¢­i|¤Ž}t|j‰««}||zSr^)Ú filtertablerrG)rÚargsÚkwargsÚbaserevsÚ extrarevsÚfrevsÚnames €€rÚextrafilteredrevsz&extrafilter..extrafilteredrevsÖs:ø€Ü& tÑ,¨TÐC°DÒC¸FÑC�Ü% d§i¡i°Ó&6Ó7� Ø )Ñ+Ð+r) Úconfigr ÚsysbytesrÚDIGESTSÚ hexdigestrÚ subsettablervÚ_basefiltername)r.Úcombiner‚r}rsr{r|s @@@rÚ extrafilterr…Ãs¯ú€ð �I‰I�oÐ';Ó <€EØ €}Øä × Ñ œDŸL™L¨Ñ1°%Ó8×BÑBÓDÓ EÀcÀrÐ J€Cã.€Gä×*Ñ*€KáˆwÓœ{Ñ*ß#ˆDõ ,ð *;ŒK™ › Ñ &Ø�{Ò"Ù-4°[ÀÑ5FÓ-G� ™G D›MÒ*ð$ð €Jrcó—||jvrð|jjdd«r“d}||z}|jjrX|jjrBt j ||jj|jjd¬«n|jjd|z«t|}|r||j|«S||j««|j|<|j|S)zãreturns set of filtered revision for this filter name visibilityexceptions is a set of revs which must are exceptions for hidden-state and must be visible. They are dynamic and hence we should not cache it's resultsdevelsdebug.repo-filterss"computing revision filter for "%s"sdebug.filters: )ÚfÚotherfÚprefixsdebug.filters: %s ) Úfilteredrevcacher.Ú configboolÚ tracebackflagÚ debugflagrÚdebugstacktraceÚ_foutÚ_ferrÚdebugrvÚ unfiltered)rÚ filternamerOÚmsgÚfuncs rrZrZásÝ€ð ˜×.Ñ.Ñ.Ø �7‰7× Ñ ˜hÐ(=Ô >Ø7ˆCØ �:Ñ ˆCØ�w‰w×$Ò$¨¯©×):Ò):ä×$Ñ$ØØ—g‘g—m‘mØŸ7™7Ÿ=™=Ø-ö ð—‘— ‘ Ð4°sÑ:Ô;ܘ:Ñ&ˆÙ Ù˜Ÿ™Ð)=Ó>Ð >Ù,0°·±Ó1BÓ,Cˆ×јjÑ)Ø × Ñ  Ñ ,Ð,rcó€—tj|«}||_Gd„dt|j«}||_|S)Ncó —eZdZy)ú(wrapchangelog..filteredchangelogN©Ú__name__Ú __module__Ú __qualname__r rrÚfilteredchangelogr˜ó„Ø rr�)ÚcopyrLÚfilteredchangelogmixinÚ __class__)Ú unfichangelogrLr9r�s rÚ wrapchangelogr£üs8€Ü �‰�=Ó !€BØ"€B„Oô Ô2°B·L±Lô ð%€B„Là €Irc󀇗eZdZd„Zd„Zd„Zd ˆfd„ Zd„Zdˆfd„ Zˆfd„Z ˆfd„Z ˆfd „Z ˆfd „Z ˆfd „Z ˆfd „ZˆxZS)r cód—tt|«dz dd«D]}||jvsŒ|cSy)z!filtered version of revlog.tiprevréþÿÿÿéÿÿÿÿN©rhrdrL)ÚselfÚis rÚtiprevzfilteredchangelogmixin.tiprev s0€ä”s˜4“y 1‘} b¨"Ö-ˆAؘ×)Ñ)Ò)Ø’ñ.rcóT—d|cxkxrt|«kncxr||jvS)z'filtered version of revlog.__contains__r)rdrL)r©r#s rÚ __contains__z#filteredchangelogmixin.__contains__s&€à�CÖ#œ#˜d›)Ô#ÒD¨°4×3DÑ3DÐ(DÐDrcó‡—ˆfd„}|«S)z#filtered version of revlog.__iter__c3óf•K—tt‰««D]}|‰jvsŒ|–—Œy­wr^r¨)rªr©s €rÚ filterediterz5filteredchangelogmixin.__iter__..filterediters-øèø€Üœ3˜t›9Ö%�ؘD×-Ñ-Ò-Ø“Gñ&ùóƒ&1ª1r )r©r°s` rÚ__iter__zfilteredchangelogmixin.__iter__sø€ô ñ ‹~Ðrc#óf•K—tt|� ||«D]}||jvsŒ|–—Œy­w)zfiltered version of revlog.revsN)Úsuperr rGrL)r©ÚstartÚstoprªr¡s €rrGzfilteredchangelogmixin.revss4øèø€äÔ-¨tÑ9¸%ÀÖFˆAؘ×)Ñ)Ò)Ø“ñGùr±cóÜ—tj}||d«r t|«}|j}||d«r||z}n|j |«}|D]}t j |«‚|S)zåraise the appropriate error if 'revs' contains a filtered revision This returns a version of 'revs' to be used thereafter by the caller. In particular, if revs is an iterator, it is converted into a set. Ú__next__Úfirst)rÚ safehasattrr'rLÚ intersectionr ÚFilteredIndexError)r©rGrºrLÚ offendersr#s rÚ_checknofilteredinrevsz-filteredchangelogmixin._checknofilteredinrevs#sq€ô ×&Ñ&ˆ Ù �t˜ZÔ (ä�t“9ˆDà×(Ñ(ˆ Ù �t˜WÔ %ؘ|Ñ+‰Ià$×1Ñ1°$Ó7ˆIãˆCÜ×*Ñ*¨3Ó/Ð /ðàˆ rcóÚ•—|€& |jj|j«S|j |«}t t|�#|«S#t$r|j «cYSwxYwr^) r/ÚheadrevsfilteredrLÚAttributeErrorÚ _headrevsr¾r´r Úheadrevs)r©rGr¡s €rrÃzfilteredchangelogmixin.headrevs8skø€Ø ˆ<ð (Ø—z‘z×2Ñ2°4×3DÑ3DÓEÐEð ×*Ñ*¨4Ó0ˆÜÔ+¨TÑ;¸DÓAÐAøô "ò (Ø—~‘~Ó'Ò'ð (ús…$AÁA*Á)A*cóH•—|jrJ‚tt|�|i|¤Žyr^)rLr´r Ústrip)r©rwrxr¡s €rrÅzfilteredchangelogmixin.stripDs)ø€ð×$Ò$Ð$Ð$Ü Ô$ dÑ1°4ÐB¸6ÓBrcó°•—tt|� |«}||jvr3t j t |«|jtd««‚|S)zfiltered version of revlog.revs filtered node) r´r r#rLr ÚFilteredLookupErrorrÚ display_idr)r©r>rcr¡s €rr#zfilteredchangelogmixin.revJsRø€ä Ô(¨$Ñ 3°DÓ 9ˆØ �×!Ñ!Ñ !Ü×+Ñ+Ü�D“ ˜4Ÿ?™?¬AÐ.>Ó,?óð ðˆrcóp•—||jvrtj|«‚tt|�|«S)zfiltered version of revlog.node)rLr r¼r´r r>©r©r#r¡s €rr>zfilteredchangelogmixin.nodeSs5ø€à �$×#Ñ#Ñ #Ü×*Ñ*¨3Ó/Ð /ÜÔ+¨TÑ7¸Ó<ÐrÌrMrÏÚ __classcell__)r¡s@rr r sIø„òò Eòõò õ* BôCô ô=ô @ô C÷ >ð>rr cóN—eZdZdZd d„Zed„«Zd„Zd d„Zd„Z d„Z d „Z d „Z y) ÚrepoviewaæProvide a read/write view of a repo through a filtered changelog This object is used to access a filtered version of a repository without altering the original repository object itself. We can not alter the original object for two main reasons: - It prevents the use of a repo with multiple filters at the same time. In particular when multiple threads are involved. - It makes scope of the filtering harder to control. This object behaves very closely to the original repository. All attribute operations are done on the original repository: - An access to `repoview.someattr` actually returns `repo.someattr`, - A write to `repoview.someattr` actually sets value of `repo.someattr`, - A deletion of `repoview.someattr` actually drops `someattr` from `repo.__dict__`. The only exception is the `changelog` property. It is overridden to return a (surface) copy of `repo.changelog` with some revisions filtered. The `filtername` attribute of the view control the revisions that need to be filtered. (the fact the changelog is copied is an implementation detail). Unlike attributes, this object intercepts all method calls. This means that all methods are run on the `repoview` object with the filtered `changelog` property. For this purpose the simple `repoview` class must be mixed with the actual class of the repository. This ensures that the resulting `repoview` object have the very same methods than the repo object. This leads to the property below. repoview.method() --> repo.__class__.method(repoview) The inheritance has to be done dynamically because `repo` can be of any subclasses of `localrepo`. Eg: `bundlerepo` or `statichttprepo`. Ncóê—tj|d|«tj|d|«tj|dd«tj|dd«tj|d|«y)NÚ_unfilteredrepor“Ú _clcachekeyÚ_clcacheÚ_visibilityexceptions)ÚobjectÚ __setattr__)r©rr“rOs rÚ__init__zrepoview.__init__�s_€Ü×ј4Ð!2°DÔ9Ü×ј4 ¨zÔ:Ü×ј4 °Ô5Ü×ј4 ¨TÔ2ä×ј4Ð!8Ð:NÕOrcó2—|j}|j}|j}t|«}||dz d}t j d|j «5t||j |j«}ddd«|j}||t«|jf}|�|j|us||jk7rd}|€>|r t||«n|}tj|d|«tj|d|«|S#1swYŒ‘xYw)z_return a filtered version of the changeset this changelog must not be used for writingrézrepo filter for %sNrÖrÕ)rÔr&r/rdrÚtimedcmr“rZr×rÖÚhashÚ_delayedrÕr£rØrÙ) r©Úunfir¢Ú unfiindexÚunfilenÚunfinoderGr9Únewkeys rr&zrepoview.changelog˜sþ€ð ×#Ñ#ˆØŸ™ˆ à!×'Ñ'ˆ Ü�i“.ˆØ˜W q™[Ñ)¨!Ñ,ˆÜ �\‰\Ð.°·±Õ @ܘd D§O¡O°T×5OÑ5OÓPˆD÷Aà �]‰]ˆØ˜8¤T¨$£Z°×1GÑ1GÐHˆð ˆ>Ø �H‰H˜IÑ %¨°4×3CÑ3CÒ)CàˆBà ˆ:á7;”˜}¨dÔ3ÀˆBÜ × Ñ ˜t Z°Ô 4Ü × Ñ ˜t ]°FÔ ;؈ ÷!AÐ @ús Á"D Ä Dcó—|jS)z&Return an unfiltered version of a repo)rÔ©r©s rr’zrepoview.unfiltered¶s€à×#Ñ#Ð#rcóh—||jk(r|s|S|j«j||«S)z)Return a filtered version of a repository)r“r’Úfiltered)r©r|rOs rrèzrepoview.filteredºs1€à �4—?‘?Ò "Ñ+?؈KØ�‰Ó ×)Ñ)¨$Ð0DÓEÐErcó˜—d|jj›dtj|j«›d|j «›d�S)NÚ<Ú:Ú Ú>)r¡ršr Úsysstrr“r’ræs rÚ__repr__zrepoview.__repr__Às3�à �N‰N× #Ó #Ü �O‰O˜DŸO™OÕ ,Ø �O‰OÕ ð ð rcó.—t|j|«Sr^)rrÔ©r©Úattrs rÚ __getattr__zrepoview.__getattr__Èó€Ü�t×+Ñ+¨TÓ2Ð2rcó0—t|j||«Sr^)r rÔ)r©ròÚvalues rrÙzrepoview.__setattr__Ës€Ü�t×+Ñ+¨T°5Ó9Ð9rcó.—t|j|«Sr^)rrÔrñs rÚ __delattr__zrepoview.__delattr__Îrôrr^) ršr›rœÚ__doc__rÚÚpropertyr&r’rèrïrórÙrør rrrÒrÒlsA„ñ óDPðñóðò:$óFò  ò3ò:ó3rrÒcó¢—tj|«}|� |«}|�|SGd„dt|«}tj|«t|<|S)zBCreate a new type with the repoview mixin and the given base classcó —eZdZy)únewtype..filteredrepoNr™r rrÚ filteredreporýáržrrþ)Ú_filteredrepotypesÚgetrÒÚweakrefÚref)ÚbaserÚclsrþs rÚnewtyperÙsR€ä × Ñ  Ó &€CØ €Ù‹eˆØ ˆ?؈Jô ”x ô ô 'Ÿ{™{¨<Ó8Ô�tÑà Ðrr^)(rŸrÚi18nrr>rrr rrr r2r r r rr,rÚutilsrrr?rJrRrVr\r`rkrvÚ filter_has_wcrArƒr…rZr£r rÒÚWeakKeyDictionaryrÿrr rrÚr sÊðó Ûå÷÷ñ÷ ÷õ ò !òò< ó&ó&ó óó3ðBØ$Ø#ØØ Ø ñ € ðÐ.Ð/€ á�{Ó#€òó<-ò6 ÷a>ña>÷Hc3ñc3ðT/�W×.Ñ.Ó0Ðó r