§
    ŒÜg
Ý  ã                   ó¶  — d dl Z d dlZd dlZd dlZd dlZddlmZ ddlmZ d dl	m
Z
 ddlmZmZmZ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 ej         d
¦  «        Z!e!duZ"ej#        Z#ej$        Z$ej%        Z&ej'        Z' G d„ de$¦  «        Z( G d„ de$¦  «        Z)d„ Z*d„ Z+ ej,        ej-        ¦  «         G d„ d
¦  «        ¦   «         ZdS )é    Né   )Ú_)Údelattr)Útracing)
ÚdirstatemapÚencodingÚerrorÚmatchÚnodeÚpathutilÚpolicyÚpycompatÚscmutilÚutil)ÚdocketÚ	timestamp)Údirstater   Úparsersr   c                   ó   — e Zd ZdZd„ ZdS )Ú	repocachezfilecache for files in .hg/c                 ó6   — |j                              |¦  «        S ©N)Ú_openerÚjoin©ÚselfÚobjÚfnames      ú4/usr/lib/python3/dist-packages/mercurial/dirstate.pyr   zrepocache.join:   s   € ØŒ{×Ò Ñ&Ô&Ð&ó    N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   © r    r   r   r   7   s)   € € € € € Ø%Ð%ð'ð 'ð 'ð 'ð 'r    r   c                   ó   — e Zd ZdZd„ ZdS )Ú	rootcachez*filecache for files in the repository rootc                 ó,   — |                      |¦  «        S r   )Ú_joinr   s      r   r   zrootcache.joinA   s   € Ø�yŠy˜ÑÔÐr    Nr!   r&   r    r   r(   r(   >   s)   € € € € € Ø4Ð4ð ð  ð  ð  ð  r    r(   c                 ó   ‡ — ˆ fd„}|S )Nc                 ó„   •— |                       ¦   «         s d}|‰j        z  }t          j        |¦  «        ‚ ‰| g|¢R i |¤ŽS )Nz.calling `%s` outside of a parentchange context©Úpendingparentchanger"   r	   ÚProgrammingError©r   ÚargsÚkwargsÚmsgÚfuncs       €r   Úwrapz%requires_parents_change.<locals>.wrapF   sY   ø€ Ø×'Ò'Ñ)Ô)ð 	.ØBˆCØ�4”=Ñ ˆCÝÔ(¨Ñ-Ô-Ð-Øˆt�DÐ*˜4Ð*Ð*Ð* 6Ð*Ð*Ð*r    r&   ©r4   r5   s   ` r   Úrequires_parents_changer7   E   ó#   ø€ ð+ð +ð +ð +ð +ð €Kr    c                 ó   ‡ — ˆ fd„}|S )Nc                 ó„   •— |                       ¦   «         r d}|‰j        z  }t          j        |¦  «        ‚ ‰| g|¢R i |¤ŽS )Nz-calling `%s` inside of a parentchange contextr-   r0   s       €r   r5   z(requires_no_parents_change.<locals>.wrapQ   sY   ø€ Ø×#Ò#Ñ%Ô%ð 	.ØAˆCØ�4”=Ñ ˆCÝÔ(¨Ñ-Ô-Ð-Øˆt�DÐ*˜4Ð*Ð*Ð* 6Ð*Ð*Ð*r    r&   r6   s   ` r   Úrequires_no_parents_changer;   P   r8   r    c                   ó   — e Zd Z	 dLd„Zd„ Zej        d„ ¦   «         Zd„ Ze	d„ ¦   «         Z
ed„ ¦   «         Z ed¦  «        d	„ ¦   «         Zed
„ ¦   «         Zd„ Z ed¦  «        d„ ¦   «         Ze	d„ ¦   «         Ze	d„ ¦   «         Ze	d„ ¦   «         Ze	d„ ¦   «         Zd„ Zd„ Ze	d„ ¦   «         Zd„ ZdMd„Zd„ Zd„ Zd„ Zd„ ZeZ d„ Z!d„ Z"d„ Z#ed„ ¦   «         Z$d „ Z%dMd!„Z&d"„ Z'd#„ Z(d$„ Z)d%„ Z*d&„ Z+e,dLd'„¦   «         Z-e,d(„ ¦   «         Z.e,d)„ ¦   «         Z/e,d*„ ¦   «         Z0e1d+„ ¦   «         Z2e1	 	 	 dNd,„¦   «         Z3d-„ Z4d.„ Z5d/„ Z6dOd0„Z7dOd1„Z8dPd2„Z9d3„ Z:dMd4„Z;d5„ Z<d6„ Z=d7„ Z>d8„ Z?d9„ Z@d:„ ZAd;„ ZBd<„ ZCd=„ ZDd>„ ZEdQd@„ZFdA„ ZGdB„ ZHdC„ ZIdD„ ZJdE„ ZKdF„ ZLdG„ ZMdH„ ZNdI„ ZOdJ„ ZPdK„ ZQdS )Rr   Fc	                 óf  — || _         || _        || _        || _        || _        || _        || _        t          j        |¦  «        | _	        d| _
        d| _        || _        i | _        d| _        d| _        d| _        d| j        z  | _        i | _        d| _        t(          j        | _        | j         dS )zÈCreate a new dirstate object.

        opener is an open()-like callable that can be used to open the
        dirstate file; root is the root of the directory tracked by
        the dirstate.
        Fr   s   dirstates   dirstate-tracked-hints
   %s.pendingN)Ú_use_dirstate_v2Ú_use_tracked_hintÚ_nodeconstantsr   Ú	_validateÚ_rootÚ_sparsematchfnr   ÚnormasprefixÚ_rootdirÚ_dirtyÚ_dirty_tracked_setÚ_uiÚ
_filecacheÚ_parentwritersÚ	_filenameÚ_filename_thÚ_pendingfilenameÚ_plchangecallbacksÚ_origplr   Ú_mapclsÚ_cwd)	r   ÚopenerÚuiÚrootÚvalidateÚsparsematchfnÚnodeconstantsÚuse_dirstate_v2Úuse_tracked_hints	            r   Ú__init__zdirstate.__init__]   s¶   € ð" !0ˆÔØ!1ˆÔØ+ˆÔØˆŒØ!ˆŒØˆŒ
à+ˆÔõ !Ô-¨dÑ3Ô3ˆŒàˆŒà"'ˆÔØˆŒØˆŒØˆÔØ$ˆŒØ4ˆÔØ -°´Ñ >ˆÔØ"$ˆÔØˆŒÝ"Ô.ˆŒð 	Œ	ˆ	ˆ	ˆ	r    c                 ó   — | j          dS )zRmake sure the parents are loaded

        Used to avoid a race condition.
        N©Ú_pl©r   s    r   Úprefetch_parentszdirstate.prefetch_parents‹   s   € ð
 	Œˆˆˆr    c              #   óR   K  — | xj         dz  c_         dV — | xj         dz  c_         dS )zÍContext manager for handling dirstate parents.

        If an exception occurs in the scope of the context manager,
        the incoherent dirstate won't be written when wlock is
        released.
        r   N©rJ   r^   s    r   Úparentchangezdirstate.parentchange’   sA   è è € ð 	ÐÔ˜qÑ ÐÔØˆˆˆð 	ÐÔ˜qÑ ÐÔÐÐr    c                 ó   — | j         dk    S )zsReturns true if the dirstate is in the middle of a set of changes
        that modify the dirstate parent.
        r   ra   r^   s    r   r.   zdirstate.pendingparentchange£   s   € ð Ô" QÒ&Ð&r    c                 ó~   — |                       | j        | j        | j        | j        | j        ¦  «        | _        | j        S )zAReturn the dirstate contents (see documentation for dirstatemap).)rP   rH   r   rB   r@   r>   Ú_mapr^   s    r   re   zdirstate._map©   s>   € ð —L’LØŒHØŒLØŒJØÔØÔ!ñ
ô 
ˆŒ	ð ŒyÐr    c                 ó<   — | j         €dS |                       ¦   «         S )a!  The matcher for the sparse checkout.

        The working directory may not include every file from a manifest. The
        matcher obtained by this property will match a path if it is to be
        included in the working directory.

        When sparse if disabled, return None.
        N)rC   r^   s    r   Ú_sparsematcherzdirstate._sparsematcherµ   s&   € ð ÔÐ&Ø�4ð ×"Ò"Ñ$Ô$Ð$r    ó   branchc                 ó‚   — 	 | j                              d¦  «                             ¦   «         pdS # t          $ r Y dS w xY w)Nrh   s   default)r   ÚreadÚstripÚFileNotFoundErrorr^   s    r   Ú_branchzdirstate._branchÆ   sP   € ð	Ø”<×$Ò$ YÑ/Ô/×5Ò5Ñ7Ô7ÐE¸:ÐEøÝ ð 	ð 	ð 	Ø�:�:ð	øøøs   ‚-0 °
>½>c                 ó4   — | j                              ¦   «         S r   )re   Úparentsr^   s    r   r]   zdirstate._plÍ   s   € àŒy× Ò Ñ"Ô"Ð"r    c                 ó6   — | j                              |¦  «        S r   )re   Úhastrackeddir)r   Úds     r   Úhasdirzdirstate.hasdirÑ   s   € ØŒy×&Ò& qÑ)Ô)Ð)r    ó	   .hgignorec                 ó¼   — |                       ¦   «         }|st          j        ¦   «         S d„ |D ¦   «         }t          j        | j        dg || j        j        ¬¦  «        S )Nc                 ó   — g | ]}d |z  ‘ŒS )s
   include:%sr&   ©Ú.0Úfs     r   ú
<listcomp>z$dirstate._ignore.<locals>.<listcomp>Ú   s   € Ð1Ð1Ð1 a� Ñ!Ð1Ð1Ð1r    r    ©Úwarn)Ú_ignorefilesÚmatchmodÚneverr
   rB   rH   r|   )r   ÚfilesÚpatss      r   Ú_ignorezdirstate._ignoreÔ   s]   € à×!Ò!Ñ#Ô#ˆØð 	$Ý”>Ñ#Ô#Ð#à1Ð1¨5Ð1Ñ1Ô1ˆÝŒ~˜dœj¨#¨r°4¸d¼h¼mÐLÑLÔLÐLr    c                 óX   — | j                              dd¦  «        ot          j        dk    S )Nó   uis   slashó   /)rH   Ú
