Ë Ì8²y…Ž–ãó¾—ddlZddlZddlZddlmZddlmZmZmZddl m Z m Z m Z ddl mZmZmZmZmZmZmZddlmZmZddlmZmZej<d „«Zdd „Z d „Z!d „Z"ej<ejF«Z$dd„Z%d„Z&d„Z'e'ejP«Z)Gd„d«Z*e*«Z(Gd„d«Z+d„Z,Gd„d«Z-ej\e(d fd„«Z/dd„Z0y)éN)Ú_)ÚgetattrÚopenÚsetattr)ÚbinÚhexÚshort)ÚerrorÚlinelogÚlockÚmdiffÚpycompatÚscmutilÚutil)ÚhashutilÚ stringutilé)r Úrevmapcó$—|j|«S©N)Úfile)ÚrepoÚpaths ú>usr/lib/python3.12/site-packages/hgext/fastannotate/context.pyÚ_getflogr,s€à �9‰9�T‹?Ðócó,—|j|j«}|s1|D�cgc]&}|j«|j«k(sŒ%|‘Œ(}}|D]:}d|jvsŒt |j |j««|_Œ<|Scc}w)NÚ_filelog)Ú _changeidÚparentsrÚ__dict__rÚ_repor)ÚfÚfollowÚplÚps rÚ_parentsr'2s~€ð ‡K‚KØ �‰‹€Bñ ÙÓ 4™�A˜qŸv™v›x¨1¯6©6«8Ó3Ša˜ˆÐ 4óˆØ˜QŸZ™ZÒ'Ü! !§'¡'¨1¯6©6«8Ó4ˆA�Jðð €Iùò5s £&BÁ Bcó¸—|j«}|jd«}|r|jd«s|dz }t|«D�cgc]}||f‘Œc}|fScc}w)Nó r)ÚdataÚcountÚendswithÚrange)ÚfctxÚtextÚ linecountÚis rÚ _decorater2IsZ€Ø �9‰9‹;€DØ— ‘ ˜5Ó!€IÙ �D—M‘M %Ô(Ø�Q‰ˆ Ü % iÔ 0Ó 1Ñ 0˜1ˆd�AŠYÐ 0Ñ 1°4Ð 8Ð8ùÒ 1sÁ AcóL—|D]\\}}}}}|dk(sŒ|d|||d||Œ |S)Nó=r©)ÚparentÚchildÚblocksÚa1Úa2Úb1Úb2Úts rÚ_pairr>TsD€Û%ÑшˆR��R˜!ð �‹9Ø$ Q™i¨¨2Ð.ˆE�!‰H�R˜‰Oð &ð €LrFcóh—|rt|t«s|� t||«}n||}|€:|j«€||}|S|j ||j«¬«}|S||}|dk(r|j «}n|j «}||j«k7r||_|||_|S)a2(repo, str, str) -> fctx get the filectx object from repo, rev, path, in an efficient way. if resolverev is True, "rev" is a revision specified by the revset language, otherwise "rev" is a nodeid, or a revision number that can be consumed by repo.__getitem__. if adjustctx is not None, the returned fctx will point to a changeset that introduces the change (last modified the file). if adjustctx is 'linkrev', trust the linkrev and do not adjust it. this is noticeably faster for big repos but is incorrect for some cases. )Úchangeidólinkrev) Ú isinstanceÚintÚ _revsingleÚrevÚfilectxÚlinkrevÚintrorevrÚ _changectx)rrErÚ resolverevÚ adjustctxÚctxr.rHs rÚ resolvefctxrMbs¾€ñœ* S¬#Ô.°3°?ܘ˜sÓ#‰à�3‰iˆðÐð �7‰7‹9Ð Ø�t‘9ˆDð €Kð—<‘< ¨s¯w©w«y�<Ó9ˆDð €Kð�4‰yˆØ ˜ Ò "Ø—|‘|“~‰Hà—}‘}“ˆHØ �s—w‘w“yÒ Ø%ˆDŒNØ" 8™nˆDŒOØ €Krcó†—|jdd«jdd«jdd«jdd«S) Ns.hg/s.hg.hg/s.l/s.l.hg/s.m/s.m.hg/s.lock/s .lock.hg/)Úreplace©rs rÚ encodedirrQ�s9€à � ‰ �W˜jÓ)ß ‰�˜Ó #ß ‰�˜Ó #ß ‰�˜LÓ )ð rcóà‡—tjtˆfd„tjj D«««}t tj|«j««ddS)Nc3ó:•K—|]}|t‰|«f–—Œy­wr)r)Ú.0ÚkÚdiffoptss €rÚ zhashdiffopts..šs øèø€ÐJÑ2I¨Q�”7˜8 QÓ'Ô(Ñ2Iùsƒé) rÚpprintÚsortedr rVÚdefaultsrrÚsha1Údigest)rVÚ diffoptstrs` rÚ hashdiffoptsr_˜sQø€Ü×"Ñ"ÜÓJ´%·.±.×2IÒ2IÓJÓJó€Jô Œx�}‰}˜ZÓ(×/Ñ/Ó1Ó 2°2°AÐ 6Ð6rcóF—eZdZdZddddœZd„Zejd„«Zy)Ú annotateoptsz¹like mercurial.mdiff.diffopts, but is for annotate followrename: follow renames, like "hg annotate -f" followmerge: follow p2 of a merge changeset, otherwise p2 is ignored NT)sdiffoptss followrenames followmergec ó¬—tj|«}|jj«D]"\}}t |||j ||««Œ$yr)rÚ byteskwargsr[ÚitemsrÚget)ÚselfÚoptsrUÚvs rÚ__init__zannotateopts.__init__¯sC€Ü×#Ñ# DÓ)ˆØ—M‘M×'Ñ'Ö)‰DˆAˆqÜ �D˜!˜TŸX™X a¨›^Õ ,ñ*rcó—d}|js|dz }|js|dz }|j�Lt|jtj«sJ‚t |j«}|t k7r|d|zz }|xsdS)z?represent opts in a short string, suitable for a directory namersr0sm0óisdefault)Ú followrenameÚ followmergerVrBr r_Ú_defaultdiffopthash)rfÚresultÚ diffopthashs rÚshortstrzannotateopts.shortstr´s€€ðˆØ× Ò Ø �e‰OˆFØ×ÒØ �e‰OˆFØ �=‰=Ð $ܘdŸm™m¬U¯^©^Ô<Ð <Ð<Ü& t§}¡}Ó5ˆKØÔ1Ò1ؘ$ Ñ,Ñ,�ØÒ#˜Ð#r) Ú__name__Ú __module__Ú __qualname__Ú__doc__r[rirÚ propertycacherqr5rrrara¢s8„ñðØØñ€Hò -ð  ×Ññ $óñ $rracó—eZdZdZd„Zed„«Zed„«Zd„ZeZ d„Z ed„«Z dd„Z dd „Z d „Zdd „Zd „Zd„Zd„Zdd„Zd„Zedd„«Zdd„Zd„Zej4d„«Zej4d„«Zdd„Zy )Ú_annotatecontextz{do not use this class directly as it does not use lock to protect writes. use "with annotatecontext(...)" instead. có–—||_|j|_||_||_||_||_d|_d|_i|_yr) rÚuirrgÚ linelogpathÚ revmappathÚ_linelogÚ_revmapÚ _node2path)rfrrr{r|rgs rriz_annotatecontext.__init__ÌsF€ØˆŒ Ø—'‘'ˆŒØˆŒ ؈Œ Ø&ˆÔØ$ˆŒØˆŒ ؈Œ ؈�rcó—|j€ tjj|j«r^t |jd«5} t jj|j««|_ddd«|jSt j«|_|jS#t j$rt j«|_YŒgwxYw#1swY|jSxYw)Nsrb) r}ÚosrÚexistsr{rÚ linelogmodr ÚfromdataÚreadÚ LineLogError©rfr#s rr z_annotatecontext.linelog×s½€à �=‰=Ð Ü�w‰w�~‰~˜d×.Ñ.Ô/ܘ$×*Ñ*¨EÔ2°að=Ü(2×(:Ñ(:×(CÑ(CÀAÇFÁFÃHÓ(M˜œ ÷3ð�}‰}Ðô!+× 2Ñ 2Ó 4�” Ø�}‰}Ðøô &×2Ñ2ò=Ü(2×(:Ñ(:Ó(<˜ž ð=ú÷3ð�}‰}Ðús*Á C+Á2B9Â9,C(Ã%C+Ã'C(Ã(C+Ã+C?cóz—|j€$tj|j«|_|jSr)r~Ú revmapmodrr|©rfs rrz_annotatecontext.revmapäs,€à �<‰<Ð Ü$×+Ñ+¨D¯O©OÓ<ˆDŒLØ�|‰|Ðrcó.—|j�!|jj«d|_|j�Pt|jd«5}|j |jj ««ddd«d|_yy#1swYŒxYw)Nswb)r~Úflushr}rr{ÚwriteÚencoder‡s rÚclosez_annotatecontext.closeêsp€Ø �<‰<Ð #Ø �L‰L× Ñ Ô ØˆDŒLØ �=‰=Ð $Ü�d×&Ñ&¨Ô.°!Ø—‘˜Ÿ ™ ×,Ñ,Ó.Ô/÷/à ˆD�Mð %ß.Ð.ús Á*B  Bcóš—|j«|jj«t|j|j g«y)z0delete linelog and revmap, useful for rebuildingN)r�rÚclearÚ _unlinkpathsr|r{rŠs rÚrebuildz_annotatecontext.rebuildõs2€à � ‰ Œ Ø �‰×ÑÔÜ�d—o‘o t×'7Ñ'7Ð8Õ9rcó¶—|j€tj|j«S|jj |jj «S)z6return last node in revmap, or None if revmap is empty)r~r‰Ú getlastnoder|Úrev2hshÚmaxrevrŠs rÚlastnodez_annotatecontext.lastnodeûsB€ð �<‰<Ð ä×(Ñ(¨¯©Ó9Ð 9à—<‘<×'Ñ'¨¯ © ×(;Ñ(;Ó<Ð Ú incrementrgrmÚ _appendrevrÚcompleter–Ú_refineannotateresult)rfrErŸÚshowpathÚ showlinesÚdirectlyÚrevfctxÚ masterfctxÚ initvisitÚvisitÚpcacheÚneededÚhistr#Úllrevror%r&Ú newmainbranchÚprogressÚreadyr8Ú ismainbranchÚcurrr1ÚbsÚ bannotatedÚfrÚls rr±z_annotatecontext.annotate'so€ô$ �cœ3Ô Ü�d—i‘i×)Ñ)×.Ñ.¨sÓ3Ó4ˆCð!×4Ñ4°SÓ9ш�'Ù Ø�w‰w× Ò Ø—‘— ‘ ð-🠙 Ü"×)Ñ)¬$×*:Ñ*:¸7ÀGÓ*LÓMðñôð×(Ñ(¨°(¸IÓFÐ Fðˆ Ù ð &Ø!×.Ñ.Ø t°tð/ó� ð  §¡Ñ,Ø!%‘Jð0�Iˆ Ù Ø�~‰~ÓÐ'Ü—k‘kÜÐ8Ó9ÜÐ9Ó:ôðð × Ñ ˜ZÔ (Ø™!� ˆØˆØ˜1�ˆØˆÙØ— ‘ “ ˆAØ�F‰{˜a 4™iØØ�D—K‘KÑØŸ ™ ×+Ñ+¨A¯F©F«HÓ5�Ø— ‘ ×%Ñ% eÔ,ØŸ™×4Ñ4�Ø! 1§6¡6£8Ð,��Q‘ØØ×!Ñ! !Ó$ˆB؈F�1‰IÛ�Ø"ŸJ™J q¨!Ó,¨qÑ0��q‘ ؘF’?Ø—L‘L •Oðòô&›ˆ Ø ˆÙ�A˜TŸ[™[Ñ(Ø × Ñ ˜aÔ Ø˜‘ˆBÙØ�q‘E‘à�Øñ�A˜TŸ[™[Ò(ð Ð !Ø × %Ñ % aÔ (à �7‰7× Ò ÙØ—‘— ‘ ð!Ø$(§I¡I¬s°=Ó/AÐ#BñCõñØ—‘— ‘ ð2Ø48·I±Iñ>ôð � ‰ ×јdŸl™l×1Ñ1Ô2ð™!� ˆØ—7‘7×'Ñ'Ø ¤S¨Ó%7ð(ó ˆòØ�b‘ ˆAØ�D‰yØ— ‘ ” ØàˆEؘ‘ˆBÛ�ؘD’=Ø!�EØ—L‘L •OðñØà �I‰IŒK؈FØ  Ð-ˆLð˜D‘=Ð �=ܘQ“<ˆDÜ! "ž ‘��1ܘ$×*Ñ*¨4°©7°1©:°t¸A±wÓ?Ó@�ؘ’6™lØ�FܘT !™W d¨BÓ/�ؘ!‘9 ’>ؘQ˜Ø˜q™ à˜1“I ‘N”Ið&ðˆD�‰GØ�q� áØ×"Ñ"Ô$Ø!� Ü�r“7˜a’< D§I¡I×$9Ò$9Ø!% a¡�JØ�>Ü! $×"2Ñ"2°3¸¸Q¹Ó"@ÓA�FØ—‘  6¨:Õ6ÙØ,-¯F©F«H�—‘ §¡£Ñ)ó]ð` ×ÑÔð˜g™ qÒ)ô á)‘��Aô*4°B¼Ô)<ˆd�k‰k×!Ñ! "Ô%À"Ç'Á'Ã)ÈaÒ PØ)ð ñ ð×)Ñ)¨&°'¸8ÀYÓOÐOøômò Úð üód sÃU)Ô AU9Õ) U6Õ5U6cóv—d}d}t|t«sL|�Jttdœj t |«d„«|«}|�||j f|jvr|}|€T|jrdnd}|j||d¬«}||jv}|s |jr|j|dd¬«}||fS)zô(str) -> bool, fctx or node. return (True, f) if we can annotate without updating the linelog, pass f to annotatedirectly. return (False, f) if we need extra calculation. f is the fctx resolved from rev. TN)éé(có—yrr5)Úxs rÚz6_annotatecontext.canannotatedirectly..ós€¸trrA)rKrJ) rBrCÚbytesrrer·rrÚ _perfhackrš)rfrEror#ÚhshrKs rr©z$_annotatecontext.canannotatedirectlyés½€ðˆØ ˆÜ˜#œsÔ#¨¨Ü¤#Ñ&×*Ñ*¬3¨s«8±^ÓDÀSÓIˆC؈ C¨¯©Ð#3°t·{±{Ñ#BØ�Ø ˆ9Ø&*§n¢n™ ¸$ˆIØ×!Ñ! #°ÀtÐ!ÓLˆAؘ$Ÿ+™+Ð%ˆFÙ˜dŸnšnð×%Ñ% c°TÀdÐ%ÓK�Ø�qˆyÐrcóâ—|j|dd¬«}||jv�r$|g}d} |d}|j|«}|sn:|d|jvr|dj«}n|j |d«ŒSt j «} | j|j «| j| j«tj«} | j|j«t|«D]C}|j«} t|j|| ««} |j| | || «| }ŒEn|j } |j} | j«} |j!«}| j#|«}| D��cgc]\}}||ksŒ | j%|«|f‘Œ }}}|r|j'|| «}|r|j)|| | «}||f}|Scc}}w)a (rev : str) -> [(node : str, linenum : int, path : str)] the result has the same format with annotate, but include all (including deleted) lines up to rev. call this after calling annotate(rev, ...) for better performance and accuracy. Tr¤rr§r)ršrr³r*r¯rƒr Úcopyfromr±r—r‰Úreversedrºr»Ú _doappendrevÚ getalllinesrœr�r–Ú_addpathtoresultÚ _resolvelines)rfrErÀrÁrÃÚchainÚar#r%r rÚbr8ÚlinesrÜrÊÚrrÓroÚ linecontentss rÚannotatealllinesz!_annotatecontext.annotatealllinessÓ€ð×#Ñ# C°DÀDÐ#ÓIˆð ˜$Ÿ+™+Ò %Ø�IˆE؈AØØ˜"‘I�Ø×%Ñ% aÓ(�ÙØØ�a‘5˜DŸK™KÑ'ؘ1™Ÿ ™ › �AØØ— ‘ ˜R ™UÔ#ðô!×(Ñ(Ó*ˆGØ × Ñ ˜TŸ\™\Ô *Ø × Ñ ˜WŸ^™^Ô ,Ü×%Ñ%Ó'ˆFØ �O‰O˜DŸK™KÔ (ä˜e–_�Ø—F‘F“H�ܘd×.Ñ.¨q°!Ó4Ó5�Ø×!Ñ! '¨6°1°fÔ=Ø‘ñ %ð—l‘lˆGØ—[‘[ˆFà×#Ñ#Ó%ˆØ�l‰l‹nˆØ—‘˜sÓ#ˆÙ5:ÔI±U©T¨Q°¸aÀ5»j�6—>‘> !Ó$ aÒ(°UˆÑIñ Ø×*Ñ*¨6°6Ó:ˆFÙ Ø×-Ñ-¨f°f¸gÓFˆLؘlÐ+ˆF؈ ùóJs Æ G+Æ$G+có`—|D�cgc]}|j|d«‘Œ}}dgt|«z}tjt«}t t|««D]!}|||||dfj |«Œ#|�rd} |j«D]7\\} } } |j| «tjzrŒ,|| dd} n| €Ýi} |j«D]²\\} }} | | vr”|| dd} |jjr*|jjdt| «|| fz«|j!| |j#| ««}t%j&|j)««}|| | <| D] }| | |||<ŒŒ´t+d„|D««sJ‚|S|jjdt| «z«|j- «|j!| |j#| ««}|j.}t%j&|j)««}t|«t|«k7rt1j2d«‚t5|«D]!\}}||}||vsŒ||D]}|||<Œ ||=Œ#|r�Œ|Scc}w#t$r|cYSwxYw)ah(annotateresult) -> [line]. designed for annotatealllines. this is probably the most inefficient code in the whole fastannotate directory. but we have made a decision that the linelog does not store line contents. so getting them requires random accesses to the revlog data, since they can be many, it can be very slow. rNrs6fastannotate: reading %s line #%d to resolve lines %r c3ó$K—|]}|du–—Œ y­wrr5)rTrØs rrWz1_annotatecontext._resolvelines..csèø€Ð9±&¨Q˜1 Dœ=±&ùs‚s+fastannotate: annotate %s to resolve lines sunexpected annotated lines)r�r·Ú collectionsÚ defaultdictrºr-r¯rdÚrev2flagr‰ÚsidebranchflagÚ StopIterationrzrªr«r ršÚrev2pathr Ú splitnewlinesr*Úallr±r²ÚfaerrorÚCorruptedFileErrorr¹)rfr²rr rÓÚrevsroÚkey2idxsr1rÜrEÚ_linenumÚidxsÚrevlinesÚlinenumr.rçÚidxÚ annotatedÚlinerUs rrãz_annotatecontext._resolvelines8s¸€ñ/=Ó=©n¨�—‘˜q ™tÕ$¨nˆÐ=Ø�œ#˜nÓ-Ñ-ˆä×*Ñ*¬4Ó0ˆÜ”s˜6“{Ö#ˆAØ �d˜1‘g˜~¨aÑ0°Ñ3Ð4Ñ 5× <Ñ <¸QÕ ?ð$âàˆCð Ø-5¯^©^Ö-=Ñ)‘O�S˜( TØ—‘ sÓ+¬i×.FÑ.FÒFØ Ø(¨¨a©Ñ1°!Ñ4�CÙð .>ðˆ{ð�Ø,4¯N©NÖ,<Ñ(‘N�S˜' DØ (Ñ*Ø,¨T°!©WÑ5°aÑ8˜ØŸ7™7×,Ò,Ø ŸG™GŸM™Mð!9ä#(¨£:¨w¸Ð"=ñ!>ôð $×0Ñ0°°f·o±oÀcÓ6JÓK˜Ü %× 3Ñ 3°D·I±I³KÓ @˜Ø(-˜ ™ Û#˜Ø&.¨s¡m°GÑ&<˜˜sš ñ $ð-=ôÑ9±&Ó9Ô9Ð9Ð9Ø� ð �G‰G�M‰MØ?Ä%ÈÃ*ÑLô ð × Ñ ˜SÔ !Ø×$Ñ$ S¨&¯/©/¸#Ó*>Ó?ˆDØ×.Ñ.ˆIÜ×'Ñ'¨¯ © « Ó4ˆEÜ�5‹zœS ›^Ò+Ü×0Ñ0Ð1NÓOÐOä$ UÖ+‘��4ؘa‘L�ؘ’=Ø'¨œ{˜Ø&*˜˜sš ð +à  ™ ð ,óWðbˆ ùòo>øô!ò Ø’ ð ús…JÂA JÊ J-Ê,J-cóT—t|t«r|}n|j«}|jj |«}|s!t j dt|«z«‚|jj|«tjzdk7r!t j dt|«z«‚|jj|«|jjD��cgc]"\}}|jj|«|f‘Œ$}}}|j||||«Scc}}w)alike annotate, but when we know that f is in linelog. f can be either a 20-char str (node) or a fctx. this is for perf - in the best case, the user provides a node and we don't need to read the filelog or construct any filecontext. s%s is not in revmaprs%s is not in revmap mainbranch)rBrÚrœrr�rõrörrïr‰rðr r±r²r–r¿) rfr#rÀrÁrÜrÊrèrÓros rr­z!_annotatecontext.annotatedirectlyys€ô �aœÔ ؉Cà—&‘&“(ˆCØ— ‘ ×#Ñ# CÓ(ˆÙÜ×,Ñ,Ð-CÄcÈ#ÃhÑ-NÓOÐ OØ �K‰K× Ñ  Ó '¬)×*BÑ*BÑ BÀqÒ HÜ×,Ñ,Ø1´C¸³HÑ<óð ð � ‰ ×јeÔ$à48·L±L×4OÒ4Oô Ù4O©D¨A¨qˆT�[‰[× Ñ  Ó # QÒ 'Ð4Oð ñ ð×)Ñ)¨&°!°X¸yÓIÐIùó sÃ&'D$có†—|r|j|«}|r«t|t«rG|jj |«}|j ||jj |««}n|}tj|j««}t|«t|«k7rtj«‚||f}|S)znadd the missing path or line contents, they can be expensive. f could be either node or fctx. ) rârBrÚrr�ršròr rór*r·rõrö)rfror#rÀrÁrÊr.rçs rr¿z&_annotatecontext._refineannotateresult�s¡€ñ Ø×*Ñ*¨6Ó2ˆF٠ܘ!œUÔ#ØŸ ™ ×+Ñ+¨AÓ.�Ø×(Ñ(¨¨D¯K©K×,@Ñ,@ÀÓ,GÓH‘à�Ü×'Ñ'¨¯ © « Ó4ˆEÜ�5‹zœS ›[Ò(Ü×0Ñ0Ó2Ð2ؘe�_ˆF؈ rcóV—|j|j|j|||«yr)ràr r)rfr.r8rÑs rr½z_annotatecontext._appendrev¢s €Ø ×ј$Ÿ,™,¨¯ © °T¸6À:ÕNrcóX—tj|||jj«Sr)r Ú allblocksrgrV)rfråræs rr»z_annotatecontext._diffblocks¥s€Ü�‰˜q ! T§Y¡Y×%7Ñ%7Ó8Ð8rc óp‡—ˆfd„}g}i}|�@|D];\\}} } } } | dk7sŒ||| | D� �cgc]\} }t| t«s| ‘Œc}} z }Œ=t|«}||vr|j|«|D] } || «|| <Œ‰j |j «|j «¬«}|||<t|«D]j\\}} } } } | dk(rŒ|€|j||| | | «Œ)|| | D��cgc]\}}t|t«r|n|||f‘Œ }}}|j||| |«Œlycc}} wcc}}w)z'append a revision to linelog and revmapcóÜ•—t|t«rtjd«‚|j «}‰j |«}|€"‰j |d|j«¬«}|S)z (fctx) -> intsf should not be an intT)Ú sidebranchr)rBrCr ÚProgrammingErrorrœr�r¯r)r#rÜrErs €rÚgetllrevz/_annotatecontext._doappendrev..getllrev¬s^ø€ô˜!œSÔ!Ü×,Ñ,Ð-FÓGÐGà—&‘&“(ˆCØ—.‘. Ó%ˆC؈{Ø—m‘m C°D¸q¿v¹v»x�mÓH�؈JrNr4rP) rBrCr´Úremover¯rœrrßÚ replacelinesÚreplacelines_vec)r rr.r8rÑr ÚsiderevsÚ siderevmapr9r:r;r<Úopr#rÓrÊrèÚbliness ` rràz_annotatecontext._doappendrev¨swø€ô ðˆØˆ Ø Ð !Û(.Ñ$Ñ ��R˜˜R "ؘ“:àà$.¨r°"Ñ$5ô!á$5™D˜A˜qÜ)¨!¬SÔ1òØ$5ò!ñ‘Hð)/ô�x“=ˆØ �8Ñ Ø �O‰O˜DÔ !ÛˆAÙ$ Q›KˆJ�qŠMðð— ‘ ˜dŸi™i›k°· ± ³ � Ó<ˆØ ˆ �4Ñä$,¨VÖ$4Ñ Ñ ˆR��R˜˜bØ�TŠzØØÐ!Ø×$Ñ$ U¨B°°B¸Õ;ð!+¨2¨bÑ 1ôá 1™˜˜1ô& a¬Ô-‘a°:¸a±=À1ÒEØ 1ðñð×(Ñ(¨°°B¸Õ?ñ%5ùó!ùó*s ©D, Ã/#D2c óv‡‡—‰€ ‰jŠˆˆfd„}|D��cgc]\}}||||«f‘Œc}}Scc}}w)z6(revmap, [(node, linenum)]) -> [(node, linenum, path)]có •—‰jj|«}|€/‰j‰j|««}|‰j|<|Sr)rreròr�)Únodeidrrrfs €€rÚ_getpathz3_annotatecontext._addpathtoresult.._getpathßsFø€Ø—?‘?×&Ñ& vÓ.ˆD؈|Ø—‘ v§~¡~°fÓ'=Ó>�Ø*.�—‘ Ñ'؈Kr)r)rfr²rrÚnrÓs` ` rrâz!_annotatecontext._addpathtoresultÚs?ù€à ˆ>Ø—[‘[ˆFõ ñ1?Ô?±©¨¨1��A‘x “{Ò#°Ò?Ð?ùÓ?sœ5cóæ—|€d}n?|jj|j««}|stj«‚|j j |k7rtj«‚y)z:check if fctx is the master's head last time, raise if notNr)rr�rœrõÚCannotReuseErrorr r—)rfr.rÊs rr¶z%_annotatecontext._checklastmasterheadès^€à ˆ<؉Eà—K‘K×'Ñ'¨¯ © « Ó4ˆEÙÜ×.Ñ.Ó0Ð0Ø �<‰<× Ñ  %Ò 'Ü×*Ñ*Ó,Ð ,ð (rcón‡‡—|jjŠ|jjŠˆˆfd„}|S)z-> (fctx) -> [fctx]có0•—t|‰¬«}‰s|dd}|S)N)r$r)r')r#r%rmrls €€rr z-_annotatecontext._parentfunc..parentsùs"ø€Ü˜! LÔ1ˆBÙØ˜˜�V�؈Ir)rgrlrm)rfr rmrls @@rr³z_annotatecontext._parentfuncós/ù€ð—y‘y×-Ñ-ˆ Ø—i‘i×+Ñ+ˆ õ ð ˆrcó:—|jjdd«S)Nó fastannotatesperfhack)rzÚ configboolrŠs rrÛz_annotatecontext._perfhacks€à�w‰w×!Ñ! /°;Ó?Ð?rc óN—t|j||xs |jfi|¤ŽSr)rMrr)rfrErÚkwdss rršz_annotatecontext._resolvefctxs#€Ü˜4Ÿ9™9 c¨DÒ,=°D·I±IÑGÀ$ÑGÐGr©T)NFF)FFr)rrrsrtruriÚpropertyr rr�Ú__del__r“r˜r¢r±r©rêrãr­r¿r½r»Ú staticmethodràrâr¶rrvr³rÛršr5rrrxrxÇsì„ñò ðñ óð ðñóðò !ð€Gò:ð ñ=óð=ó!óF@PòDó.6òp?òBJò.ó$Oò9ðò/@óð/@ób @ò -ð ×Ññ óð ð ×Ññ@óð@ôHrrxcó\—|D]} tj|«Œy#t$rYŒ'wxYw)zsilent, best-effort unlinkN)rÚunlinkÚOSError)Úpathsrs rr’r’ s1€ãˆð Ü �K‰K˜Õ ñøôò Ù ð ús ‡Ÿ +ª+cóP—eZdZdZefd„Zed„«Zed„«Zd„Z ed„«Z y)Ú pathhelperz9helper for getting paths for lockfile, linelog and revmapcó„—tjjd|jt |««|_||_y)Nr)r�rÚjoinrqrQÚ_vfspathr")rfrrrgs rrizpathhelper.__init__s.€äŸ™Ÿ ™ Ø ˜TŸ]™]¬I°d«Oó ˆŒ ðˆ� rcóš—tjj|jjj |j ««Sr)r�rÚdirnamer"Úvfsr*r+rŠs rr-zpathhelper.dirnames,€ä�w‰w�‰˜tŸz™zŸ~™~×2Ñ2°4·=±=ÓAÓBÐBrcóf—|jjj|jdz«S)Ns.l©r"r.r*r+rŠs rr{zpathhelper.linelogpath ó$€à�z‰z�~‰~×"Ñ" 4§=¡=°5Ñ#8Ó9Ð9rcóp—tj|jj|jdz«S)Ns.lock)Úlockmodr r"r.r+rŠs rr zpathhelper.lock$s$€Ü�|‰|˜DŸJ™JŸN™N¨D¯M©M¸HÑ,DÓEÐErcóf—|jjj|jdz«S)Ns.mr0rŠs rr|zpathhelper.revmappath'r1rN) rrrsrtruÚ defaultoptsrir r-r{r r|r5rrr(r(sQ„ÙCà(3óðñCóðCðñ:óð:òFðñ:óñ:rr(c#óK—t|||«}tj|j«|j}|j }d} |j «5t|||||«}|r|j«|–—ddd«|�|j«yy#1swYŒxYw#t$r2|�|j«|jjd|z«‚wxYw#|�|j«wwxYw­w)a context needed to perform (fast) annotate on a file an annotatecontext of a single file consists of two structures: the linelog and the revmap. this function takes care of locking. only 1 process is allowed to write that file's linelog and revmap at a time. when something goes wrong, this function will assume the linelog and the revmap are in a bad state, and remove them from disk. use this function in the following way: with annotatecontext(...) as actx: actx. .... Ns+fastannotate: %s: cache broken and deleted ) r(rÚmakedirsr-r|r{r rxr“Ú Exceptionrzr«r�)rrrgr“Úhelperr|r{Úactxs rÚannotatecontextr;,sãèø€ô ˜˜d DÓ )€F܇M�M�&—.‘.Ô!Ø×"Ñ"€JØ×$Ñ$€KØ €Dð Ø �[‰[�]Ü# D¨$° ¸ZÈÓNˆDÙØ— ‘ ”ØŠJ÷ ð Ð Ø �J‰J�Lð ÷ˆ]ûô òØ Ð Ø �L‰LŒNØ �‰� ‰ ÐEÈÑLÔMØ ð ûð Ð Ø �J‰J�Lð üsB‚AC>Á B(Á&BÂB(ÂC>ÂB%Â!B(Â(;C#Ã#C&Ã&C;Ã;C>có¦—|j}|j}|jjddd«rd}t ||¬«}t ||||«S)zdlike annotatecontext but get the context from a fctx. convenient when used in fctx.annotate rs forcefollowT)rVrl)r"Ú_pathrzrrar;)r.r$rVr“rrÚaoptss rÚfctxannotatecontextr?QsN€ð �:‰:€DØ �:‰:€DØ ‡w�w×ј/¨>¸4Ô@ØˆÜ  (¸Ô @€EÜ ˜4  u¨gÓ 6Ð6rr)FN)TNF)1ríÚ contextlibr�Úmercurial.i18nrÚmercurial.pycompatrrrÚmercurial.noderrr Ú mercurialr r rƒr r3r rrrÚmercurial.utilsrrÚrõrr‰Ú lrucachefuncrr'r2r>Ú revsinglerDrMrQr_r5rnrarxr’r(Úcontextmanagerr;r?r5rrÚrJsýðóÛÛ å÷ñ÷ ñ÷ ÷ñ÷÷ ð ×Ññóðó ò.9òðˆT× Ñ ˜w×0Ñ0Ó 1€ ó)òZò7ñ# 5×#4Ñ#4Ó5Ð÷$ñ$ñD‹n€ ÷HñHòD÷:ñ:ð4 ×ÑØ%0¸%ò!óð!ôH 7r