
    6h9                    N    S r SSKJr  SSKJrJr   " S S\R
                  5      rg)z6largefile store working over Mercurial's wire protocol    )annotations   )lfutilremotestorec                  :   ^  \ rS rSrU 4S jrS rS rS rSrU =r	$ )	wirestore   c                  > UR                  S5      nU(       d  [        R                  " / 5      eUR                  S5      nSU;  a  [        R                  " U5      eX0l        [
        TU ]  XUR                  5       5        g )Ns
   largefiles   ,s   serve)capabler   storeprotonotcapablesplitremotesuper__init__url)selfuirepor   cap
storetypes	__class__s         </usr/lib/python3/dist-packages/hgext/largefiles/wirestore.pyr   wirestore.__init__   se    nn]+--b11YYt_
:%--j996::<0    c                8    U R                   R                  X5      $ N)r   putlfile)r   hashfds      r   _putwirestore._put   s    {{##D--r   c                8    U R                   R                  U5      $ r   )r   getlfile)r   r   s     r   _getwirestore._get   s    {{##D))r   c           
     "   U R                   R                  5        n/ nU H(  nUR                  UUR                  SSU05      45        M*     U VVs0 s H  u  pEXER	                  5       _M     snnsSSS5        $ s  snnf ! , (       d  f       g= f)zFor each hash, return 0 if it is available, other values if not.
It is usually 2 if the largefile is missing, but might be 1 the server
has a corrupted copy.s	   statlfiles   shaN)r   commandexecutorappendcallcommandresult)r   hashesefsr   fs         r   _statwirestore._stat!   s    
 [[((*aB		( &
  577BD((*$B7 +* 8 +*s   6B A:-B :B  
B)r   )
__name__
__module____qualname____firstlineno__r   r!   r%   r0   __static_attributes____classcell__)r   s   @r   r   r      s    1.*8 8r   r   N)__doc__
__future__r    r   r   r    r   r   <module>r<      s$    = "%8'' %8r   