configboolr   Úossepr^   s    r   Ú_slashzdirstate._slashÝ   s&   € àŒx×"Ò" 5¨(Ñ3Ô3ÐN½¼È$Ò8NÐNr    c                 ó4   — t          j        | j        ¦  «        S r   )r   Ú	checklinkrB   r^   s    r   Ú
_checklinkzdirstate._checklinká   s   € åŒ~˜dœjÑ)Ô)Ð)r    c                 óN   — t          t          j        | j        ¦  «        ¦  «        S r   )Úboolr   Ú	checkexecrB   r^   s    r   Ú
_checkexeczdirstate._checkexecå   s   € å•D”N 4¤:Ñ.Ô.Ñ/Ô/Ð/r    c                 óR   — t          j        |                      d¦  «        ¦  «         S )Nó   .hg)r   Úfscasesensitiver*   r^   s    r   Ú
_checkcasezdirstate._checkcaseé   s"   € åÔ'¨¯
ª
°6Ñ(:Ô(:Ñ;Ô;Ð;Ð;r    c                 ó   — | j         |z   S r   )rE   )r   ry   s     r   r*   zdirstate._joiní   s   € ð Œ}˜qÑ Ð r    c                 ó   ‡ ‡‡— g Šˆˆˆ fd„}|S )aS  build a callable that returns flags associated with a filename

        The information is extracted from three possible layers:
        1. the file system if it supports the information
        2. the "fallback" information stored in the dirstate if any
        3. a more expensive mechanism inferring the flags from the parents.
        c                 ót  •— d }d }	 t          j        ‰                     | ¦  «        ¦  «        }n# t          $ r Y dS w xY w‰j        rt          j        |¦  «        rdS n\‰                     | ¦  «        }|j        r
