§
    	^µc¸z  ã                   ó¾  — d dl Z d dlZd dlZd dlmZ d dlmZmZmZ d dl	m
Z
mZmZ d dlmZmZmZmZmZmZmZ d dlmZmZ ddlmZmZ ej        d	„ ¦   «         Zdd„Z d„ Z!d„ Z" ej        ej#        ¦  «        Z$dd„Z%d„ Z&d„ Z' e'ej(        ¦  «        Z) G d„ d¦  «        Z* e*¦   «         Z( G d„ d¦  «        Z+d„ Z, G d„ d¦  «        Z-ej.        e(dfd„¦   «         Z/dd„Z0dS )é    N)Ú_)ÚgetattrÚopenÚsetattr)ÚbinÚhexÚshort)ÚerrorÚlinelogÚlockÚmdiffÚpycompatÚscmutilÚutil)ÚhashutilÚ
stringutilé   )r
   Úrevmapc                 ó,   — |                       |¦  «        S ©N)Úfile)ÚrepoÚpaths     ú</usr/lib/python3/dist-packages/hgext/fastannotate/context.pyÚ_getflogr   ,   s   € à�9Š9�T‰?Œ?Ðó    Tc                 óÒ   ‡ — ‰ j          ‰                      ¦   «         }|sˆ fd„|D ¦   «         }|D ]7}d|j        vr,t          ‰ j        |                     ¦   «         ¦  «        |_        Œ8|S )Nc                 óh   •— g | ].}|                      ¦   «         ‰                      ¦   «         k    ¯,|‘Œ/S © ©r   )Ú.0ÚpÚfs     €r   ú
<listcomp>z_parents.<locals>.<listcomp><   s3   ø€ Ð4Ð4Ð4�A˜qŸvšv™xœx¨1¯6ª6©8¬8Ò3Ð3ˆaÐ3Ð3Ð3r   Ú_filelog)Ú	_changeidÚparentsÚ__dict__r   Ú_repor   r%   )r#   ÚfollowÚplr"   s   `   r   Ú_parentsr,   2   s{   ø€ ð
 „K€KØ	
�Š‰Œ€Bð ð 5Ø4Ð4Ð4Ð4˜Ð4Ñ4Ô4ˆð ð 5ð 5ˆØ˜QœZÐ'Ð'Ý! !¤'¨1¯6ª6©8¬8Ñ4Ô4ˆAŒJøà€Ir   c                 óÈ   ‡ — ‰                       ¦   «         }|                     d¦  «        }|r|                     d¦  «        s|dz  }ˆ fd„t          |¦  «        D ¦   «         |fS )Nó   
r   c                 ó   •— g | ]}‰|f‘ŒS r   r   )r!   ÚiÚfctxs     €r   r$   z_decorate.<locals>.<listcomp>N   s   ø€ Ð1Ð1Ð1˜1ˆd�AˆYÐ1Ð1Ð1r   )ÚdataÚcountÚendswithÚrange)r1   ÚtextÚ	linecounts   `  r   Ú	_decorater8   I   sl   ø€ Ø�9Š9‰;Œ;€DØ—
’
˜5Ñ!Ô!€IØð �D—M’M %Ñ(Ô(ð Ø�Q‰ˆ	Ø1Ð1Ð1Ð1¥ iÑ 0Ô 0Ð1Ñ1Ô1°4Ð8Ð8r   c                 ób   — |D ]+\  \  }}}}}|dk    r| d         ||…         |d         ||…<   Œ,|S )Nó   =r   r   )ÚparentÚchildÚblocksÚa1Úa2Úb1Úb2Úts           r   Ú_pairrC   T   sN   € Ø%ð /ð /ÑÑˆˆR��R˜!ð �Š9ˆ9Ø$ Qœi¨¨2¨Ô.ˆE�!ŒH�R˜�U‰OøØ€Lr   Fc                 óÂ  — |r(t          |t          ¦  «        s|�t          | |¦  «        }n| |         }|€G|                     ¦   «         €	||         }n�|                      ||                     ¦   «         ¬¦  «        }nc||         }|dk    r|                     ¦   «         }n|                     ¦   «         }||                     ¦   «         k    r||_        | |         |_        |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.
    N)Úchangeidó   linkrev)	Ú
isinstanceÚintÚ
_revsingleÚrevÚfilectxÚlinkrevÚintrorevr&   Ú
_changectx)r   rJ   r   Ú
resolverevÚ	adjustctxÚctxr1   rM   s           r   ÚresolvefctxrR   b   s×   € ð ð �* S­#Ñ.Ô.ð °3°?Ý˜˜sÑ#Ô#ˆˆà�3Œiˆð Ðð �7Š7‰9Œ9ÐØ�t”9ˆDˆDà—<’< ¨s¯wªw©y¬y�<Ñ9Ô9ˆDˆDà�4ŒyˆØ˜
Ò"Ð"Ø—|’|‘~”~ˆHˆHà—}’}‘”ˆHØ�s—w’w‘y”yÒ Ð Ø%ˆDŒNØ" 8œnˆDŒOØ€Kr   c                 ó¦   — |                       dd¦  «                              dd¦  «                              dd¦  «                              dd¦  «        S )	Ns   .hg/s   .hg.hg/s   .l/s   .l.hg/s   .m/s   .m.hg/s   .lock/s	   .lock.hg/)Úreplacer    s    r   Ú	encodedirrU   �   sE   € à�Š�W˜jÑ)Ô)ß	Š�˜Ñ	#Ô	#ß	Š�˜Ñ	#Ô	#ß	Š�˜LÑ	)Ô	)ð	r   c                 óò   ‡ — t          j        t          ˆ fd„t          j        j        D ¦   «         ¦  «        ¦  «        }t          t          j        |¦  «         	                    ¦   «         ¦  «        d d…         S )Nc              3   ó<   •K  — | ]}|t          ‰|¦  «        fV — Œd S r   )r   )r!   ÚkÚdiffoptss     €r   ú	<genexpr>zhashdiffopts.<locals>.<genexpr>š   s2   øè è € ÐJÐJ¨Q�•7˜8 QÑ'Ô'Ð(ÐJÐJÐJÐJÐJÐJr   é   )
r   ÚpprintÚsortedr   rY   Údefaultsr   r   Úsha1Údigest)rY   Ú
diffoptstrs   ` r   Úhashdiffoptsrb   ˜   si   ø€ ÝÔ"ÝÐJÐJÐJÐJµ%´.Ô2IÐJÑJÔJÑJÔJñô €Jõ �xŒ}˜ZÑ(Ô(×/Ò/Ñ1Ô1Ñ2Ô2°2°A°2Ô6Ð6r   c                   óD   — e Zd ZdZddddœZd„ Zej        d„ ¦   «         ZdS )Ú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)s   diffoptss   followrenames   followmergec           	      ó¶   — t          j        |¦  «        }| j                             ¦   «         D ]*\  }}t	          | ||                     ||¦  «        ¦  «         Œ+d S r   )r   Úbyteskwargsr^   Úitemsr   Úget)ÚselfÚoptsrX   Úvs       r   Ú__init__zannotateopts.__init__¯   s^   € ÝÔ# DÑ)Ô)ˆØ”M×'Ò'Ñ)Ô)ð 	-ð 	-‰DˆAˆqÝ�D˜!˜TŸXšX a¨™^œ^Ñ,Ô,Ð,Ð,ð	-ð 	-r   c                 óÜ   — d}| j         s|dz  }| j        s|dz  }| j        �Ht          | j        t          j        ¦  «        sJ ‚t          | j        ¦  «        }|t          k    r|d|z   z  }|pdS )z?represent opts in a short string, suitable for a directory namer   s   r0s   m0Nó   is   default)ÚfollowrenameÚfollowmergerY   rG   r   rb   Ú_defaultdiffopthash)ri   ÚresultÚdiffopthashs      r   Úshortstrzannotateopts.shortstr´   sˆ   € ð ˆØÔ ð 	Ø�e‰OˆFØÔð 	Ø�e‰OˆFØŒ=Ð$Ý˜dœm­U¬^Ñ<Ô<Ð<Ð<Ð<Ý& t¤}Ñ5Ô5ˆKØÕ1Ò1Ð1Ø˜$ Ñ,Ñ,�ØÐ#˜Ð#r   )	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r^   rl   r   Úpropertycachert   r   r   r   rd   rd   ¢   sc   € € € € € ðð ð ØØðð €Hð-ð -ð -ð
 
