
    6h;                       % S SK Jr  S SKrS SKrS SKr\R
                  (       a
  S SKJrJrJr  Sr	S\
S'   SSS	S
SSSS.rS\
S'    SSKJr  \R                  r	S\
S'   S\R                   ;   a  Sr	S\
S'   \R"                  R%                  S5      (       a#  \R"                  S   R'                  S5      r	S\
S'   S'S jrSSSSSS.rS\
S'   SSSSS .rS!\
S"'   S(S# jrS)S$ jrS*S% jr S+   S,S& jjrg! \ a     Nf = f)-    )annotationsN)DictOptionalTuple   allowbytespolicy)cextN)r
   pure)cffiN)r   r   )Nr   )   cr      cffis
   cffi-allows   pys   rust+cs   rust+c-allowz0Dict[bytes, Tuple[Optional[str], Optional[str]]]_packageprefs   )__modulepolicy____pypy__r   HGMODULEPOLICYzutf-8c                    0 n[        U [        5       X!/SS9n [        X15      =X!'   n[        USS 5        X!   $ ! [         a    [	        SU-  5      ef = f)Nr   )levelzcannot import name %s__doc__)
__import__globalsgetattrAttributeErrorImportError)pkgnamemodname
fakelocalspkgmods        2/usr/lib/python3/dist-packages/mercurial/policy.py_importfromr"   C   sk    J
WgiYa
HC=$+C$99
c CD!	  =1G;<<=s	   9 A         ))r
   base85)r
   bdiff)r
   mpatch)r
   osutilr
   parserszDict[Tuple[str, str], int]_cextversionsr*   )r   r&   )r   
charencode)r   r+   ))r
   r-   )r   r&   )r   r-   )r   r+   z&Dict[Tuple[str, str], Tuple[str, str]]_modredirectsc                t    [         R                  X45      n[        USS 5      nXC:w  a  [        SXX44-  5      eg )Nversionz=cannot import module %s.%s (expected version: %d, actual: %r))r,   getr   r   )r   r   r    expectedactuals        r!   	_checkmodr4   b   sM      '!34HS)T*F123
 	
     c                |    [         [           u  pU(       d	  U(       d   eU(       a9  [        R                  X4X45      u  p4 [        X45      nX1:X  a  [        X4U5        U$ [        R                  X 4X 45      u  p4[        X45      $ ! [         a    [        S[        -  5      ef = f! [         a    U(       d  e  NYf = f)z7Import module according to policy and check API versionzinvalid HGMODULEPOLICY %r)r   r	   KeyErrorr   r.   r1   r"   r4   )r   verpkgpurepkgpnmnr    s         r!   	importmodr<   m   s    @'/ W""F#4v6GH	b%C|"#&J 1G3EFFBr  @5>??@  	 	s   B B& B#&B;:B;c                 ,    [         R                  S5      $ )z;Assuming the policy is a Rust one, tell if it's permissive.s   -allow)r	   endswith r5   r!   _isrustpermissiver@      s    ??9%%r5   c                ,   [         R                  S5      (       d  U$ U(       a  SOSn [        X@5      nUc  U$  [        XQ5      $ ! [         a    [	        5       (       a  Us $ e f = f! [         a"    [	        5       (       a  Us $ [        SU-  5      ef = f)zImport Rust module according to policy and availability.

If policy isn't a Rust one, this returns `default`.

If either the module or its member is not available, this returns `default`
if policy is permissive and raises `ImportError` if not.
s   rustpyo3_rustextrustextzCannot import name %s)r	   
startswithr"   r   r@   r   r   )r   memberdefaultpyo3	dlib_namer    s         r!   
importrustrI      s     W%%"&II)-
 ~
<s##  N  <N1F:;;<s"   A 
A' A$"A$'BB)r   strr   rJ   )r   rJ   r   rJ   returnNone)r   rJ   )rK   bool)NNF)r   rJ   rE   zOptional[str])
__future__r   ossystypingTYPE_CHECKINGr   r   r   r	   __annotations__r    r   modulepolicyr   builtin_module_namesenvironr1   encoder"   r,   r.   r4   r<   r@   rI   r?   r5   r!   <module>rY      sB   # 	 
 	 (   #%
C? 
	"$11FE1 )))FE ::>>"##JJ/077@FE@
 -)  0*2,	95 
*& DI<<'<g  		s   C0 0C98C9