|j	        rdS n6‰s‰ 
                     ‰¦   «         ¦  «          ‰d         | ¦  «        }d|v rdS ‰j        rt          j        |¦  «        rdS n`|€‰                     | ¦  «        }|j        r
|j        rdS n8|€0‰s‰ 
                     ‰¦   «         ¦  «          ‰d         | ¦  «        }d|v rdS dS )Nr    ó   lr   ó   x)ÚosÚlstatr*   ÚOSErrorr‹   r   Ú
statislinkÚ	get_entryÚhas_fallback_symlinkÚfallback_symlinkÚappendr�   Ú
statisexecÚhas_fallback_execÚfallback_exec)ÚxÚentryÚfallback_valueÚstÚbuildfallbackÚfallback_funcr   s       €€€r   Ú	get_flagsz$dirstate.flagfunc.<locals>.get_flagsþ   s¤  ø€ ØˆEØ!ˆNðÝ”X˜dŸjšj¨™mœmÑ,Ô,��øÝð ð ð Ø�s�sðøøøð Œð $Ý”? 2Ñ&Ô&ð  Ø˜4ð ð Ÿš qÑ)Ô)�ØÔ-ð $ØÔ-ð $Ø#˜tð$ð )ð >Ø%×,Ò,¨]¨]©_¬_Ñ=Ô=Ð=Ø%5 ]°1Ô%5°aÑ%8Ô%8�NØ˜~Ð-Ð-Ø#˜tàŒð $Ý”? 2Ñ&Ô&ð  Ø˜4ð ð �=Ø ŸNšN¨1Ñ-Ô-�EØÔ*ð 	$ØÔ*ð $Ø#˜tð$ð &Ð-Ø,ð BØ)×0Ò0°°±´ÑAÔAÐAØ)9¨°qÔ)9¸!Ñ)<Ô)<˜Ø˜~Ð-Ð-Ø#˜tØ�3s   ‡'/ ¯
=¼=r&   )r   r¨   rª   r©   s   `` @r   Úflagfunczdirstate.flagfuncò   s8   øøø€ ð ˆð'	ð '	ð '	ð '	ð '	ð '	ð '	ðR Ðr    c                 óf   — | j                              dd¦  «        }|r|S t          j        ¦   «         S )Nr„   s   forcecwd)rH   Úconfigr   Úgetcwd)r   Úforcecwds     r   rQ   zdirstate._cwd)  s4   € ð ”8—?’? 5¨+Ñ6Ô6ˆØð 	ØˆOÝŒÑ Ô Ð r    c                 óÚ   — | j         }|| j        k    rdS | j        }t          j        |¦  «        s|t          j        z  }|                     |¦  «        r|t          |¦  «        d…         S |S )a  Return the path from which a canonical path is calculated.

        This path should be used to resolve file patterns or to convert
        canonical paths back to file paths for display. It shouldn't be
        used to get real file paths. Use vfs functions instead.
        r    N)rQ   rB   r   Úendswithsepr   r‡   Ú
startswithÚlen)r   ÚcwdÚrootseps      r   r®   zdirstate.getcwd1  ss   € ð ŒiˆØ�$”*ÒÐØ�3à”*ˆÝÔ Ñ(Ô(ð 	&Ø•x”~Ñ%ˆGØ�>Š>˜'Ñ"Ô"ð 	Ø•s˜7‘|”|�~�~Ô&Ð&ð ˆJr    Nc                 óž   — |€|                       ¦   «         }t          j        | j        ||¦  «        }| j        rt          j        |¦  «        S |S r   )r®   r   ÚpathtorB   rˆ   Úpconvert)r   ry   r´   Úpaths       r   r·   zdirstate.pathtoE  sH   € Øˆ;Ø—+’+‘-”-ˆCÝŒ{˜4œ: s¨AÑ.Ô.ˆØŒ;ð 	'Ý”= Ñ&Ô&Ð&Øˆr    c                 óZ   — | j                              |¦  «        }|€t          ¦   «         S |S )z-return a DirstateItem for the associated path)re   ÚgetÚDirstateItem)r   r¹   r¥   s      r   r�   zdirstate.get_entryM  s)   € à”	—’˜dÑ#Ô#ˆØˆ=Ý‘>”>Ð!Øˆr    c                 ó   — || j         v S r   )re   )r   Úkeys     r   Ú__contains__zdirstate.__contains__T  s   € Ø�d”iÐÐr    c                 óD   — t          t          | j        ¦  «        ¦  «        S r   )ÚiterÚsortedre   r^   s    r   Ú__iter__zdirstate.__iter__W  s   € Ý•F˜4œ9Ñ%Ô%Ñ&Ô&Ð&r    c                 ó4   — | j                              ¦   «         S r   )re   Úitemsr^   s    r   rÅ   zdirstate.itemsZ  s   € ØŒy�ŠÑ Ô Ð r    c                 ó*   ‡ — ˆ fd„‰ j         D ¦   «         S )Nc                 ó:   •— g | ]}‰                      |¦  «        ‘ŒS r&   )rA   )rx   Úpr   s     €r   rz   z$dirstate.parents.<locals>.<listcomp>`  s%   ø€ Ð4Ð4Ð4 a�—’˜qÑ!Ô!Ð4Ð4Ð4r    r\   r^   s   `r   ro   zdirstate.parents_  s   ø€ Ø4Ð4Ð4Ð4¨4¬8Ð4Ñ4Ô4Ð4r    c                 óB   — |                       | j        d         ¦  «        S )Nr   ©rA   r]   r^   s    r   Úp1zdirstate.p1b  ó   € Ø�~Š~˜dœh qœkÑ*Ô*Ð*r    c                 óB   — |                       | j        d         ¦  «        S )Nr   rÊ   r^   s    r   Úp2zdirstate.p2e  rÌ   r    c                 ó8   — | j         d         | j        j        k    S )zTrue if a merge is in progressr   )r]   r@   Únullidr^   s    r   Úin_mergezdirstate.in_mergeh  s   € ð Œx˜Œ{˜dÔ1Ô8Ò8Ð8r    c                 ó4   — t          j        | j        ¦  «        S r   )r   Útolocalrm   r^   s    r   Úbranchzdirstate.branchm  s   € ÝÔ ¤Ñ-Ô-Ð-r    c                 ó
  — |€| j         j        }| j        dk    rt          d¦  «        ‚d| _        | j        d         }| j        €| j        | _        | j         j        }||k    o||k    }| j                             |||¬¦  «        S )zñSet dirstate parents to p1 and p2.

        When moving from two parents to one, "merged" entries a
        adjusted to normal and previous copy records discarded and
        returned by the call.

        See localrepo.setparents()
        Nr   sK   cannot set dirstate parent outside of dirstate.parentchange context managerTr   )Úfold_p2)	r@   rÐ   rJ   Ú
ValueErrorrF   r]   rO   re   Ú
setparents)r   rË   rÎ   Úoldp2rÐ   rÖ   s         r   rØ   zdirstate.setparentsp  s˜   € ð ˆ:ØÔ$Ô+ˆBØÔ !Ò#Ð#Ýð9ñô ð ð
 ˆŒØ”˜”ˆØŒ<ÐØœ8ˆDŒLØÔ$Ô+ˆà˜6’/Ð2 b¨F¢lˆØŒy×#Ò# B¨°GÐ#Ñ<Ô<Ð<r    c                 ó~  — | j         j                             | t          j        |¦  «        ¦  «         |                      dddd¬¦  «        }	 |                     | j        dz   ¦  «         |                     ¦   «          | j        d         }|r| 	                    ¦   «          d S d S #  | 
                    ¦   «          ‚ xY w)Nrh   ó   wT©Ú
atomictempÚ
checkambigó   
s   _branch)Ú	__class__rm   Úsetr   Ú	fromlocalr   ÚwriteÚcloserI   ÚrefreshÚdiscard)r   rÔ   ry   Úces       r   Ú	setbranchzdirstate.setbranchŠ  s¶   € ØŒÔ×"Ò" 4­Ô);¸FÑ)CÔ)CÑDÔDÐDØ�LŠL˜ D°TÀdˆLÑKÔKˆð	Ø�GŠG�D”L 5Ñ(Ñ)Ô)Ð)Ø�GŠG‰IŒIˆIð ” Ô,ˆBØð Ø—
’
‘”���ðð øð	Ø�IŠI‰KŒKˆKØøøøs   ÁAB% Â%B<c                 óz   — dD ]}|| j         v rt          | |¦  «         Œd| _        d| _        d| _        d| _        dS )a  Causes the next access to reread the dirstate.

        This is different from localrepo.invalidatedirstate() because it always
        rereads the dirstate. Use localrepo.invalidatedirstate() if you want to
        check whether the dirstate has changed before rereading it.)re   rm   r‚   Fr   N)Ú__dict__r   rF   rG   rJ   rO   )r   Úas     r   Ú
invalidatezdirstate.invalidateš  sS   € ð 0ð 	!ð 	!ˆAØ�D”MÐ!Ð!Ý˜˜aÑ Ô Ð øØˆŒØ"'ˆÔØˆÔØˆŒˆˆr    c                 ó´   — ||k    rdS d| _         |�&|                      |¦  «         || j        j        |<   dS | j        j                             |d¦  «         dS )z=Mark dest as a copy of source. Unmark dest if source is None.NT)rF   Ú_check_sparsere   ÚcopymapÚpop)r   ÚsourceÚdests      r   Úcopyzdirstate.copy©  sg   € à�TŠ>ˆ>ØˆFØˆŒØÐØ×Ò˜vÑ&Ô&Ð&Ø&,ˆDŒIÔ˜dÑ#Ð#Ð#àŒIÔ×!Ò! $¨Ñ-Ô-Ð-Ð-Ð-r    c                 óB   — | j         j                             |d ¦  «        S r   )re   rï   r»   )r   Úfiles     r   Úcopiedzdirstate.copied´  s   € ØŒyÔ ×$Ò$ T¨4Ñ0Ô0Ð0r    c                 ó   — | j         j        S r   )re   rï   r^   s    r   Úcopieszdirstate.copies·  s   € ØŒyÔ Ð r    c                 ó  — d| _         | j                             |¦  «        }|�|j        s|                      |¦  «         | j                             |¦  «        }|r | j        j                             |d¦  «         |rd| _        |S )aU  a "public" method for generic code to mark a file as tracked

        This function is to be called outside of "update/merge" case. For
        example by a command like `hg add X`.

        if reset_copy is set, any existing copy information will be dropped.

        return True the file was previously untracked, False otherwise.
        TN)	rF   re   r»   ÚtrackedÚ_check_new_tracked_filenameÚset_trackedrï   rð   rG   )r   ÚfilenameÚ
reset_copyr¥   Úpre_trackeds        r   rü   zdirstate.set_trackedº  s‹   € ð ˆŒØ”	—’˜hÑ'Ô'ˆØˆ= ¤ˆ=Ø×,Ò,¨XÑ6Ô6Ð6Ø”i×+Ò+¨HÑ5Ô5ˆØð 	2ØŒIÔ×!Ò! (¨DÑ1Ô1Ð1Øð 	+Ø&*ˆDÔ#ØÐr    c                 óZ   — | j                              |¦  «        }|rd| _        d| _        |S )a
  a "public" method for generic code to mark a file as untracked

        This function is to be called outside of "update/merge" case. For
        example by a command like `hg remove X`.

        return True the file was previously tracked, False otherwise.
        T)re   Úset_untrackedrF   rG   )r   rý   Úrets      r   r  zdirstate.set_untrackedÐ  s5   € ð Œi×%Ò% hÑ/Ô/ˆØð 	+ØˆDŒKØ&*ˆDÔ#Øˆ
r    c                 ó¨   — d| _         | j        |         j        s|                      |¦  «         |\  }}}| j                             ||||¦  «         dS )zFrecord that the current state of the file on disk is known to be cleanTN)rF   re   rú   rû   Ú	set_clean)r   rý   ÚparentfiledataÚmodeÚsizeÚmtimes         r   r  zdirstate.set_cleanß  s_   € ð ˆŒØŒy˜Ô"Ô*ð 	7Ø×,Ò,¨XÑ6Ô6Ð6Ø,Ñˆˆt�UØŒ	×Ò˜H d¨D°%Ñ8Ô8Ð8Ð8Ð8r    c                 óH   — d| _         | j                             |¦  «         dS )z<record that the current state of the file on disk is unknownTN)rF   re   Úset_possibly_dirty)r   rý   s     r   r
  zdirstate.set_possibly_dirtyè  s'   € ð ˆŒØŒ	×$Ò$ XÑ.Ô.Ð.Ð.Ð.r    c                 óf  — | j         rd}t          j        |¦  «        ‚| j                             |¦  «        }|€d}n|j        }|s>|s<| j                             |¦  «        �!| j                             |¦  «         d| _        n|s|r|�	|j        rdS | j                             |||d¬¦  «         dS )a,  Set a file as tracked in the parent (or not)

        This is to be called when adjust the dirstate to a new parent after an history
        rewriting operation.

        It should not be called during a merge (p2 != nullid) and only within
        a `with dirstate.parentchange():` context.
        s7   update_file_reference should not be called when mergingNFT)Úhas_meaningful_mtime)	rÑ   r	   r/   re   r»   rú   Úreset_staterF   Úadded)r   rý   Ú
p1_trackedr3   r¥   Ú
wc_trackeds         r   Úupdate_file_p1zdirstate.update_file_p1î  sã   € ð Œ=ð 	.ØLˆCÝÔ(¨Ñ-Ô-Ð-Ø”	—’˜hÑ'Ô'ˆØˆ=ØˆJˆJàœˆJØð 	˜jð 	àŒy�}Š}˜XÑ&Ô&Ð2Ø”	×%Ò% hÑ/Ô/Ð/Ø"�”øØð 	 *ð 	ØÐ  U¤[Ð Ø�àŒ	×ÒØØØð "'ð 	ñ 	
ô 	
ð 	
ð 	
ð 	
r    c                 ó¼   — d| _         | j                             |¦  «        }|€d}n|j        }||k    rd| _        | j                             ||||| |¬¦  «         dS )aà  update the information about a file in the dirstate

        This is to be called when the direstates parent changes to keep track
        of what is the file situation in regards to the working copy and its parent.

        This function must be called within a `dirstate.parentchange` context.

        note: the API is at an early stage and we might need to adjust it
        depending of what information ends up being relevant and useful to
        other processing.
        TNF)Úp2_infor  r  )rF   re   r»   rú   rG   r  )	r   rý   r  r  r  Úpossibly_dirtyr  Ú	old_entryÚprev_trackeds	            r   Úupdate_filezdirstate.update_file  s„   € ð4 ˆŒØ”I—M’M (Ñ+Ô+ˆ	ØÐØ ˆLˆLà$Ô,ˆLØ˜:Ò%Ð%Ø&*ˆDÔ#àŒ	×ÒØØØØØ%3Ð!3Ø)ð 	ñ 	
ô 	
ð 	
ð 	
ð 	
r    c                 óH  — t          j        |¦  «         | j                             |¦  «        r:t	          d¦  «        }|t          j        |¦  «        z  }t          j        |¦  «        ‚t          j
        |¦  «        D ]�}| j                             |¦  «        r nr| j                             |¦  «        }|�U|j        sNt	          d¦  «        }|t          j        |¦  «        t          j        |¦  «        fz  }t          j        |¦  «        ‚Œ�|                      |¦  «         d S )Ns    directory %r already in dirstates#   file %r in dirstate clashes with %r)r   Úcheckfilenamere   rq   r   r   Úbytestrr	   ÚAbortr   Úfinddirsr»   Úremovedrî   )r   rý   r3   rr   r¥   s        r   rû   z$dirstate._check_new_tracked_filenameB  s  € ÝÔ˜hÑ'Ô'Ð'ØŒ9×"Ò" 8Ñ,Ô,ð 	#ÝÐ7Ñ8Ô8ˆCØ•8Ô# HÑ-Ô-Ñ-ˆCÝ”+˜cÑ"Ô"Ð"åÔ" 8Ñ,Ô,ð 	'ð 	'ˆAØŒy×&Ò& qÑ)Ô)ð Ø�Ø”I—M’M !Ñ$Ô$ˆEØÐ ¨¬Ð ÝÐ>Ñ?Ô?�Ø�Ô(¨Ñ+Ô+­XÔ-=¸hÑ-GÔ-GÐHÑH�Ý”k #Ñ&Ô&Ð&øØ×Ò˜8Ñ$Ô$Ð$Ð$Ð$r    c                 óÌ   — | j         }|�V|                     ¦   «         sD ||¦  «        s;t          d¦  «        }t          d¦  «        }t          j        ||z  |¬¦  «        ‚dS dS dS )z2Check that a filename is inside the sparse profileNs3   cannot add '%s' - it is outside the sparse checkoutsw   include file with `hg debugsparse --include <pattern>` or use `hg add -s <file>` to include file directory while adding)Úhint)rg   Úalwaysr   r	   r  )r   rý   Úsparsematchr3   r  s        r   rî   zdirstate._check_sparseS  s‰   € àÔ)ˆØÐ"¨;×+=Ò+=Ñ+?Ô+?Ð"Ø�;˜xÑ(Ô(ð =ÝÐNÑOÔO�ÝðQñô �õ ”k #¨¡.°tÐ<Ñ<Ô<Ð<ð #Ð"Ð"Ð"ð=ð =r    c                 ó  — |€Bt           j                             t           j                             | j        |¦  «        ¦  «        }|sC|s>d|v r:|                     dd¦  «        \  }}|                      |d|d ¦  «        }|dz   |z   }n€|}n}d|v rZ|                     dd¦  «        \  }}|                      |d|d¦  «        }| j        dz   |z   }	|dz   t          j        ||	¦  «        z   }nt          j        || j        ¦  «        }|||<   |S )Nr…   r   FT)	r™   r¹   Úlexistsr   rB   ÚrsplitÚ
_normalizer   Úfspath)
r   r¹   ÚnormedÚignoremissingÚexistsÚstoremaprr   ry   ÚfoldedÚrs
             r   Ú_discoverpathzdirstate._discoverpath_  s  € Øˆ>Ý”W—_’_¥R¤W§\¢\°$´*¸dÑ%CÔ%CÑDÔDˆFØð 	&à ð  T¨T \ \Ø—{’{ 4¨Ñ+Ô+‘��1Ø—O’O A u¨m¸TÑBÔB�Ø˜T™ A™��ð ��ð �vˆ~ˆ~Ø—}’} T¨1Ñ-Ô-‘��1Ø—O’O A u¨m¸TÑBÔB�Ø”J Ñ%¨Ñ)�Ø˜T™¥D¤K°°1Ñ$5Ô$5Ñ5��åœ V¨T¬ZÑ8Ô8�Ø%ˆH�VÑàˆr    c                 óÂ   — t          j        |¦  «        }| j        j                             |d ¦  «        }|€(|r|}n#|                      ||||| j        j        ¦  «        }|S r   )r   Únormcasere   Úfilefoldmapr»   r-  ©r   r¹   Úisknownr(  r)  r'  r+  s          r   Ú_normalizefilezdirstate._normalizefiley  sk   € Ý”˜tÑ$Ô$ˆØ”Ô&×*Ò*¨6°4Ñ8Ô8ˆØˆ>Øð Ø��à×+Ò+Ø˜& -°¸¼Ô9Nñô �ð ˆr    c                 ó  — t          j        |¦  «        }| j        j                             |d ¦  «        }|€ | j        j                             |d ¦  «        }|€(|r|}n#|                      ||||| j        j        ¦  «        }|S r   )r   r/  re   r0  r»   Ú
dirfoldmapr-  r1  s          r   r%  zdirstate._normalize…  sŒ   € Ý”˜tÑ$Ô$ˆØ”Ô&×*Ò*¨6°4Ñ8Ô8ˆØˆ>Ø”YÔ)×-Ò-¨f°dÑ;Ô;ˆFØˆ>Øð Ø��ð ×+Ò+Ø˜& -°¸¼Ô9Mñô �ð ˆr    c                 óB   — | j         r|                      |||¦  «        S |S )aL  
        normalize the case of a pathname when on a casefolding filesystem

        isknown specifies whether the filename came from walking the
        disk, to avoid extra filesystem access.

        If ignoremissing is True, missing path are returned
        unchanged. Otherwise, we try harder to normalize possibly
        existing path components.

        The normalized case is determined based on the following precedence:

        - version of name already stored in the dirstate
        - version of name stored on disk
        - version provided via command arguments
        )r“   r%  )r   r¹   r2  r(  s       r   Ú	normalizezdirstate.normalize•  s*   € ð$ Œ?ð 	AØ—?’? 4¨°-Ñ@Ô@Ð@Øˆr    c                 óF   — | j                              ¦   «          d| _        d S )NT)re   ÚclearrF   r^   s    r   r9  zdirstate.clear«  s   € ØŒ	�ŠÑÔÐØˆŒˆˆr    c                 ó  ‡	— | j         Š	‰	�W‰	                     ¦   «         sCˆ	fd„|D ¦   «         }|rˆ	fd„|D ¦   «         }|�#ˆ	fd„| D ¦   «         }|                     |¦  «        }|€|}g }|                      ¦   «          nrt	          |¦  «        dk     r9g }g }|D ]1}||v r|                     |¦  «         Œ|                     |¦  «         Œ2n&t          |¦  «        }|t          |¦  «        z  }||z
  }| j        €| j        | _        | j	         
                    || j        j        ¦  «         |D ]<}| j        r|                      |¦  «         Œ| j	                             |dd¬¦  «         Œ=|D ]}| j	                             |¦  «         Œd| _        d S )Nc                 ó*   •— g | ]} ‰|¦  «        ¯|‘ŒS r&   r&   ©rx   ry   Úmatchers     €r   rz   z$dirstate.rebuild.<locals>.<listcomp>´  s&   ø€ Ð:Ð:Ð:˜a¨w¨w°q©z¬zÐ:˜Ð:Ð:Ð:r    c                 ó*   •— g | ]} ‰|¦  «        ¯|‘ŒS r&   r&   r<  s     €r   rz   z$dirstate.rebuild.<locals>.<listcomp>¶  s&   ø€ ÐFÐFÐF a¸7¸7À1¹:¼:ÐF ÐFÐFÐFr    c                 ó*   •— h | ]} ‰|¦  «        °|’ŒS r&   r&   r<  s     €r   ú	<setcomp>z#dirstate.rebuild.<locals>.<setcomp>»  s&   ø€ Ð(KÐ(KÐ(K¨qÀÀÈÁ
Ä
Ð(K¨Ð(KÐ(KÐ(Kr    é
   T)r  r  )rg   r   Úunionr9  r³   r    rá   rO   r]   re   rØ   r@   rÐ   rÑ   rü   r  rF   )
r   ÚparentÚallfilesÚchangedfilesÚdirstatefilestoremoveÚ	to_lookupÚto_dropry   Úchangedfilessetr=  s
            @r   Úrebuildzdirstate.rebuild¯  s  ø€ àÔ%ˆØÐ w§~¢~Ñ'7Ô'7Ðà:Ð:Ð:Ð: 8Ð:Ñ:Ô:ˆHØð GØFÐFÐFÐF¨<ÐFÑFÔF�àÐ'ð )LÐ(KÐ(KÐ(K°DÐ(KÑ(KÔ(KÐ%Ø4×:Ò:¸<ÑHÔH�àÐà ˆIØˆGØ�JŠJ‰LŒLˆLˆLÝ�ÑÔ Ò#Ð#ð ˆIØˆGØ!ð &ð &�Ø˜�=�=Ø×$Ò$ QÑ'Ô'Ð'Ð'à—N’N 1Ñ%Ô%Ð%Ð%ð	&õ " ,Ñ/Ô/ˆOØ'­#¨h©-¬-Ñ7ˆIØ%¨	Ñ1ˆGàŒ<ÐØœ8ˆDŒLØŒ	×Ò˜V TÔ%8Ô%?Ñ@Ô@Ð@àð 		ð 		ˆAàŒ}ð Ø× Ò  Ñ#Ô#Ð#Ð#à”	×%Ò%ØØ#Ø#ð &ñ ô ð ð ð
 ð 	%ð 	%ˆAØŒI×!Ò! !Ñ$Ô$Ð$Ð$àˆŒˆˆr    c                 ó   — | j         j        S )zÔReturn identity of dirstate itself to detect changing in storage

        If identity of previous dirstate is equal to this, writing
        changes based on the former dirstate out can keep consistency.
        )re   Úidentityr^   s    r   rL  zdirstate.identityå  s   € ð ŒyÔ!Ð!r    c                 óà  ‡ ‡— ‰ j         sd S ‰ j        o‰ j        }‰rL‰                     d‰ j        fˆ ˆfd„dd¬¦  «         |r$‰                     d‰ j        fˆ ˆfd„dd¬¦  «         d S ˆ fd„} |‰ j        ¦  «        5 }‰                      ‰|¦  «         d d d ¦  «         n# 1 swxY w Y   |rA |‰ j        ¦  «        5 }‰                      ‰|¦  «         d d d ¦  «         d S # 1 swxY w Y   d S d S )	Nó   dirstate-1-mainc                 ó0   •— ‰                      ‰| ¦  «        S r   ©Ú_writedirstate©ry   r   Útrs    €€r   ú<lambda>z dirstate.write.<locals>.<lambda>÷  ó   ø€ ˜$×-Ò-¨b°!Ñ4Ô4€ r    ó   plainT©ÚlocationÚpost_finalizes   dirstate-2-key-postc                 ó0   •— ‰                      ‰| ¦  «        S r   )Ú_write_tracked_hintrR  s    €€r   rT  z dirstate.write.<locals>.<lambda>ÿ  s   ø€ ˜d×6Ò6°r¸1Ñ=Ô=€ r    c                 ó6   •— ‰                      | ddd¬¦  «        S )NrÛ   TrÜ   )r   )ry   r   s    €r   rT  z dirstate.write.<locals>.<lambda>  s   ø€ ˜Ÿš a¨¸$È4˜ÑPÔP€ r    )rF   r?   rG   ÚaddfilegeneratorrK   rL   rQ  r[  )r   rS  Ú	write_keyrõ   ry   s   ``   r   rã   zdirstate.writeí  sÝ  øø€ ØŒ{ð 	ØˆFàÔ*ÐF¨tÔ/Fˆ	Øð 	à×ÒØ"Ø”Ð!Ø4Ð4Ð4Ð4Ð4Ø!Ø"ð  ñ ô ð ð ð Ø×#Ò#Ø*ØÔ&Ð(Ø=Ð=Ð=Ð=Ð=Ø%Ø"&ð $ñ ô ð ð ˆFàPÐPÐPÐPˆØˆT�$”.Ñ!Ô!ð 	' QØ×Ò  AÑ&Ô&Ð&ð	'ð 	'ð 	'ñ 	'ô 	'ð 	'ð 	'ð 	'ð 	'ð 	'ð 	'øøøð 	'ð 	'ð 	'ð 	'àð 	0ð ��dÔ'Ñ(Ô(ð 0¨AØ×(Ò(¨¨QÑ/Ô/Ð/ð0ð 0ð 0ñ 0ô 0ð 0ð 0ð 0ð 0ð 0ð 0ð 0øøøð 0ð 0ð 0ð 0ð 0ð 0ð	0ð 	0s$   Á=B Â B$Â'B$Â=C!Ã!C%Ã(C%c                 óR   — | j                              | j        ¦  «         d| _        dS )zOremove the tracked_hint file

        To be used by format downgrades operationFN)r   ÚunlinkrL   r?   r^   s    r   Údelete_tracked_hintzdirstate.delete_tracked_hint  s+   € ð 	Œ×Ò˜DÔ-Ñ.Ô.Ð.Ø!&ˆÔÐÐr    c                 ó   — || j         |<   dS )a%  add a callback to be called when the wd parents are changed

        Callback will be called with the following arguments:
            dirstate, (oldp1, oldp2), (newp1, newp2)

        Category is a unique identifier to allow overwriting an old callback
        with a newer callback.
        N)rN   )r   ÚcategoryÚcallbacks      r   Úaddparentchangecallbackz dirstate.addparentchangecallback  s   € ð -5ˆÔ Ñ)Ð)Ð)r    c                 ó  — | j         �Z| j         | j        k    rJt          | j                             ¦   «         ¦  «        D ]\  }} || | j         | j        ¦  «         Œd | _         | j                             ||¦  «         d| _        d| _        d S )NF)	rO   r]   rÂ   rN   rÅ   re   rã   rF   rG   )r   rS  r§   Úcrd  s        r   rQ  zdirstate._writedirstate   s�   € àŒ<Ð#¨¬¸¼Ò(@Ð(@Ý% dÔ&=×&CÒ&CÑ&EÔ&EÑFÔFð 7ð 7‘��8Ø�˜˜tœ|¨T¬XÑ6Ô6Ð6Ð6ØˆDŒLØŒ	�Š˜˜BÑÔÐØˆŒØ"'ˆÔÐÐr    c                 óŠ   — t          j        t          j        ¦   «         j        ¦  «        }|                     d|z  ¦  «         d S )Ns   1
%s
)r   ÚhexÚuuidÚuuid4Úbytesrã   )r   rS  ry   r¾   s       r   r[  zdirstate._write_tracked_hint*  s7   € ÝŒh•t”z‘|”|Ô)Ñ*Ô*ˆØ	�Š�
˜SÑ Ñ!Ô!Ð!Ð!Ð!r    c                 ó’   — |                       |¦  «        rdS t          j        |¦  «        D ]}|                       |¦  «        r dS ŒdS )NTF)r‚   r   r  )r   ry   rÈ   s      r   Ú
_dirignorezdirstate._dirignore.  sV   € Ø�<Š<˜‰?Œ?ð 	Ø�4ÝÔ" 1Ñ%Ô%ð 	ð 	ˆAØ�|Š|˜A‰Œð Ø�t�tðàˆur    c           	      óÈ  — g }t           j                             |                      d¦  «        ¦  «        r(|                     |                      d¦  «        ¦  «         | j                             d¦  «        D ]j\  }}|dk    s|                     d¦  «        rJ|                     t           j                             | j	        t          j        |¦  «        ¦  «        ¦  «         Œk|S )Nrt   r„   s   ignores   ignore.)r™   r¹   r)  r*   r    rH   Úconfigitemsr²   r   rE   r   Ú
expandpath)r   r€   Únamer¹   s       r   r}   zdirstate._ignorefiles6  s¾   € ØˆÝŒ7�>Š>˜$Ÿ*š* \Ñ2Ô2Ñ3Ô3ð 	3Ø�LŠL˜Ÿš LÑ1Ô1Ñ2Ô2Ð2Øœ(×.Ò.¨uÑ5Ô5ð 	Qð 	Q‰JˆD�$Ø�yÒ Ð  D§O¢O°JÑ$?Ô$?Ð ð —’�RœWŸ\š\¨$¬-½¼ÈÑ9NÔ9NÑOÔOÑPÔPÐPøØˆr    c                 ó  — t          j        |                      ¦   «         ¦  «        }t          ¦   «         }|rÈ|                     ¦   «         }t          j        || j        j        d¬¦  «        }|D ]y\  }}}t          j	        |d¦  «        \  }	}
|	dk    r|
|vr| 
                    |
¦  «         Œ>t          j        | j        dg |g| j        j        ¬¦  «        } ||¦  «        r|||fc S Œz|                     |¦  «         |°ÈdS )NT)Ú
sourceinfos   globs
   subincluder    r{   )Néÿÿÿÿr    )ÚcollectionsÚdequer}   rá   Úpopleftr~   ÚreadpatternfilerH   r|   Ú	_patsplitr    r
   rB   Úadd)r   ry   r€   ÚvisitedÚiÚpatternsÚpatternÚlinenoÚlineÚkindrÈ   Úms               r   Ú_ignorefileandlinezdirstate._ignorefileandlineA  s'  € ÝÔ! $×"3Ò"3Ñ"5Ô"5Ñ6Ô6ˆÝ‘%”%ˆØð 	Ø—’‘”ˆAÝÔ/Ø�4”8”=¨Tðñ ô ˆHð *2ð 
-ð 
-Ñ%�˜ Ý"Ô,¨W°gÑ>Ô>‘��aØ˜=Ò(Ð(Ø Ð'Ð'ØŸš Q™œ˜ØÝ”NØ”J  R¨'¨¸¼¼ðñ ô �ð �1�Q‘4”4ð -Ø˜v tÐ,Ð,Ð,Ð,ð-à�KŠK˜‰NŒNˆNð! ð 	ð" ˆr    c           	      óÌ  — d„ }|j         }| j        }t          j        }t          j        }t          j        }t          j        }	t          j        }
| j	        }g }|j
        }g }|j
        }|                     ¦   «         s| j        r| j        }nd}t          |                     ¦   «         ¦  «        }|                     ¦   «          d\  }}|t#          |¦  «        k     rº|t#          |¦  «        k     r§||         dz   }||         |k     r|dz  }ŒC|t#          |¦  «        k     rL||                              |¦  «        r1||= |t#          |¦  «        k     r||                              |¦  «        °1|dz  }|t#          |¦  «        k     r|t#          |¦  «        k     °§|rd|v rdg}d}t&                               |¦  «        }d|d<   |D ]õ}|r ||dd	¦  «        }n|}||v rŒ	  | ||¦  «        ¦  «        } ||j        ¦  «        }||k    r||v rd||<    |||f¦  «         n0||	k    s||
k    r|||<   n || ||¦  «        ¦  «         ||v rd||<   ŒŒ# t,          $ r]}||v rd||<   nI| j                             |¦  «        r ||¦  «         n# ||t1          j        |j        ¦  «        ¦  «         Y d}~Œîd}~ww xY w|                     ¦   «         r+t9          |¦  «        D ]}|dk    s||v rŒ ||¦  «        s||= Œ|                     ¦   «         rÙ| j        rÒi }|                     ¦   «         D ][\  }}|€Œt=          j        |¦  «        }|                      |¦  «        }|€tC          ¦   «         }|||<   | "                    |¦  «         Œ\|                     ¦   «         D ]K\  }}t#          |¦  «        dk    r3|D ]0} |  #                    | |d	d| j        j$        ¦  «        }!| |!k    rd|| <   Œ1ŒL|||fS )
a²  Get stat data about the files explicitly specified by match.

        Return a triple (results, dirsfound, dirsnotfound).
        - results is a mapping from filename to stat result. It also contains
          listings mapping subrepos and .hg to None.
        - dirsfound is a list of files found to be directories.
        - dirsnotfound is a list of files that the dirstate thinks are
          directories and that were not found.c                 óª  — t          d¦  «        }t          j        | ¦  «        rt          d¦  «        }n�t          j        | ¦  «        rt          d¦  «        }nkt          j        | ¦  «        rt          d¦  «        }nGt          j        | ¦  «        rt          d¦  «        }n#t          j        | ¦  «        rt          d¦  «        }t          d¦  «        |z  S )Ns   unknowns   character devices   block devices   fifos   sockets	   directorys"   unsupported file type (type is %s))r   ÚstatÚS_ISCHRÚS_ISBLKÚS_ISFIFOÚS_ISSOCKÚS_ISDIR)r  r‚  s     r   Úbadtypez'dirstate._walkexplicit.<locals>.badtypea  s¿   € Ý�Z‘=”=ˆDÝŒ|˜DÑ!Ô!ð 	'ÝÐ,Ñ-Ô-��Ý”˜dÑ#Ô#ð 'Ý˜Ñ)Ô)��Ý”˜tÑ$Ô$ð 'Ý˜‘z”z��Ý”˜tÑ$Ô$ð 'Ý˜‘|”|��Ý”˜dÑ#Ô#ð 'Ý˜‘”�ÝÐ:Ñ;Ô;¸dÑBÐBr    N)r   r   r…   r   r    r‘   FT)%Úbadre   r™   rš   r‡  ÚS_IFMTÚS_IFDIRÚS_IFREGÚS_IFLNKr*   r    Úisexactr“   r%  rÂ   r€   Úsortr³   r²   ÚdictÚfromkeysÚst_moder›   rs   r   Ú
strtolocalÚstrerrorÚanypatsÚlistrÅ   r   r/  r»   rá   r{  r-  r5  )"r   r
   Úsubreposr�  ÚbadfnÚdmaprš   ÚgetkindÚdirkindÚregkindÚlnkkindr   Ú	dirsfoundÚfoundaddÚdirsnotfoundÚnotfoundaddr7  r€   r}  ÚjÚsubpathÚresultsÚffÚnfr§   r‚  Úinstry   r'  ÚncÚpathsÚnormr¹   r+  s"                                     r   Ú_walkexplicitzdirstate._walkexplicitW  s  € ð	Cð 	Cð 	Cð ”	ˆØŒyˆÝ”ˆÝ”+ˆÝ”,ˆÝ”,ˆÝ”,ˆØŒzˆØˆ	ØÔ#ˆØˆØ"Ô)ˆà�}Š}‰Œð 	 4¤?ð 	ØœˆIˆIàˆIå�u—{’{‘}”}Ñ%Ô%ˆØ�Š‰ŒˆØ‰ˆˆ1Ø•#�e‘*”*Šnˆn ¥S¨¡]¤]Ò!2Ð!2Ø˜q”k DÑ(ˆGØ�QŒx˜'Ò!Ð!Ø�Q‘�ØØ•c˜%‘j”j’.�. U¨1¤X×%8Ò%8¸Ñ%AÔ%A�.Ø˜!�Hð •c˜%‘j”j’.�. U¨1¤X×%8Ò%8¸Ñ%AÔ%A�.à�‰FˆAð •#�e‘*”*Šnˆn ¥S¨¡]¤]Ò!2Ð!2ð ð 	˜˜u˜˜Ø�EˆEð ˆIÝ—-’- Ñ)Ô)ˆØˆ�‰àð 	Fð 	FˆBØð Ø�Y˜r 5¨$Ñ/Ô/��à�Ø�Wˆ}ˆ}ØðFØ�U˜4˜4 ™8œ8‘_”_�Ø�w˜rœzÑ*Ô*�Ø˜7’?�?Ø˜T�z�zà&*˜ ™Ø�H˜b "˜XÑ&Ô&Ð&Ð&Ø˜W’_�_¨°ª¨Ø"$�G˜B‘K�Kà�E˜"˜g˜g d™mœmÑ,Ô,Ð,Ø˜T�z�zØ&*˜ ™øøÝð Fð Fð FØ˜�:�:Ø"&�G˜B‘K�Kà”y×'Ò'¨Ñ+Ô+ð FØ#˜ B™œ˜˜à˜˜b¥(Ô"5°d´mÑ"DÔ"DÑEÔEÐEøøøøøøøøøðFøøøð �=Š=‰?Œ?ð 	#Ý˜'‘]”]ð #ð #�Ø˜’;�; ! x - -àØ�u˜Q‘x”xð #Ø ˜
øð �=Š=‰?Œ?ð 	1˜tœð 	1ØˆFà Ÿš™œð ð ‘��2Ø�:Øå”] 1Ñ%Ô%�ØŸ
š
 2™œ�à�=Ý™EœE�EØ!&�F˜2‘Jà—	’	˜!‘”��à%Ÿ|š|™~œ~ð 1ð 1‘��eÝ�u‘:”: ’>�>Ø %ð 1ð 1˜Ø!%×!3Ò!3Ø  $¨¨d°D´IÔ4Hñ"ô "˜ð   6š>˜>Ø,0˜G D™Møøà˜	 <Ð/Ð/s   ÇA1IÉ
J2ÉAJ-Ê-J2Tc                 ó@  ‡ ‡‡‡‡‡‡‡‡‡‡‡ ‡!‡"‡#‡$— |rt           j        Št           j        Šn)|r‰ j        Š‰ j        Šnt           j        Št           j        Š‰ j        �Vt          j        ‰                     ¦   «         ¦  «        }t          j	        ‰ j
        |g¦  «        }t          j        ‰|¦  «        Š‰j        Š‰                     ¦   «         Š‰j        Š ‰ j        Št           j        Št           j        }t$          j        Št$          j        Š#t$          j        Š‰ j        Šdx}	}
‰                     ¦   «         rd}	t           j        Šn‰                     ¦   «         rd}
|	s‰ j        r‰ j        Š!‰ j        Š"d}
n	‰ j        Š!dŠ"‰                      ‰|¦  «        \  Š$}}‰ r&|D ]} ‰ |d         ¦  «         Œ|D ]} ‰ |¦  «         Œ|
o|p| }
ˆfd„|D ¦   «         }ˆˆˆˆˆˆˆˆˆˆ ˆ!ˆ"ˆ#ˆ$ˆ fd„}|D ]\  }}‰! p||k    } ||g|¦  «         Œ|D ]}‰$|= Œ‰$d= |
�s
|	�s‰$s‰rd„ ‰D ¦   «         }nˆˆ$fd	„‰D ¦   «         }|                     ¦   «          |r�t=          j        ‰ j         d¬
¦  «        }tC          |¦  «        D ]a}‰"r ‰"|dd¦  «        ‰$v rd‰$|<   Œ| "                    |¦  «        r.	  | ‰|¦  «        ¦  «        ‰$|<   ŒG# tF          $ r d‰$|<   Y ŒXw xY wd‰$|<   ŒbnDtC          |¦  «        }t          j$        ˆfd„|D ¦   «         ¦  «        D ]}|‰$tK          |¦  «        <   Œ‰$S )a3  
        Walk recursively through the directory tree, finding all files
        matched by match.

        If full is False, maybe skip some known-clean files.

        Return a dict mapping filename to stat-like object (either
        mercurial.osutil.stat instance or return value of os.stat()).

        NFTr   c                 ó6   •— g | ]} ‰|d          ¦  «        °|‘ŒS )r   r&   )rx   rr   Ú	dirignores     €r   rz   z!dirstate.walk.<locals>.<listcomp>   s*   ø€ Ð7Ð7Ð7�a y y°°1´¡¤Ð7�Ð7Ð7Ð7r    c                 óü  •— | j         }| �rðt          j        dt          | ¦  «        ¦  «         |                      ¦   «         }‰                     |¦  «        }|sŒQ|dk    s|dk    rd }d }|dk    rd}	 t          j        d|¦  «        5   ‰ ‰|¦  «        d|¬¦  «        }d d d ¦  «         n# 1 swxY w Y   n_# t          t          f$ rK}‰ 	                    ‰ 
                    |¦  «        t          j        |j        ¦  «        ¦  «         Y d }~�Œd }~ww xY w|D ]Ý\  }}	}
|r||vrŒ‰r ‰|r|d	z   |z   p|dd¦  «        }n|r|d	z   |z   p|}|‰vr¦|	‰k    r: ‰|¦  «        s‰r ‰|¦  «          ||¦  «         |‰v r‰s ‰|¦  «        rd ‰|<   Œw|	‰k    s|	‰k    rD|‰v r‰s ‰|¦  «        r|
‰|<   Œš‰s ‰|¦  «        r ‰|¦  «        s|s ‰|d
d¦  «        }|
‰|<   ŒÇ|‰v r‰s ‰|¦  «        rd ‰|<   ŒÞ| �°îd S d S )Nzdirstate.walk works   thiss   allr    r‘   z!dirstate.walk.traverse listdir %sT)r‡  Úskipr…   F)r    r   Úcounterr³   rð   ÚvisitchildrensetÚlogÚPermissionErrorrl   rŽ  r·   r   r˜  r™  )ÚworkÚalreadynormedÚwaddÚndÚvisitentriesrµ  Úentriesr¬  ry   r‚  r§   r«  r   rž  Úignorer   Úlistdirr¢  r
   ÚmatchalwaysÚmatchfnÚ	matchtdirr7  Únormalizefiler¡  r©  r   s               €€€€€€€€€€€€€€€r   Útraversezdirstate.walk.<locals>.traverse#  s>  ø€ Ø”;ˆDØñ ;/Ý”Ð 4µc¸$±i´iÑ@Ô@Ð@Ø—X’X‘Z”Z�Ø$×5Ò5°bÑ9Ô9�Ø#ð ØØ 7Ò*Ð*¨l¸fÒ.DÐ.DØ#'�LØ�Ø˜’9�9Ø!�DðÝ œÐ%HÈ"ÑMÔMð Jð JØ") '¨$¨$¨r©(¬(¸ÀDÐ"IÑ"IÔ"I˜ðJð Jð Jñ Jô Jð Jð Jð Jð Jð Jð Jøøøð Jð Jð Jð Jøøå'Õ):Ð;ð ð ð Ø—I’IØŸš B™œ­Ô)<¸T¼]Ñ)KÔ)Kñô ð ð �H�H�H‘Høøøøð	øøøð
 $+ð (/ð (/‘K�A�t˜Rð $ð !¨°Ð(=Ð(=Ø Ø$ð 9ð +˜]ØÐ2 B¨¡I°¡MÐ7°a¸¸tñô ˜˜ð  Ð3 R¨$¡Y°¡]Ð8°q˜Ø Ð(Ð(Ø 7š?˜?Ø#) 6¨"¡:¤:ð )Ø#,ð !2Ø$- I¨b¡M¤M MØ $  R¡¤ Ø! T˜z˜z¨{˜z¸g¸gÀb¹k¼k˜zØ.2 ¨¡øØ! Wš_˜_°¸²°Ø! T˜z˜zØ#.ð !5°'°'¸"±+´+ð !5Ø24 G¨B¡KøØ"-ð 1°°¸±´ð 1ÀfÀfØ "ñGô Gð 1ð (5ð !DØ)2¨°2°u¸dÑ)CÔ)C BØ.0 ¨¡øØ 4˜Z˜Z¨[˜Z¸G¸GÀB¹K¼K˜ZØ*.˜G B™Køðw ñ ;/ð ;/ð ;/ð ;/ð ;/s=   Á3B8 ÂB,Â B8 Â,B0Â0B8 Â3B0Â4B8 Â8DÃ	A DÄDr‘   c                 ó   — g | ]}|‘ŒS r&   r&   rw   s     r   rz   z!dirstate.walk.<locals>.<listcomp>r  s   € Ð)Ð)Ð)˜q˜Ð)Ð)Ð)r    c                 ó2   •— g | ]}|‰v¯ ‰|¦  «        ¯|‘ŒS r&   r&   )rx   ry   rÃ  r©  s     €€r   rz   z!dirstate.walk.<locals>.<listcomp>t  s0   ø€ ÐLÐLÐL˜q¨A°WÐ,<Ð,<ÀÀÈÁÄÐ,<˜Ð,<Ð,<Ð,<r    )Úcachedc                 ó&   •— g | ]} ‰|¦  «        ‘ŒS r&   r&   )rx   r}  r   s     €r   rz   z!dirstate.walk.<locals>.<listcomp>™  s!   ø€ Ð)AÐ)AÐ)A°a¨$¨$¨q©'¬'Ð)AÐ)AÐ)Ar    )&r   r   r‚   rn  r   rC   r~   Úexactr€   Úunionmatcherrg   ÚintersectmatchersrÃ  Útraversedirre   rÁ  r™   rš   r‡  r�  r‘  r’  r*   r“  Úprefixr“   r%  r3  r°  r”  r   ÚpathauditorrB   rÁ   Úcheckr›   Ú	statfilesÚnext)%r   r
   rœ  ÚunknownÚignoredÚfullÚemÚsmrš   rË  Ú	skipstep3rº  r¥  rr   rÆ  r½  r»  ÚsÚvisitÚ
audit_pathr«  Úivr§   r³  r   rž  rÀ  r   rÁ  r¢  rÂ  rÃ  rÄ  r7  rÅ  r¡  r©  s%   ``                     @@@@@@@@@@@@@@r   Úwalkzdirstate.walkÞ  s4  øøøøøøøøøøøøøøøø€ ð ð 		$Ý”ZˆFÝœ
ˆIˆIØð 	$Ø”\ˆFØœˆIˆIõ ”[ˆFÝœˆIàÔÐ*Ý” §¢¡¤Ñ.Ô.ˆBÝÔ&¨Ô(;¸RÐ'@ÑAÔAˆBÝÔ.¨u°bÑ9Ô9ˆEà”-ˆØ—l’l‘n”nˆØÔ%ˆ	ØŒyˆÝ”,ˆÝ”ˆÝ”,ˆÝ”,ˆÝ”,ˆØŒzˆà!Ð!ˆ�	Ø�=Š=‰?Œ?ð 	ØˆEÝœˆIˆIØ�\Š\‰^Œ^ð 	ØˆIàð 	!˜œð 	!ØœˆIØ Ô/ˆMØˆIˆIàœˆIØ ˆMð '+×&8Ò&8¸ÀÑ&IÔ&IÑ#ˆ��|Øð 	Øð  ð  �Ø�	˜!˜Aœ$‘”��Ø!ð ð �Ø�	˜!‘”��àÐ< tÐ';¨|Ð"<ˆ	Ø7Ð7Ð7Ð7˜4Ð7Ñ7Ô7ˆð=	/ð =	/ð =	/ð =	/ð =	/ð =	/ð =	/ð =	/ð =	/ð =	/ð =	/ð =	/ð =	/ð =	/ð =	/ð =	/ð =	/ð =	/ð =	/ð~ ð 	)ð 	)‰EˆB�ð !*˜MÐ4¨R°1ªWˆMØˆH�a�S˜-Ñ(Ô(Ð(Ð(àð 	ð 	ˆAØ˜�
�
Ø�FˆOð ñ -	+ ñ -	+ð ð M˜{ð MØ)Ð) DÐ)Ñ)Ô)��àLÐLÐLÐLÐL DÐLÑLÔL�Ø�JŠJ‰LŒLˆLàð #+õ
 &Ô1°$´*ÀTÐJÑJÔJ�
å˜u™+œ+ð +ð +�Bð &ð+à)˜M¨"¨d°DÑ9Ô9¸WÐDÐDà&*˜ ™˜ð $×)Ò)¨"Ñ-Ô-ð 
+ð/Ø*/¨%°°°R±´©/¬/˜G B™K˜Køå&ð /ð /ð /à*.˜G B™K˜K˜Kð/øøøð '+˜ ™˜ð-+õ4 ˜%‘[”[�Ýœ.Ð)AÐ)AÐ)AÐ)A¸5Ð)AÑ)AÔ)AÑBÔBð +ð +�BØ(*�G�D ™HœHÑ%Ð%Øˆs   Ê&J>Ê>KËKc                 óþ  — | j         �Vt          j        |                     ¦   «         ¦  «        }t          j        | j        |g¦  «        }t          j        ||¦  «        }| j                             dd¦  «        }|�#t          j
                             dd|z  ¦  «         | j                             ddd¦  «        }|sdt          j
        d<   t                               | j        j        || j        |                      ¦   «         | j        t'          |¦  «        t'          |¦  «        t'          |¦  «        t'          |j        ¦  «        ¦	  «	        \  }	}
}}}}}}}}}}| xj        |z  c_        |j        r|D ]}|                     |¦  «         Œ| j        j        rš|D ]—}t/          |t0          ¦  «        r4|\  }}t3          d¦  «        ||fz  }| j                             |¦  «         ŒKt3          d	¦  «        }| j                             |t5          j        | j        | j        |¦  «        d
fz  ¦  «         Œ˜|D ]-\  }}|                     |t          j        |¦  «        ¦  «         Œ.t=          j        |
||||||¬¦  «        }|	|fS )Ns   workers   numcpuss   RAYON_NUM_THREADSs   %ds   enabledTó   1s!   %s: ignoring invalid syntax '%s'
s*   skipping unreadable pattern file '%s': %s
s   No such file or directory)Úmodifiedr  r  ÚdeletedrÔ  rÕ  Úclean)rC   r~   rË  r€   rÌ  rg   rÍ  rH   Ú	configintr   ÚenvironÚ
setdefaultr†   ÚrustmodÚstatusre   rE   r}   r�   r�   rÎ  rF   r|   Ú
isinstanceÚtupler   r   Ú	canonpathrŽ  r˜  r   )r   r=  Ú
list_cleanÚlist_ignoredÚlist_unknownr×  rØ  ÚnumcpusÚworkers_enabledÚlookuprá  r  r  râ  rã  rÕ  rÔ  ÚwarningsrŽ  Ú	traversedÚdirtyÚdirÚitemÚ	file_pathÚsyntaxr3   ÚfnÚmessagerè  s                                r   Ú_rust_statuszdirstate._rust_status�  s¿  € ØÔÐ*Ý” §¢¡¤Ñ0Ô0ˆBÝÔ&¨Ô(;¸RÐ'@ÑAÔAˆBÝÔ0°¸"Ñ=Ô=ˆGð ”(×$Ò$ Y°
Ñ;Ô;ˆØÐÝÔ×'Ò'Ð(<¸eÀg¹oÑNÔNÐNàœ(×-Ò-¨i¸ÀTÑJÔJˆØð 	:Ø59�HÔÐ1Ñ2õ �NŠNØŒIŒNØØŒMØ×ÒÑÔØŒOÝ�ÑÔÝ�ÑÔÝ�ÑÔÝ�Ô$Ñ%Ô%ñ

ô 

ñ	
ØØØØØØØØØØØØð 	ˆŒ�uÑˆŒàÔð 	)Ø ð )ð )�Ø×#Ò# CÑ(Ô(Ð(Ð(àŒ8Œ=ð 	Ø ð ð �Ý˜d¥EÑ*Ô*ð Ø(,Ñ%�I˜vÝÐAÑBÔBØ!ØðFñ �Cð ”H—M’M #Ñ&Ô&Ð&Ð&åÐJÑKÔK�CØ”H—M’MØå$Ô.Ø $¤¨t¬}¸dñô ð 9ð	ññô ð ð ð !ð 	:ð 	:‰MˆR�Ø�KŠK˜�HÔ/°Ñ8Ô8Ñ9Ô9Ð9Ð9å”ØØØØØØØð
ñ 
ô 
ˆð ˜ÐÐr    c           	      óô  — |||}}}g g g g g f\  }	}
}}}g g g }}}| j         }|                     ¦   «          d}t          j        t          j        t          j        t          j        t          j        t          j        t          j	        f}t          €d}n!| j        rd}n|rd}nt          ||¦  «        sd}	 t          j        | j        ¦  «        }n# t           $ r d}Y nw xY w|r4	 |                      ||||¦  «        }||fz   S # t          j        $ r Y nw xY wd„ }|j        }|j        }|	j        }|
j        }|j        }|r|j        n|}|r|j        n|}|j        }|j        }|r|j        n|}|j        }| j        }| j        } | j        }!| j         j        }"|p|j        du}#|                      |||||#¬¦  «                             ¦   «         D �]‘\  }$}% ||$¦  «        s2|s ||$¦  «        r ||$¦  «        r|r ||$¦  «         n ||$¦  «         ŒC ||$¦  «        }&|&j        }'|&j        }(|%s|&j         r ||$¦  «         Œq|&j!        r ||$¦  «         Œ„|&j"        r ||$¦  «         Œ—|&j#        r ||$¦  «         Œª|&j         rà|!s|&j$        r ||$¦  «         ŒÆ| s|&j%        r ||$¦  «         ŒÛ|(dk    r-|(|%j&        k    r|(|%j&        tN          z  k    s|'|%j(        z  dz  r| s|$|"v r>tS          j*        |%j(        ¦  «        r|(|%j&        k    r ||$¦  «         �ŒC ||$¦  «         �ŒP|& +                    t          j,        |%¦  «        ¦  «        s ||$¦  «         �Œ„|r ||$¦  «         �Œ“t[          j.        |
||||||¦  «        })|	|)|fS )a|  Determine the status of the working copy relative to the
        dirstate and return a pair of (unsure, status), where status is of type
        scmutil.status and:

          unsure:
            files that might have been modified since the dirstate was
            written, but need to be read to be sure (size is the same
            but mtime differs)
          status.modified:
            files that have definitely been modified since the dirstate
            was written (different size or mode)
          status.clean:
            files that have definitely not been modified since the
            dirstate was written
        TNFc                 ó   — d S r   r&   )ry   s    r   Únoopzdirstate.status.<locals>.noop.  s   € ØˆDr    )rÖ  r   é@   )/re   Úpreloadr~   ÚalwaysmatcherÚdifferencematcherÚexactmatcherÚincludematcherÚintersectionmatcherÚnevermatcherrÌ  rç  r“   ré  r   Ú
get_fs_nowr   r›   rû  ÚFallbackErrorr¿   Ú__getitem__r    rË  rn  r�   r‹   rï   rÎ  rÞ  rÅ   r  r  rú   r  r  r  rž   r¢   Úst_sizeÚ
_rangemaskr—  r‡  ÚS_ISLNKÚmtime_likely_equal_toÚmtime_ofr   rè  )*r   r
   rœ  rÕ  rã  rÔ  ÚlistignoredÚ	listcleanÚlistunknownrñ  rá  r  r  râ  rž  Úuse_rustÚallowed_matchersÚmtime_boundaryÚresrþ  Ú	dcontainsÚdgetÚladdÚmaddÚaaddÚuaddÚiaddÚraddÚdaddÚcaddÚmexactr³  rŽ   rŠ   rï   rÖ  rù  r§   Útr  r  rè  s*                                             r   rè  zdirstate.statusï  sŒ  € ð  /6°u¸g �YˆØ46¸¸BÀÀBÐ4FÑ1ˆ�˜% ¨'Ø"$ b¨"˜%�ˆàŒyˆØ�Š‰Œˆàˆõ Ô"ÝÔ&ÝÔ!ÝÔ#ÝÔ(ÝÔ!ÝÔ!ð
Ðõ ˆ?ØˆHˆHØŒ_ð 	àˆHˆHØð 	ØˆHˆHÝ˜EÐ#3Ñ4Ô4ð 	àˆHð	"Ý&Ô1°$´,Ñ?Ô?ˆNˆNøÝð 	"ð 	"ð 	"à!ˆNˆNˆNð	"øøøð ð 	ðØ×'Ò'Ø˜9 k°;ñô �ð ˜nÐ.Ñ.Ð.øÝÔ(ð ð ð Ø�ðøøøð	ð 	ð 	ð Ô%ˆ	ØÔˆØŒ}ˆØŒˆØŒ|ˆØ!,Ð6ˆwŒ~ˆ~°$ˆØ!,Ð6ˆwŒ~ˆ~°$ˆØŒ~ˆØŒ~ˆØ(Ð2ˆuŒ|ˆ|¨dˆØ”ˆØ”Oˆ	Ø”Oˆ	Ø”Oˆ	Ø”)Ô#ˆð Ð9˜EÔ-°TÐ9ˆØ—i’iØ�8˜[¨+¸Dð  ñ 
ô 
ç
Š%‰'Œ'ð7	ñ 7	‰FˆB�ð �9˜R‘=”=ð Øð  6 6¨"¡:¤:ð °9°9¸R±=´=ð Ø"ð !Ø˜˜R™œ˜øà�D˜‘H”H�HØà��R‘”ˆAØ”6ˆDØ”6ˆDàð (˜!œ)ð (Ø��R‘”��Ø”ð &Ø��R‘”��Ø”ð $Ø��R‘”��Ø”ð "Ø��R‘”��Ø”ð  Ø ð  QÔ%;ð ð �D˜‘H”H�H�HØ"ð  qÔ':ð ð �D˜‘H”H�H�Hà˜A’I�Ià ¤Ò+Ð+°¸¼
ÅZÑ8OÒ0OÐ0OØ! B¤JÑ.°%Ñ7ð 1PØ<Eð 1Pð ˜W�}�}å”| B¤JÑ/Ô/ð !°D¸B¼JÒ4FÐ4Fð ˜˜R™œ˜™à˜˜R™œ˜™Ø×0Ò0µÔ1CÀBÑ1GÔ1GÑHÔHð ð
 �D˜‘H”H�H‘HØð Ø�D˜‘H”H�HùÝ”Ø�e˜W g¨w¸Àñ
ô 
ˆð ˜ Ð/Ð/s$   Â2C ÃCÃCÃ!C? Ã?DÄDc                 óŽ  ‡‡— | j         Št          �| j         j         Š‰                     ¦   «         r‰                     ¦   «         S ‰                     ¦   «         }‰                     ¦   «         rˆfd„|D ¦   «         S ‰                     ¦   «         r*t          ˆfd„|D ¦   «         ¦  «        rt          |¦  «        S ˆfd„‰D ¦   «         S )zT
        return files in the dirstate (in whatever state) filtered by match
        Nc                 ó   •— g | ]}|‰v ¯|‘Œ	S r&   r&   )rx   ry   rž  s     €r   rz   z$dirstate.matches.<locals>.<listcomp>‘  s   ø€ Ð2Ð2Ð2˜!¨¨T¨	¨	�A¨	¨	¨	r    c              3   ó    •K  — | ]}|‰v V — Œ	d S r   r&   )rx   rù  rž  s     €r   ú	<genexpr>z#dirstate.matches.<locals>.<genexpr>’  s'   øè è € Ð!=Ð!=° "¨ *Ð!=Ð!=Ð!=Ð!=Ð!=Ð!=r    c                 ó*   •— g | ]} ‰|¦  «        ¯|‘ŒS r&   r&   )rx   ry   r
   s     €r   rz   z$dirstate.matches.<locals>.<listcomp>–  s&   ø€ Ð,Ð,Ð,�a 5 5¨¡8¤8Ð,�Ð,Ð,Ð,r    )	re   rç  r   Úkeysr€   r“  rÏ  Úallr›  )r   r
   r€   rž  s    ` @r   Úmatcheszdirstate.matchesƒ  sÏ   øø€ ð ŒyˆÝÐØ”9”>ˆDà�<Š<‰>Œ>ð 	Ø—9’9‘;”;ÐØ—’‘”ˆØ�=Š=‰?Œ?ð 	3ð 3Ð2Ð2Ð2˜uÐ2Ñ2Ô2Ð2Ø�<Š<‰>Œ>ð 	�cÐ!=Ð!=Ð!=Ð!=°uÐ!=Ñ!=Ô!=Ñ=Ô=ð 	õ ˜‘;”;ÐØ,Ð,Ð,Ð,˜4Ð,Ñ,Ô,Ð,r    c                 ó"   — |r| j         S | j        S r   )rM   rK   )r   rS  s     r   Ú_actualfilenamezdirstate._actualfilename˜  s   € Øð 	"ØÔ(Ð(à”>Ð!r    c                 ó   — | j         sd S |dz   S )Ns   .v2-data)r>   )r   Ú