Ôð$ð $ñ Ôð$ð $ð $r   rd   c                   ó  — e Zd ZdZd„ Zed„ ¦   «         Zed„ ¦   «         Zd„ ZeZ	d„ Z
ed„ ¦   «         Zdd	„Zdd„Zd„ Zdd„Zd„ Zd„ Zd„ Zdd„Zd„ Zedd„¦   «         Zdd„Zd„ Zej        d„ ¦   «         Zej        d„ ¦   «         Zdd„Zd
S )Ú_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 | _        d S r   )	r   Úuir   rj   ÚlinelogpathÚ
revmappathÚ_linelogÚ_revmapÚ
_node2path)ri   r   r   r~   r   rj   s         r   rl   z_annotatecontext.__init__Ì   sH   € ØˆŒ	Ø”'ˆŒØˆŒ	ØˆŒ	Ø&ˆÔØ$ˆŒØˆŒØˆŒØˆŒˆˆr   c                 ó¼  — | j         €Ït          j                             | j        ¦  «        r“t          | j        d¦  «        5 }	 t          j                             | 	                    ¦   «         ¦  «        | _         n-# t          j
        $ r t          j        ¦   «         | _         Y nw xY wd d d ¦  «         n# 1 swxY w Y   nt          j        ¦   «         | _         | j         S )Ns   rb)r€   Úosr   Úexistsr~   r   Ú
linelogmodr   ÚfromdataÚreadÚLineLogError©ri   r#   s     r   r   z_annotatecontext.linelog×   sü   € àŒ=Ð ÝŒw�~Š~˜dÔ.Ñ/Ô/ð 5Ý˜$Ô*¨EÑ2Ô2ð =°að=Ý(2Ô(:×(CÒ(CÀAÇFÂFÁHÄHÑ(MÔ(M˜œ˜øÝ%Ô2ð =ð =ð =Ý(2Ô(:Ñ(<Ô(<˜œ˜˜ð=øøøð=ð =ð =ñ =ô =ð =ð =ð =ð =ð =ð =øøøð =ð =ð =ð =øõ !+Ô 2Ñ 4Ô 4�”ØŒ}Ðs6   ÁB3Á6A:Á9B3Á:'B$Â!B3Â#B$Â$B3Â3B7Â:B7c                 óZ   — | j         €t          j        | j        ¦  «        | _         | j         S r   )r�   Ú	revmapmodr   r   ©ri   s    r   r   z_annotatecontext.revmapä   s&   € àŒ<ÐÝ$Ô+¨D¬OÑ<Ô<ˆDŒLØŒ|Ðr   c                 ó&  — | j         � | j                              ¦   «          d | _         | j        �bt          | j        d¦  «        5 }|                     | j                             ¦   «         ¦  «         d d d ¦  «         n# 1 swxY w Y   d | _        d S d S )Ns   wb)r�   Úflushr€   r   r~   ÚwriteÚencoderŠ   s     r   Úclosez_annotatecontext.closeê   sÅ   € ØŒ<Ð#ØŒL×ÒÑ Ô Ð ØˆDŒLØŒ=Ð$Ý�dÔ&¨Ñ.Ô.ð 0°!Ø—’˜œ×,Ò,Ñ.Ô.Ñ/Ô/Ð/ð0ð 0ð 0ñ 0ô 0ð 0ð 0ð 0ð 0ð 0ð 0øøøð 0ð 0ð 0ð 0à ˆDŒMˆMˆMð %Ð$s   Á-A=Á=BÂBc                 ó–   — |                       ¦   «          | j                             ¦   «          t          | j        | j        g¦  «         dS )z0delete linelog and revmap, useful for rebuildingN)r’   r‚   ÚclearÚ_unlinkpathsr   r~   r�   s    r   Úrebuildz_annotatecontext.rebuildõ   sA   € à�
Š
‰ŒˆØŒ×ÒÑÔÐÝ�d”o tÔ'7Ð8Ñ9Ô9Ð9Ð9Ð9r   c                 óŠ   — | j         €t          j        | j        ¦  «        S | j                              | j         j        ¦  «        S )z6return last node in revmap, or None if revmap is empty)r�   rŒ   Úgetlastnoder   Úrev2hshÚmaxrevr�   s    r   Úlastnodez_annotatecontext.lastnodeû   s:   € ð Œ<ÐåÔ(¨¬Ñ9Ô9Ð9à”<×'Ò'¨¬Ô(;Ñ<Ô<Ð<r   Tc                 ó  — | j         }	 |                      |d¬¦  «        }| j        j                             |                     ¦   «         ¦  «        }|s$|r"||k    r| j                             |¦  «        duS ||k    S # t          $ r Y dS w xY w)a   return True if the revmap / linelog is up-to-date, or the file
        does not exist in the master revision. False otherwise.

        it tries to be fast and could return false negatives, because of the
        use of linkrev instead of introrev.

        useful for both server and client to decide whether to update
        fastannotate cache or not.

        if strict is True, even if fctx exists in the revmap, but is not the
        last node, isuptodate will return False. it's good for performance - no
        expensive check was done.

        if strict is False, if fctx exists in the revmap, this function may
        return True. this is useful for the client to skip downloading the
        cache if the client's master is behind the server's.
        T)rO   N)	r›   Ú_resolvefctxr   Ú	changelogÚnoderL   r   Úhsh2revÚLookupError)ri   ÚmasterÚstrictr›   r#   Úlinknodes         r   Ú
