§
    	^µcÂ	  ã                   ód   — d Z ddlmZ ddlmZ ddlmZ ddlmZm	Z	  G d„ dej        ¦  «        Z
d	S )
z store class for local filesystemé    )Ú_)Úopen)Úutilé   )Ú	basestoreÚlfutilc                   ó:   ‡ — e Zd ZdZˆ fd„Zd„ Zd„ Zd„ Zd„ Zˆ xZ	S )Ú
localstorez¦localstore first attempts to grab files out of the store in the remote
    Mercurial repository.  Failing that, it attempts to grab the files from
    the user cache.c                 ó¼   •— |                      ¦   «         | _        t          t          | ¦  «                             ||| j                             ¦   «         ¦  «         d S ©N)ÚlocalÚremoteÚsuperr
   Ú__init__Úurl)ÚselfÚuiÚrepor   Ú	__class__s       €ú=/usr/lib/python3/dist-packages/hgext/largefiles/localstore.pyr   zlocalstore.__init__   sF   ø€ Ø—l’l‘n”nˆŒÝ�j˜$ÑÔ×(Ò(¨¨T°4´;·?²?Ñ3DÔ3DÑEÔEÐEÐEÐEó    c                 ó˜   — t          j        | j        |¦  «        rd S t          j        |t          j        | j        |¦  «        ¦  «         d S r   )r   Úinstorer   ÚlinkÚ	storepath)r   ÚsourceÚhashs      r   Úputzlocalstore.put   sD   € ÝŒ>˜$œ+ tÑ,Ô,ð 	ØˆFÝŒ�F�FÔ,¨T¬[¸$Ñ?Ô?Ñ@Ô@Ð@Ð@Ð@r   c                 óN   — i }|D ]}t          j        | j        |¦  «        ||<   Œ |S r   )r   r   r   )r   ÚhashesÚretvalr   s       r   Úexistszlocalstore.exists#   s4   € ØˆØð 	=ð 	=ˆDÝ!œ>¨$¬+°tÑ<Ô<ˆF�4‰LˆLØˆr   c                 ó.  — t          j        | j        |¦  «        }|s)t          j        ||| j        t          d¦  «        ¦  «        ‚t          |d¦  «        5 }t          j        t          j
        |¦  «        |¦  «        cd d d ¦  «         S # 1 swxY w Y   d S )Ns   can't get file locallys   rb)r   Úfindfiler   r   Ú
StoreErrorr   r   r   Úcopyandhashr   Úfilechunkiter)r   ÚtmpfileÚfilenamer   ÚpathÚfds         r   Ú_getfilezlocalstore._getfile)   sç   € ÝŒ˜tœ{¨DÑ1Ô1ˆØð 	ÝÔ&Ø˜$ ¤­!Ð,EÑ*FÔ*Fñô ð õ �$˜ÑÔð 	G "ÝÔ%¥dÔ&8¸Ñ&<Ô&<¸gÑFÔFð	Gð 	Gð 	Gð 	Gñ 	Gô 	Gð 	Gð 	Gð 	Gð 	Gð 	Gð 	Gøøøð 	Gð 	Gð 	Gð 	Gð 	Gð 	Gs   Á'B
Â
BÂBc                 óŽ  — d}|D ]¿\  }}}t          j        | j        |¦  «        \  }}|st          j        | j        |¦  «        \  }}|s0| j                             t          d¦  «        |||fz  ¦  «         d}Œt|rIt          j        |¦  «        }	|	|k    r/| j                             t          d¦  «        |||fz  ¦  «         d}ŒÀ|S )NFs'   changeset %s: %s references missing %s
Ts)   changeset %s: %s references corrupted %s
)r   Úfindstorepathr   r   r   Úwarnr   Úhashfile)
r   ÚcontentsÚfilestocheckÚfailedÚcsetr)   Úexpectedhashr   r"   Ú
actualhashs
             r   Ú_verifyfileszlocalstore._verifyfiles2   s  € ØˆØ,8ð 	"ð 	"Ñ(ˆD�(˜LÝ &Ô 4°T´YÀÑ MÔ MÑˆI�vØð Ý$*Ô$8Ø”K ñ%ô %Ñ!�	˜6ð ð "Ø”—’ÝÐAÑBÔBØ˜X yÐ1ñ2ñô ð ð ��Øð "Ý#œ_¨YÑ7Ô7�
Ø Ò-Ð-Ø”G—L’LÝÐGÑHÔHØ ¨9Ð5ñ6ñô ð ð "�FøØˆr   )
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r"   r,   r7   Ú__classcell__)r   s   @r   r
   r
      s‰   ø€ € € € € ðð ðFð Fð Fð Fð FðAð Að Að
ð ð ðGð Gð Gðð ð ð ð ð ð r   r
   N)r;   Úmercurial.i18nr   Úmercurial.pycompatr   Ú	mercurialr   Ú r   r   r
   © r   r   ú<module>rB      s¢   ðð 'Ð &à Ð Ð Ð Ð Ð Ø #Ð #Ð #Ð #Ð #Ð #Ø Ð Ð Ð Ð Ð ðð ð ð ð ð ð ð ð3ð 3ð 3ð 3ð 3�Ô$ñ 3ô 3ð 3ð 3ð 3r   