backupnames     r   Údata_backup_filenamezdirstate.data_backup_filenamež  s   € ØÔ$ð 	Ø�4Ø˜KÑ'Ð'r    c                 ó¤   — | j         sdS | j        j        j        €dS | j        j                             ¦   «         }||                      |¦  «        fS )z/return a filename to backup a data-file or NoneN)r>   re   r   rj  Údata_filenamer.  )r   r-  r0  s      r   Ú_new_backup_data_filenamez"dirstate._new_backup_data_filename£  sT   € àÔ$ð 	Ø�4ØŒ9ÔÔ Ð(à�4Øœ	Ô(×6Ò6Ñ8Ô8ˆØ˜d×7Ò7¸
ÑCÔCÐCÐCr    c                 óà   — | j         sd S t          j                             | j                             |¦  «        | j        ¦  «        }|                      |¦  «        |                     ¦   «         fS r   )	r>   Ú	docketmodÚDirstateDocketÚparser   rj   r@   r.  r0  )r   r-  r   s      r   Úbackup_data_filezdirstate.backup_data_file­  sj   € ØÔ$ð 	Ø�4ÝÔ)×/Ò/ØŒL×Ò˜jÑ)Ô)ØÔñ
ô 
ˆð ×(Ò(¨Ñ4Ô4°f×6JÒ6JÑ6LÔ6LÐLÐLr    c           	      ó  ‡ ‡— ‰                       ‰¦  «        }||k    sJ ‚‰ j        s‰ j                             |¦  «        s-‰                      ‰‰                      |ddd¬¦  «        ¦  «         ‰r;‰                     d‰ j        fˆ ˆfd„dd¬¦  «         ‰                     |d¬¦  «         ‰ j                             |¦  «         t          j
        ‰ j                             |¦  «        ‰ j                             |¦  «        d¬	¦  «         ‰                      |¦  «        }|�g|\  }}t          j
        ‰ j                             |¦  «        ‰ j                             |¦  «        d¬	¦  «         ‰�‰                     |d¬¦  «         d