isuptodatez_annotatecontext.isuptodate  s±   € ð$ ”=ˆð	Ø×!Ò! &°TÐ!Ñ:Ô:ˆAð ”yÔ*×/Ò/°·	²	±´Ñ<Ô<ˆHØð A˜hð A¨8°xÒ+?Ð+?ð ”{×*Ò*¨8Ñ4Ô4¸DÐ@Ð@ð ˜xÒ'Ð'øÝð 	ð 	ð 	à�4�4ð	øøøs   ‰A-A= Á7A= Á=
BÂ
BNFc           
      ó   ‡ — t          |t          ¦  «        r,t          ‰ j        j                             |¦  «        ¦  «        }‰                      |¦  «        \  }}|rl‰ j        j        rI‰ j         	                    d‰ j
        t          j        t          j        |d¦  «        ¦  «        fz  ¦  «         ‰                      |||¦  «        S d}|r5	 ‰                      |dd¬¦  «        }|‰ j        v rd}n# t$          $ r Y nw xY w|g}|rY|                     ¦   «         €0t)          j        t-          d¦  «        t-          d¦  «        ¬¦  «        ‚|                     |¦  «         |dd…         }	i }
|d	i}i }|	rè|	                     ¦   «         }||
v s||v rŒ|‰ j        v rl‰ j                             |                     ¦   «         ¦  «        }‰ j                             |¦  «         ‰ j        j        }||                     ¦   «         f||<   Œ”‰                      |¦  «        }||
|<   |D ]7}|                     |d
¦  «        d	z   ||<   ||
vr|	                     |¦  «         Œ8|	°ètA          ¦   «         }|}|r?|‰ j        vr6| !                    |¦  «         |
|         }|r	|d
         }nd}n|r	|‰ j        v°6|�‰  "                    |¦  «         ‰ j        j        rX|r2‰ j         	                    d‰ j
        tG          |¦  «        fz  ¦  «         n$|s"‰ j         	                    d‰ j
        z  ¦  «         ‰ j                             ‰ j        j$        ¦  «         |dd…         }	‰ j         %                    dtG          |¦  «        ¬¦  «        }|	�rÈ|	d         }||v r|	                     ¦   «          Œ$d}|
|         }|D ]}||vrd}|	                     |¦  «         Œ|sŒQ|	                     ¦   «          d}||v }||vsJ ‚tM          |¦  «        }tO          |¦  «        D ]~\  }}tQ          ‰  )                    ||         d	         |d	         ¦  «        ¦  «        }|d
k    r|r|}tU          ||         ||¦  «        }||         d	k    r||= ||= Œn||xx         d	z  cc<   Œ|||<   |
|= |r€| +                    ¦   «          d}tG          |¦  «        dk    r‰ j,        j-        r|d
         }|€)tQ          ‰  )                    d|d	         ¦  «        ¦  «        }‰  .                    |||¦  «         n0|r.| 
                    ¦   «         ‰ j/        |                     ¦   «         <   |	�°È| 0                    ¦   «          ˆ fd„||         d
         D ¦   «         }‰  1                    ||||¦  «        S )aý  incrementally update the cache so it includes revisions in the main
        branch till 'master'. and run annotate on 'rev', which may or may not be
        included in the main branch.

        if master is None, do not update linelog.

        the first value returned is the annotate result, it is [(node, linenum)]
        by default. [(node, linenum, path)] if showpath is True.

        if showlines is True, a second value will be returned, it is a list of
        corresponding line contents.
        s6   fastannotate: %s: using fast path (resolved fctx: %s)
s   nodeNT©rO   rP   s   cannot update linelog to wdir()s   set fastannotate.mainbranch)Úhintr   r   s7   fastannotate: %s: %d new changesets in the main branch
sB   fastannotate: %s: linelog cannot help in annotating this revision
s   building cache)ÚtotaléÿÿÿÿFé   r   c                 ó    •— g | ]J\  }}t          |t          ¦  «        r‰j                             |¦  «        n|                     ¦   «         |f‘ŒKS r   )rG   rH   r   r™   rŸ   )r!   ÚfrÚlri   s      €r   r$   z-_annotatecontext.annotate.<locals>.<listcomp>ã  s^   ø€ ð 
ð 
ð 
á��Aõ *4°B½Ñ)<Ô)<ÐKˆdŒk×!Ò! "Ñ%Ô%Ð%À"Ç'Â'Á)Ä)ÈaÐPð
ð 
ð 
r   )2rG   rH   r   r   rž   rŸ   Úcanannotatedirectlyr}   Ú	debugflagÚdebugr   r   r\   r   ÚsafehasattrÚannotatedirectlyr�   r   r¡   rJ   r
   ÚAbortr   ÚappendÚpopr    r   ÚannotateÚannotateresultr2   Ú_parentfuncrh   ÚsetÚaddÚ_checklastmasterheadÚlenrš   Úmakeprogressr8   Ú	enumerateÚlistÚ_diffblocksrC   Ú	incrementrj   rp   Ú
