
    	^c
                         d dl Z d dlmZ d dlmZ d dlmZmZmZ d dl	m
Z
 ddlmZmZmZ dd	Zej        gej        gej        gej        gd
Z e j        d          Zd ZdS )    N)_)getattr)errorhgutil)urlutil   )lfutil
localstore	wirestoreFc                    || j         }|st          | dd           }|rt          j        d| ||          }nt          j        d| ||          \  }}| 3t          j        d| |d          \  }}t          j        | p|i |          }n>|dk    s|dk    r| }n/t          j        |          \  }}t          j        | p|i |          }t          j	        |d          r|
                                p|j        }t                              |          }|sd}n|                    d          }	 t          |         }	n2# t           $ r% t#          j        t'          d	          |z            w xY w|	D ]&}
	  |
|| |          c S # t(          j        $ r Y #w xY wt#          j        t'          d
          t          j        |          z            )Nlfpullsources   lfpullsources   lfss   defaults   default-pushs   url   filer	   s   unsupported URL scheme %rs*   %s does not appear to be a largefile store)uir   r   get_unique_push_pathget_unique_pull_pathr   peerparseurlr   safehasattrurlpath
_scheme_rematchgroup_storeproviderKeyErrorr   Abortr   r
   storeprotonotcapablehidepassword)reporemoteputr   r   r   	_branchesr   schemestoreprovidersclassobjs              ?/usr/lib/python3/dist-packages/hgext/largefiles/storefactory.py	openstorer(      s%   	zW 3t^T:: 	/r< DD &:r< OD) <%:b* OD) WTZRT22FF_$$
(:(:FF%.t44OD)WTZRT22F FF++<

KDT""E  QD'/ D D Dk!899FBCCCD #  	8Bf-----* 	 	 	D	 +	
788

t
$
$	%  s   )D7 7/E&.E==FF)r   s   https   httpss   sshs   ^([a-zA-Z0-9+-.]+)://c                 l    t          j        t          |                               |                    S )N)r   )r   chunkbufferr(   _get)r   hashs     r'   getlfiler-   ^   s,    I,,,11$77888    )NNFN)remercurial.i18nr   mercurial.pycompatr   	mercurialr   r   r   mercurial.utilsr    r
   r   r   r(   r   compiler   r-    r.   r'   <module>r7      s*  
 
			       & & & & & &         
              5 5 5 5r #$!""# !	  RZ122
9 9 9 9 9r.   