S d
S d
S )z&Save current dirstate into backup filerÛ   TrÜ   rN  c                 ó0   •— ‰                      ‰| ¦  «        S r   rP  rR  s    €€r   rT  z%dirstate.savebackup.<locals>.<lambda>Ë  rU  r    rV  rW  )rX  )ÚhardlinkN)r+  rF   r   r)  rQ  r]  rK   ÚregistertmpÚ	tryunlinkr   Úcopyfiler   r1  )r   rS  r-  rý   Ú	data_pairr0  Úbck_data_filenames   ``     r   Ú
savebackupzdirstate.savebackup¶  sÖ  øø€ à×'Ò'¨Ñ+Ô+ˆØ˜XÒ%Ð%Ð%Ð%ð
 Œ;ð 	˜dœl×1Ò1°(Ñ;Ô;ð 	Ø×ÒØØ—’˜X t¸È�ÑNÔNñô ð ð
 ð 	8ð ×ÒØ"Ø”Ð!Ø4Ð4Ð4Ð4Ð4Ø!Ø"ð  ñ ô ð ð �NŠN˜8¨hˆNÑ7Ô7Ð7àŒ×Ò˜zÑ*Ô*Ð*õ 	ŒØŒL×Ò˜hÑ'Ô'ØŒL×Ò˜jÑ)Ô)Øð	