_appendrevr‚   ÚcompleteÚ_refineannotateresult)ri   rJ   r¢   ÚshowpathÚ	showlinesÚdirectlyÚrevfctxÚ
masterfctxÚ	initvisitÚvisitÚpcacheÚneededÚhistr#   Úllrevrr   r+   r"   ÚnewmainbranchÚprogressÚreadyr=   ÚismainbranchÚcurrr0   ÚbsÚ
bannotateds   `                          r   r·   z_annotatecontext.annotate'  s|  ø€ õ$ �c�3ÑÔð 	5Ý�d”iÔ)×.Ò.¨sÑ3Ô3Ñ4Ô4ˆCð !×4Ò4°SÑ9Ô9Ñˆ�'Øð 
	GØŒwÔ ð Ø”—’ð-ð œ	Ý"Ô)­$Ô*:¸7ÀGÑ*LÔ*LÑMÔMðññô ð ð ×(Ò(¨°(¸IÑFÔFÐFð ˆ
Øð 		&ð&Ø!×.Ò.Ø t°tð /ñ ô �
ð  ¤Ð,Ð,Ø!%�Jøøõ	 ð ð ð Ø�ðøøøð8 �Iˆ	Øð 	)Ø�~Š~ÑÔÐ'Ý”kÝÐ8Ñ9Ô9ÝÐ9Ñ:Ô:ðñ ô ð ð ×Ò˜ZÑ(Ô(Ð(Ø˜!˜!˜!”ˆØˆØ˜1�ˆØˆØð 	$Ø—	’	‘”ˆAØ�Fˆ{ˆ{˜a 4˜i˜iØØ�D”KÐÐØœ×+Ò+¨A¯FªF©H¬HÑ5Ô5�Ø”×%Ò% eÑ,Ô,Ð,ØœÔ4�Ø! 1§6¢6¡8¤8Ð,��Q‘ØØ×!Ò! !Ñ$Ô$ˆBØˆF�1‰IØð $ð $�Ø"ŸJšJ q¨!Ñ,Ô,¨qÑ0��q‘	Ø˜F�?�?Ø—L’L ‘O”O�Oøð ð 	$õ& ™œˆØˆØð 	�A˜Tœ[Ð(Ð(Ø×Ò˜aÑ Ô Ð Ø˜”ˆBØð Ø�q”E��à�Øð ð 	�A˜Tœ[Ð(Ð(ð Ð!Ø×%Ò% aÑ(Ô(Ð(àŒ7Ôð 
	Øð 	Ø”—’ð!Ø$(¤I­s°=Ñ/AÔ/AÐ#BñCñô ð ð ð ð Ø”—’ð2Ø48´Iñ>ñô ð ð 	Œ×Ò˜dœlÔ1Ñ2Ô2Ð2ð ˜!˜!˜!”ˆØ”7×'Ò'Ø¥S¨Ñ%7Ô%7ð (ñ 
ô 
ˆð ñ .	5Ø�b”	ˆAØ�DˆyˆyØ—	’	‘”�ØàˆEØ˜”ˆBØð $ð $�Ø˜D�=�=Ø!�EØ—L’L ‘O”O�OøØð Øà�IŠI‰KŒKˆKØˆFØ Ð-ˆLð ˜D�=�=�=�=Ý˜Q‘<”<ˆDÝ! "™œð 	#ð 	#‘��1Ý˜$×*Ò*¨4°¬7°1¬:°t¸A´wÑ?Ô?Ñ@Ô@�Ø˜’6�6˜l�6Ø�FÝ˜T !œW d¨BÑ/Ô/�Ø˜!”9 ’>�>Ø˜Q˜Ø˜q˜	˜	à˜1�I�I”I ‘N�I�I‘I�IàˆD�‰GØ�q�	àð 	5Ø×"Ò"Ñ$Ô$Ð$Ø!�
Ý�r‘7”7˜a’<�< D¤IÔ$9�<Ø!% a¤�JØ�>Ý! $×"2Ò"2°3¸¸Q¼Ñ"@Ô"@ÑAÔA�FØ—’  6¨:Ñ6Ô6Ð6Ð6Øð 5Ø,-¯FªF©H¬H�” §¢¡¤Ñ)ð] ñ .	5ð` 	×ÒÑÔÐð
ð 
ð 
ð 
à˜gœ qÔ)ð
ñ 
ô 
ˆð ×)Ò)¨&°'¸8ÀYÑOÔOÐOs   ÃC2 Ã2
C?Ã>C?c                 óx  — d}d}t          |t          ¦  «        sO|�Mt          t          dœ                     t          |¦  «        d„ ¦  «        |¦  «        }|�|| j        f| j        v r|}|€M| j        rdnd}|  	                    ||d¬¦  «        }|| j        v }|s| j        r|  	                    |dd¬¦  «        }||fS )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                 ó   — d S r   r   )Úxs    r   ú<lambda>z6_annotatecontext.canannotatedirectly.<locals>.<lambda>ó  s   € ¸t€ r   rF   )rP   rO   )
rG   rH   Úbytesr   rh   r½   r   r   Ú	_perfhackr�   )ri   rJ   rr   r#   ÚhshrP   s         r   r¯   z$_annotatecontext.canannotatedirectlyé  sâ   € ð ˆØˆÝ˜#�sÑ#Ô#ð 	¨¨Ý¥#Ð&Ð&×*Ò*­3¨s©8¬8°^°^ÑDÔDÀSÑIÔIˆCØˆ C¨¬Ð#3°t´{Ð#BÐ#BØ�Øˆ9Ø&*¤nÐ>˜
˜
¸$ˆIØ×!Ò! #°ÀtÐ!ÑLÔLˆAØ˜$œ+Ð%ˆFØð L˜dœnð Lð ×%Ò% c°TÀdÐ%ÑKÔK�Ø�qˆyÐr   c                 óô  ‡‡— |                       |dd¬¦  «        }|| j        v�rD|g}d}	 |d         }|                      |¦  «        }|snF|d         | j        v r|d                              ¦   «         }n|                     |d         ¦  «         Œft          j        ¦   «         }	|	                     | j        ¦  «         |	                     |	j	        ¦  «         t          j        ¦   «         Š‰                     | j        ¦  «         t          |¦  «        D ]S}|                     ¦   «         }
t          |                      ||
¦  «        ¦  «        }|                      |	‰||¦  «         |
}ŒTn| j        }	| j        Š|	                     ¦   «         }|                     ¦   «         }‰                     |¦  «        Šˆˆfd„|D ¦   «         }|r|                      |‰¦  «        }|r|                      |‰|	¦  «        }||f}|S )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§   r   rª   r   c                 óP   •— g | ]"\  }}|‰k    ¯‰                      |¦  «        |f‘Œ#S r   )r™   )r!   Úrr®   rÐ   r   s      €€r   r$   z5_annotatecontext.annotatealllines.<locals>.<listcomp>.  s3   ø€ ÐIÐIÐI©T¨Q°¸aÀ5ºj¸j�6—>’> !Ñ$Ô$ aÐ(¸j¸j¸jr   )r�   r   r¹   r2   rµ   r†   r   Úcopyfromr·   rš   rŒ   ÚreversedrÀ   rÁ   Ú_doappendrevÚgetalllinesrŸ   r    Ú_addpathtoresultÚ_resolvelines)ri   rJ   rÆ   rÇ   rÉ   ÚchainÚar#   r+   r   Úbr=   Úlinesrà   rr   ÚlinecontentsrÐ   r   s                   @@r   Úannotatealllinesz!_annotatecontext.annotatealllines   s  øø€ ð ×#Ò# C°DÀDÐ#ÑIÔIˆð ˜$œ+Ð%Ñ%Ø�IˆEØˆAð$Ø˜"”I�Ø×%Ò% aÑ(Ô(�Øð ØØ�a”5˜DœKÐ'Ð'Ø˜1œŸ
š
™œ�AØØ—’˜R œUÑ#Ô#Ð#ð$õ !Ô(Ñ*Ô*ˆGØ×Ò˜Tœ\Ñ*Ô*Ð*Ø×Ò˜Wœ^Ñ,Ô,Ð,ÝÔ%Ñ'Ô'ˆFØ�OŠO˜DœKÑ(Ô(Ð(å˜e‘_”_ð ð �Ø—F’F‘H”H�Ý˜d×.Ò.¨q°!Ñ4Ô4Ñ5Ô5�Ø×!Ò! '¨6°1°fÑ=Ô=Ð=Ø��ð	ð ”lˆGØ”[ˆFà×#Ò#Ñ%Ô%ˆØ�lŠl‰nŒnˆØ—’˜sÑ#Ô#ˆØIÐIÐIÐIÐI°UÐIÑIÔIˆð ð 	;Ø×*Ò*¨6°6Ñ:Ô:ˆFØð 	,Ø×-Ò-¨f°f¸gÑFÔFˆLØ˜lÐ+ˆFØˆr   c                 óä  ‡— ˆfd„|D ¦   «         }dgt          |¦  «        z  }t          j        t          ¦  «        }t	          t          |¦  «        ¦  «        D ]1}|||         ||         d         f                              |¦  «         Œ2|�rcd}	 |                     ¦   «         D ]?\  \  }	}
}‰                     |	¦  «        t          j	        z  rŒ+||d                  d         } n# t          $ r |cY S w xY w|€÷i }|                     ¦   «         D ]Ã\  \  }	}}|	|vr¡||d                  d         }| j        j        r-| j                             dt          |¦  «        ||fz  ¦  «         |                      |‰                     |	¦  «        ¦  «        }t#          j        |                     ¦   «         ¦  «        }|||	<   |D ]}||	         |         ||<   ŒŒÄt)          d„ |D ¦   «         ¦  «        sJ ‚|S | j                             dt          |¦  «        z  ¦  «         |                     |	¦  «         |                      |‰                     |	¦  «        ¦  «        }|j        }t#          j        |                     ¦   «         ¦  «        }t          |¦  «        t          |¦  «        k    rt/          j        d¦  «        ‚t3          |¦  «        D ]$\  }}||         }||v r||         D ]}|||<   Œ||= Œ%|�°c|S )	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.
        c                 óF   •— g | ]}‰                      |d          ¦  «        ‘ŒS )r   )r    )r!   r®   r   s     €r   r$   z2_annotatecontext._resolvelines.<locals>.<listcomp>@  s)   ø€ Ð=Ð=Ð=¨�—’˜q œtÑ$Ô$Ð=Ð=Ð=r   Nr   r   s6   fastannotate: reading %s line #%d to resolve lines %r
c              3   ó   K  — | ]}|d uV — Œ	d S r   r   )r!   rÜ   s     r   rZ   z1_annotatecontext._resolvelines.<locals>.<genexpr>c  s&   è è € Ð9Ð9¨Q˜1 D˜=Ð9Ð9Ð9Ð9Ð9Ð9r   s+   fastannotate: annotate %s to resolve lines
s   unexpected annotated lines)r½   ÚcollectionsÚdefaultdictrÀ   r5   rµ   rg   Úrev2flagrŒ   ÚsidebranchflagÚStopIterationr}   r°   r±   r	   r�   Úrev2pathr   Úsplitnewlinesr2   Úallr·   r¸   ÚfaerrorÚCorruptedFileErrorr¿   )ri   r¸   r   r   Úrevsrr   Úkey2idxsr0   rà   rJ   Ú_linenumÚidxsÚrevlinesÚlinenumr1   rí   ÚidxÚ	annotatedÚlinerX   s     `                 r   ré   z_annotatecontext._resolvelines8  sK  ø€ ð >Ð=Ð=Ð=¨nÐ=Ñ=Ô=ˆØ��#˜nÑ-Ô-Ñ-ˆåÔ*­4Ñ0Ô0ˆÝ•s˜6‘{”{Ñ#Ô#ð 	@ð 	@ˆAØ�d˜1”g˜~¨aÔ0°Ô3Ð4Ô5×<Ò<¸QÑ?Ô?Ð?Ð?Øñ 0	$àˆCðØ-5¯^ª^Ñ-=Ô-=ð ð Ñ)‘O�S˜( TØ—’ sÑ+Ô+­iÔ.FÑFð !Ø Ø(¨¨a¬Ô1°!Ô4�CØøøÝ ð ð ð Ø���ðøøøàˆ{ð �Ø,4¯NªNÑ,<Ô,<ð =ð =Ñ(‘N�S˜' DØ (Ð*Ð*Ø,¨T°!¬WÔ5°aÔ8˜Øœ7Ô,ð Ø œGŸMšMð!9å#(¨¡:¤:¨w¸Ð"=ñ!>ñô ð ð
  $×0Ò0°°f·o²oÀcÑ6JÔ6JÑKÔK˜Ý %Ô 3°D·I²I±K´KÑ @Ô @˜Ø(-˜ ™Ø#ð =ð =˜Ø&.¨s¤m°GÔ&<˜˜s™˜ð=åÐ9Ð9°&Ð9Ñ9Ô9Ñ9Ô9Ð9Ð9Ð9Ø�ð ŒG�MŠMØ?Å%ÈÁ*Ä*ÑLñô ð ð ×Ò˜SÑ!Ô!Ð!Ø×$Ò$ S¨&¯/ª/¸#Ñ*>Ô*>Ñ?Ô?ˆDØÔ.ˆIÝÔ'¨¯	ª	©¬Ñ4Ô4ˆEÝ�5‰zŒz�S ™^œ^Ò+Ð+ÝÔ0Ð1NÑOÔOÐOå$ UÑ+Ô+ð $ð $‘��4Ø˜a”L�Ø˜�=�=Ø'¨œ{ð +ð +˜Ø&*˜˜s™˜Ø  ˜øða ñ 0	$ðb ˆs   ÂAC% Ã%C4Ã3C4c                 ó  ‡ — t          |t          ¦  «        r|}n|                     ¦   «         }‰ j                             |¦  «        }|s$t          j        dt          |¦  «        z  ¦  «        ‚‰ j                             |¦  «        t          j
        z  dk    r$t          j        dt          |¦  «        z  ¦  «        ‚‰ j                             |¦  «         ˆ fd„‰ j        j        D ¦   «         }‰                      ||||¦  «        S )a  like 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 revmapr   s   %s is not in revmap mainbranchc                 óN   •— g | ]!\  }}‰j                              |¦  «        |f‘Œ"S r   )r   r™   )r!   rã   r®   ri   s      €r   r$   z5_annotatecontext.annotatedirectly.<locals>.<listcomp>‹  s?   ø€ ð 
ð 
ð 
Ù,0¨A¨qˆTŒ[× Ò  Ñ#Ô# QÐ'ð
ð 
ð 
r   )rG   rÞ   rŸ   r   r    rû   rü   r   rõ   rŒ   rö   r   r·   r¸   rÅ   )ri   r#   rÆ   rÇ   rà   rÐ   rr   s   `      r   r³   z!_annotatecontext.annotatedirectlyy  s  ø€ õ �a�ÑÔð 	ØˆCˆCà—&’&‘(”(ˆCØ”×#Ò# CÑ(Ô(ˆØð 	PÝÔ,Ð-CÅcÈ#ÁhÄhÑ-NÑOÔOÐOØŒK× Ò  Ñ'Ô'­)Ô*BÑBÀqÒHÐHÝÔ,Ø1µC¸±H´HÑ<ñô ð ð 	Œ×Ò˜eÑ$Ô$Ð$ð
ð 
ð 
ð 
Ø48´LÔ4Oð
ñ 
ô 
ˆð ×)Ò)¨&°!°X¸yÑIÔIÐIr   c                 ó²  — |r|                       |¦  «        }|r½t          |t          ¦  «        rI| j                             |¦  «        }|                      || j                             |¦  «        ¦  «        }n|}t          j        | 	                    ¦   «         ¦  «        }t          |¦  «        t          |¦  «        k    rt          j        ¦   «         ‚||f}|S )znadd the missing path or line contents, they can be expensive.
        f could be either node or fctx.
        )rè   rG   rÞ   r   r    r�   rø   r   rù   r2   r½   rû   rü   )ri   rr   r#   rÆ   rÇ   rÐ   r1   rí   s           r   rÅ   z&_annotatecontext._refineannotateresult�  sÆ   € ð ð 	3Ø×*Ò*¨6Ñ2Ô2ˆFØð 		%Ý˜!�UÑ#Ô#ð Øœ×+Ò+¨AÑ.Ô.�Ø×(Ò(¨¨D¬K×,@Ò,@ÀÑ,GÔ,GÑHÔH��à�ÝÔ'¨¯	ª	©¬Ñ4Ô4ˆEÝ�5‰zŒz�S ™[œ[Ò(Ð(ÝÔ0Ñ2Ô2Ð2Ø˜e�_ˆFØˆr   c                 óL   — |                       | j        | j        |||¦  «         d S r   )ræ   r   r   )ri   r1   r=   r×   s       r   rÃ   z_annotatecontext._appendrev¢  s(   € Ø×Ò˜$œ,¨¬°T¸6À:ÑNÔNÐNÐNÐNr   c                 óB   — t          j        ||| j        j        ¦  «        S r   )r   Ú	allblocksrj   rY   )ri   rë   rì   s      r   rÁ   z_annotatecontext._diffblocks¥  s   € ÝŒ˜q ! T¤YÔ%7Ñ8Ô8Ð8r   c                 ó@  ‡‡— ˆfd„}g }i Š|�*|D ]'\  \  }}}	}
}|dk    r|d„ ||	|
…         D ¦   «         z  }Œ(t          |¦  «        }||v r|                     |¦  «         |D ]} ||¦  «        ‰|<   Œ‰                     |                     ¦   «         |                     ¦   «         ¬¦  «        }|‰|<   t          |¦  «        D ][\  \  }}}	}
}|dk    rŒ|€|                      ||||	|
¦  «         Œ-ˆfd„||	|
…         D ¦   «         }|                      ||||¦  «         Œ\dS )z'append a revision to linelog and revmapc                 ó  •— t          | t          ¦  «        rt          j        d¦  «        ‚|                      ¦   «         }‰                     |¦  «        }|€*‰                     |d|                      ¦   «         ¬¦  «        }|S )z(fctx) -> ints   f should not be an intNT)Ú
sidebranchr   )rG   rH   r
   ÚProgrammingErrorrŸ   r    rµ   r   )r#   rà   rJ   r   s      €r   Úgetllrevz/_annotatecontext._doappendrev.<locals>.getllrev¬  sq   ø€ õ ˜!�SÑ!Ô!ð HÝÔ,Ð-FÑGÔGÐGà—&’&‘(”(ˆCØ—.’. Ñ%Ô%ˆCØˆ{Ø—m’m C°D¸q¿vºv¹x¼x�mÑHÔH�ØˆJr   Nr:   c                 óB   — g | ]\  }}t          |t          ¦  «        °|‘ŒS r   ©rG   rH   )r!   r#   r®   s      r   r$   z1_annotatecontext._doappendrev.<locals>.<listcomp>¿  s<   € ð !ð !ð !á ˜A˜qÝ)¨!­SÑ1Ô1ð!Øð!ð !ð !r   r    c                 óX   •— g | ]&\  }}t          |t          ¦  «        r|n‰|         |f‘Œ'S r   r  )r!   rã   r®   Ú