ñ 	
ô 	
ð 	
ð
 ×2Ò2°:Ñ>Ô>ˆ	ØÐ Ø/8Ñ,ˆMÐ,ÝŒMØ”×!Ò! -Ñ0Ô0Ø”×!Ò!Ð"3Ñ4Ô4Øðñ ô ð ð
 ˆ~ð —’Ð0¸8�ÑDÔDÐDÐDÐDð !Ð ð ˆ~r    c                 ó  — |                       ¦   «          | j        }|                     |¦  «        s¥|                      |¦  «        }d}| j        r/| j        j        j        �| j        j                             ¦   «         }|                     |¦  «        r| 	                    |¦  «         |�*|                     |¦  «        r| 	                    |¦  «         dS |                      |¦  «        }|  
                    |¦  «        }|                     |¦  «        rQt          j        |                     |¦  «        |                     |¦  «        ¦  «        r| 	                    |¦  «         n|                     ||d¬¦  «         |�†|\  }}|                     |¦  «        rRt          j        |                     |¦  «        |                     |¦  «        ¦  «        r| 	                    |¦  «         dS |                     ||d¬¦  «         dS dS )zRestore dirstate by backup fileNT)rÞ   )rì   r   r)  r+  r>   re   r   rj  r0  r`  r6  r   Úsamefiler   Úrename)	r   rS  r-  Úorý   Ú	data_filer=  Údata_backupÚtargets	            r   Úrestorebackupzdirstate.restorebackupë  sô  € ð 	�ŠÑÔÐØŒLˆØ�xŠx˜
Ñ#Ô#ð 
	à×+Ò+¨BÑ/Ô/ˆHØˆIØÔ$ð =¨¬Ô)9Ô)>Ð)JØ œIÔ,×:Ò:Ñ<Ô<�	Ø�xŠx˜Ñ!Ô!ð #Ø—’˜Ñ"Ô"Ð"ØÐ$¨¯ª°)Ñ)<Ô)<Ð$Ø—’˜Ñ#Ô#Ð#ØˆFØ×'Ò'¨Ñ+Ô+ˆØ×)Ò)¨*Ñ5Ô5ˆ	Ø�8Š8�HÑÔð 	<¥$¤-Ø�FŠF�:ÑÔ §¢ xÑ 0Ô 0ñ#
ô #
ð 	<ð �HŠH�ZÑ Ô Ð Ð à�HŠH�Z °dˆHÑ;Ô;Ð;àÐ Ø"+ÑˆK˜Ø�xŠx˜ÑÔð ?¥D¤MØ—’�{Ñ#Ô# Q§V¢V¨F¡^¤^ñ%ô %ð ?ð —’˜Ñ%Ô%Ð%Ð%Ð%à—’˜ f¸�Ñ>Ô>Ð>Ð>Ð>ð !Ð r    c                 óÔ   — | j         }|                     |¦  «        rI|                      |¦  «        }|                     |¦  «         |�|                     |d         ¦  «         dS dS dS )zClear backup fileNr   )r   r)  r6  r`  )r   rS  r-  rC  rE  s        r   Úclearbackupzdirstate.clearbackup  sv   € àŒLˆØ�8Š8�JÑÔð 	)Ø×/Ò/°
Ñ;Ô;ˆKØ�HŠH�ZÑ Ô Ð ØÐ&Ø—’˜ QœÑ(Ô(Ð(Ð(Ð(ð		)ð 	)ð 'Ð&r    c              #   ó  K  — d}d}d}d}|                       ¦   «         D ]=\  }}|j        }	|	dv r||vr|||	fV — |	dv r||v r|||	fV — |	dv r||vr||vr|||	fV — Œ>|D ]'}|                      |¦  «        j        }	|	dvr|||	fV — Œ(d	S )
zEcheck the dirstate content again the parent manifest and yield errorss%   %s in state %s, but not in manifest1
s&   %s in state %s, but also in manifest1
s+   %s in state %s, but not in either manifest
s(   %s in manifest1, but listed as state %s
s   nró   aó   ms   nrmN)rÅ   Ústater�   )
r   Úm1Úm2Úmissing_from_p1Úunexpected_in_p1Úmissing_from_psÚmissing_from_dsry   r¥   rM  s
             r   Úverifyzdirstate.verify  sþ   è è € àCˆØEÐØIˆØFˆØŸ