siderevmaps      €r   r$   z1_annotatecontext._doappendrev.<locals>.<listcomp>Ô  sI   ø€ ð ð ð á˜˜1õ & a­Ñ-Ô-Ð@�a�a°:¸a´=À1ÐEðð ð r   )rº   Úremoverµ   rŸ   r   rå   ÚreplacelinesÚreplacelines_vec)r   r   r1   r=   r×   r  Úsiderevsr>   r?   r@   rA   Úopr#   rÐ   Úblinesr  s    `             @r   ræ   z_annotatecontext._doappendrev¨  s¶  øø€ ð
	ð 
	ð 
	ð 
	ð 
	ð ˆØˆ
ØÐ!Ø(.ð ð Ñ$Ñ ��R˜˜R "Ø˜’:�:àð !ð !à$.¨r°"¨uÔ$5ð!ñ !ô !ñ �Høõ
 �x‘=”=ˆØ�8ÐÐØ�OŠO˜DÑ!Ô!Ð!Øð 	(ð 	(ˆAØ$˜H Q™KœKˆJ�q‰MˆMð —’˜dŸiši™kœk°·	²	±´�Ñ<Ô<ˆØ ˆ
�4Ñå$,¨VÑ$4Ô$4ð 
	@ð 
	@Ñ ÑˆR��R˜˜bØ�TŠzˆzØØÐ!Ø×$Ò$ U¨B°°B¸Ñ;Ô;Ð;Ð;ðð ð ð à *¨2¨b¨5Ô 1ðñ ô �ð ×(Ò(¨°°B¸Ñ?Ô?Ð?Ð?ð
	@ð 
	@r   c                 óB   ‡ ‡‡— ‰€‰ j         Šˆˆ fd„Šˆfd„|D ¦   «         S )z6(revmap, [(node, linenum)]) -> [(node, linenum, path)]Nc                 ó¤   •— ‰j                              | ¦  «        }|€2‰                     ‰                     | ¦  «        ¦  «        }|‰j         | <   |S r   )r‚   rh   rø   r    )Únodeidr   r   ri   s     €€r   Ú_getpathz3_annotatecontext._addpathtoresult.<locals>._getpathß  sK   ø€ Ø”?×&Ò& vÑ.Ô.ˆDØˆ|Ø—’ v§~¢~°fÑ'=Ô'=Ñ>Ô>�Ø*.�” Ñ'ØˆKr   c                 ó2   •— g | ]\  }}|| ‰|¦  «        f‘ŒS r   r   )r!   Únr®   r  s      €r   r$   z5_annotatecontext._addpathtoresult.<locals>.<listcomp>æ  s,   ø€ Ð?Ð?Ð?©¨¨1��A�x�x ‘{”{Ð#Ð?Ð?Ð?r   )r   )ri   r¸   r   r  s   ` `@r   rè   z!_annotatecontext._addpathtoresultÚ  sL   øøø€ àˆ>Ø”[ˆFð	ð 	ð 	ð 	ð 	ð 	ð @Ð?Ð?Ð?°Ð?Ñ?Ô?Ð?r   c                 óØ   — |€d}nA| j                              |                     ¦   «         ¦  «        }|st          j        ¦   «         ‚| j        j        |k    rt          j        ¦   «         ‚dS )z:check if fctx is the master's head last time, raise if notNr   )r   r    rŸ   rû   ÚCannotReuseErrorr   rš   )ri   r1   rÐ   s      r   r¼   z%_annotatecontext._checklastmasterheadè  si   € àˆ<ØˆEˆEà”K×'Ò'¨¯	ª	©¬Ñ4Ô4ˆEØð 1ÝÔ.Ñ0Ô0Ð0ØŒ<Ô %Ò'Ð'ÝÔ*Ñ,Ô,Ð,ð (Ð'r   c                 óF   ‡‡— | j         j        Š| j         j        Šˆˆfd„}|S )z-> (fctx) -> [fctx]c                 óB   •— t          | ‰¬¦  «        }‰s
|d d…         }|S )N)r*   r   )r,   )r#   r+   rp   ro   s     €€r   r'   z-_annotatecontext._parentfunc.<locals>.parentsù  s/   ø€ Ý˜! LÐ1Ñ1Ô1ˆBØð Ø˜˜˜”V�ØˆIr   )rj   ro   rp   )ri   r'   rp   ro   s     @@r   r¹   z_annotatecontext._parentfuncó  s?   øø€ ð ”yÔ-ˆØ”iÔ+ˆð	ð 	ð 	ð 	ð 	ð 	ð ˆr   c                 ó8   — | j                              dd¦  «        S )Nó   fastannotates   perfhack)r}   Ú
configboolr�   s    r   rß   z_annotatecontext._perfhack  s   € àŒw×!Ò! /°;Ñ?Ô?Ð?r   c                 ó8   — t          | j        ||p| j        fi |¤ŽS r   )rR   r   r   )ri   rJ   r   Úkwdss       r   r�   z_annotatecontext._resolvefctx  s%   € Ý˜4œ9 c¨DÐ,=°D´IÐGÐGÀ$ÐGÐGÐGr   ©T)NFF)FFr   )ru   rv   rw   rx   rl   Úpropertyr   r   r’   Ú__del__r–   r›   r¥   r·   r¯   rï   ré   r³   rÅ   rÃ   rÁ   Ústaticmethodræ   rè   r¼   r   ry   r¹   rß   r�   r   r   r   r{   r{   Ç   sø  € € € € € ðð ð	ð 	ð 	ð ð
ð 
ñ „Xð
ð ðð ñ „Xðð
!ð !ð !ð €Gð:ð :ð :ð ð=ð =ñ „Xð=ð!ð !ð !ð !ðF@Pð @Pð @Pð @PðDð ð ð.6ð 6ð 6ð 6ðp?ð ?ð ?ðBJð Jð Jð.ð ð ð$Oð Oð Oð Oð9ð 9ð 9ð ð/@ð /@ð /@ñ „\ð/@ðb@ð @ð @ð @ð	-ð 	-ð 	-ð 
Ôðð ñ Ôðð 
Ôð@ð @ñ Ôð@ðHð Hð Hð Hð Hð Hr   r{   c                 óZ   — | D ]'}	 t          j        |¦  «         Œ# t          $ r Y Œ$w xY wdS )zsilent, best-effort unlinkN)r   ÚunlinkÚOSError)Úpathsr   s     r   r•   r•   	  sS   € àð ð ˆð	ÝŒK˜ÑÔÐÐøÝð 	ð 	ð 	ØˆDð	øøøðð s   †›
(§(c                   ód   — e Zd ZdZefd„Zed„ ¦   «         Zed„ ¦   «         Zd„ Z	ed„ ¦   «         Z
dS )Ú
pathhelperz9helper for getting paths for lockfile, linelog and revmapc                 ó„   — t           j                             d|j        t	          |¦  «        ¦  «        | _        || _        d S )Nr&  )r„   r   Újoinrt   rU   Ú_vfspathr)   )ri   r   r   rj   s       r   rl   zpathhelper.__init__  s5   € åœŸšØ˜Tœ]­I°d©O¬Oñ
ô 
ˆŒð ˆŒ
ˆ
ˆ
r   c                 ó„   — t           j                             | j        j                             | j        ¦  «        ¦  «        S r   )r„   r   Údirnamer)   Úvfsr5  r6  r�   s    r   r8  zpathhelper.dirname  s*   € åŒw�Š˜tœzœ~×2Ò2°4´=ÑAÔAÑBÔBÐBr   c                 óP   — | j         j                             | j        dz   ¦  «        S )Ns   .l©r)   r9  r5  r6  r�   s    r   r~   zpathhelper.linelogpath   ó!   € àŒzŒ~×"Ò" 4¤=°5Ñ#8Ñ9Ô9Ð9r   c                 óP   — t          j        | j        j        | j        dz   ¦  «        S )Ns   .lock)Úlockmodr   r)   r9  r6  r�   s    r   r   zpathhelper.lock$  s   € ÝŒ|˜DœJœN¨D¬M¸HÑ,DÑEÔEÐEr   c                 óP   — | j         j                             | j        dz   ¦  «        S )Ns   .mr;  r�   s    r   r   zpathhelper.revmappath'  r<  r   N)ru   rv   rw   rx   Údefaultoptsrl   r+  r8  r~   r   r   r   r   r   r3  r3    s—   € € € € € ØCÐCà(3ð ð ð ð ð ðCð Cñ „XðCð ð:ð :ñ „Xð:ðFð Fð Fð ð:ð :ñ „Xð:ð :ð :r   r3  c              #   ó   K  — t          | ||¦  «        }t          j        |j        ¦  «         |j        }|j        }d}	 |                     ¦   «         5  t          | ||||¦  «        }|r|                     ¦   «          |V — ddd¦  «         n# 1 swxY w Y   nB# t          $ r5 |�|                     ¦   «          | j
                             d|z  ¦  «         ‚ w xY w|�|                     ¦   «          dS dS # |�|                     ¦   «          w w xY 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
)r3  r   Úmakedirsr8  r   r~   r   r{   r–   Ú	Exceptionr}   r±   r’   )r   r   rj   r–   Úhelperr   r~   Úactxs           r   ÚannotatecontextrF  ,  sg  è è € õ  ˜˜d DÑ)Ô)€FÝ„M�&”.Ñ!Ô!Ð!ØÔ"€JØÔ$€KØ€DðØ�[Š[‰]Œ]ð 	ð 	Ý# D¨$°¸ZÈÑNÔNˆDØð Ø—’‘”�ØˆJˆJˆJð		ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	øøõ
 ð ð ð ØÐØ�LŠL‰NŒNˆNØŒ�ŠÐEÈÑLÑMÔMÐMØð	øøøð ÐØ�JŠJ‰LŒLˆLˆLˆLð Ðøˆ4ÐØ�JŠJ‰LŒLˆLˆLð øøøsA   ¾B Á.BÂ B ÂBÂB ÂBÂB ÂC4 Â?CÃC4 Ã4Dc                 ó    — | j         }| j        }|j                             ddd¦  «        rd}t	          ||¬¦  «        }t          ||||¦  «        S )zdlike annotatecontext but get the context from a fctx. convenient when
    used in fctx.annotate
    r&  s   forcefollowT)rY   ro   )r)   Ú_pathr}   r'  rd   rF  )r1   r*   rY   r–   r   r   Úaoptss          r   ÚfctxannotatecontextrJ  Q  sY   € ð Œ:€DØŒ:€DØ„w×Ò˜/¨>¸4Ñ@Ô@ð ØˆÝ (¸Ð@Ñ@Ô@€EÝ˜4  u¨gÑ6Ô6Ð6r   r*  )FN)TNF)1ró   Ú