š
™œð 	2ð 	2‰HˆAˆuØ”KˆEØ˜ˆ~ˆ~ !¨2 + +Ø&¨¨5Ð1Ð1Ð1Ð1Ø˜ˆ}ˆ}  b  Ø'¨¨EÐ2Ð2Ð2Ð2Ø˜ˆ}ˆ} ¨"  °¸"°°Ø&¨¨5Ð1Ð1Ð1Ð1øØð 	2ð 	2ˆAØ—N’N 1Ñ%Ô%Ô+ˆEØ˜FÐ"Ð"Ø&¨¨5Ð1Ð1Ð1Ð1øð	2ð 	2r    )Fr   )FFN)FN)FF)T)Rr"   r#   r$   rZ   r_   Ú
contextlibÚcontextmanagerrb   r.   Úpropertycachere   Úpropertyrg   r   rm   r]   rs   r(   r‚   rˆ   r‹   r�   r“   r*   r«   rQ   r®   r·   r�   r¿   rÃ   rÅ   Ú	iteritemsro   rË   rÎ   rÑ   rÔ   rØ   rè   rì   ró   rö   rø   r;   rü   r  r  r
  r7   r  r  rû   rî   r-  r3  r%  r7  r9  rJ  rL  rã   ra  re  rQ  r[  rn  r}   r„  r°  rÞ  rû  rè  r)  r+  r.  r1  r6  r?  rG  rI  rT  r&   r    r   r   r   [   s—  € € € € € ð ð,ð ,ð ,ð ,ð\ð ð ð Ôð!ð !ñ Ôð!ð 'ð 'ð 'ð ð	ð 	ñ „]ð	ð ð%ð %ñ „Xð%ð  €YˆyÑÔðð ñ Ôðð ð#ð #ñ „Xð#ð*ð *ð *ð €Yˆ|ÑÔðMð Mñ ÔðMð ðOð Oñ „]ðOð ð*ð *ñ „]ð*ð ð0ð 0ñ „]ð0ð ð<ð <ñ „]ð<ð!ð !ð !ð
5ð 5ð 5ðn ð!ð !ñ „]ð!ðð ð ð(ð ð ð ðð ð ð ð  ð  ð'ð 'ð 'ð!ð !ð !ð €Ið5ð 5ð 5ð+ð +ð +ð+ð +ð +ð ð9ð 9ñ „Xð9ð.ð .ð .ð=ð =ð =ð =ð4ð ð ð ð ð ð	.ð 	.ð 	.ð1ð 1ð 1ð!ð !ð !ð  ðð ð ñ  Ôðð*  ðð ñ  Ôðð  ð9ð 9ñ  Ôð9ð  ð/ð /ñ  Ôð/ð
 ð%
ð %
ñ Ôð%
ðN ð ØØð)
ð )
ð )
ñ Ôð)
ðV%ð %ð %ð"
=ð 
=ð 
=ðð ð ð4
ð 
ð 
ð 
ðð ð ð ð ð ð ð ð,ð ð ð4ð 4ð 4ð 4ðl"ð "ð "ð0ð 0ð 0ðB'ð 'ð 'ð	5ð 	5ð 	5ð(ð (ð (ð"ð "ð "ðð ð ð	ð 	ð 	ðð ð ð,E0ð E0ð E0ðN}ð }ð }ð }ð~P ð P ð P ðdR0ð R0ð R0ðh-ð -ð -ð*"ð "ð "ð(ð (ð (ð
Dð Dð DðMð Mð Mð3Eð 3Eð 3Eðj!?ð !?ð !?ðF)ð )ð )ð2ð 2ð 2ð 2ð 2r    ).rv  rU  r™   r‡  rj  Úi18nr   r   r   Úhgdemandimportr   Ú r   r   r	   r
   r~   r   r   r   r   r   Údirstateutilsr   r3  r   Ú
interfacesr   ÚintdirstateÚinterfaceutilÚ	importmodr   Ú
importrustrç  ÚHAS_FAST_DIRSTATE_V2rW  Ú	filecacheÚ	rangemaskr  r¼   r   r(   r7   r;   ÚimplementerÚ	idirstater&   r    r   ú<module>rh     sT  ðð Ð Ð Ð Ø Ð Ð Ð Ø 	€	€	€	Ø €€€Ø €€€à Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð à "Ð "Ð "Ð "Ð "Ð "ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ðð ð ð ð ð ð ð ð
ð ð ð ð ð ð ð ð
 ˆ&Ô
˜9Ñ
%Ô
%€Ø
ˆ&Ô
˜JÑ
'Ô
'€à dÐ*Ð àÔ"€ØÔ€	ØÔ"€
àÔ'€ð'ð 'ð 'ð 'ð '�	ñ 'ô 'ð 'ð ð  ð  ð  ð  �	ñ  ô  ð  ðð ð ðð ð ð €Ô˜;Ô0Ñ1Ô1ðL2ð L2ð L2ð L2ð L2ñ L2ô L2ñ 2Ô1ðL2ð L2ð L2r    