contextlibr„   Úmercurial.i18nr   Úmercurial.pycompatr   r   r   Úmercurial.noder   r   r	   Ú	mercurialr
   r   r†   r   r>  r   r   r   r   Úmercurial.utilsr   r   Ú rû   r   rŒ   Úlrucachefuncr   r,   r8   rC   Ú	revsinglerI   rR   rU   rb   r@  rq   rd   r{   r•   r3  ÚcontextmanagerrF  rJ  r   r   r   ú<module>rU     sæ  ðð Ð Ð Ð Ø Ð Ð Ð Ø 	€	€	€	à Ð Ð Ð Ð Ð ðð ð ð ð ð ð ð ð ð ð
ð ð ð ð ð ð ð ð ð ð
ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ðð ð ð ð ð ð ð ð
ð ð ð ð ð ð ð ð Ôðð ñ Ôðð
ð ð ð ð.9ð 9ð 9ðð ð ð ˆTÔ˜wÔ0Ñ1Ô1€
ð)ð )ð )ð )ðZð ð ð7ð 7ð 7ð #�l 5Ô#4Ñ5Ô5Ð ð$ð $ð $ð $ð $ñ $ô $ð $ðD ˆl‰nŒn€ðHð Hð Hð Hð Hñ Hô Hð HðDð ð ð:ð :ð :ð :ð :ñ :ô :ð :ð4 ÔØ%0¸%ð !ð !ð !ñ Ôð!ðH	7ð 	7ð 	7ð 	7ð 	7ð 	7r   