§
    cÌc  ã                   óP  — d Z ddlmZmZmZ ddlmZ  G d„ dej        ¦  «        Z G d„ dej	        ¦  «        Z
 G d„ d	ej        ¦  «        Z G d
„ dej	        ¦  «        Z G d„ dej        ¦  «        Zej	                             e¦  «         ej	                             e¦  «         dS )zbMercurial foreign branch support.

Currently only tells the user that Mercurial is not supported.
é   )Ú
controldirÚerrorsÚ	transport)Úversion_infoc                   ó   — e Zd ZdZdZdS )ÚMercurialUnsupportedErrorÚhgzdMercurial branches are not yet supported. To interoperate with Mercurial, use the fastimport format.N)Ú__name__Ú
__module__Ú__qualname__ÚvcsÚ_fmt© ó    ú</usr/lib/python3/dist-packages/breezy/plugins/hg/__init__.pyr   r      s   € € € € € à
€CðI€D€D€Dr   r   c                   óB   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Z	 	 dd	„Z	d
„ Z
dS )ÚLocalHgDirFormatúMercurial directory format.c                 ó*   — t          | j        ¦  «        ‚©N©ÚNotImplementedErrorÚget_converter©Úselfs    r   r   zLocalHgDirFormat.get_converter+   ó   € Ý! $Ô"4Ñ5Ô5Ð5r   c                 ó   — dS )Nz!Local Mercurial control directoryr   r   s    r   Úget_format_descriptionz'LocalHgDirFormat.get_format_description.   ó   € Ø2Ð2r   c                 ó*   — t          j        | ¦  «        ‚r   ©r   ÚUninitializableFormat©r   r   s     r   Úinitialize_on_transportz(LocalHgDirFormat.initialize_on_transport1   ó   € ÝÔ*¨4Ñ0Ô0Ð0r   c                 ó   — dS ©NFr   r   s    r   Úis_supportedzLocalHgDirFormat.is_supported4   ó   € Øˆur   c                 ó   — dS r'   r   r#   s     r   Úsupports_transportz#LocalHgDirFormat.supports_transport7   r)   r   TNc                 ó"   — t          | ¬¦  «        ‚)N)Úformat©r   ©r   Úallow_unsupportedÚrecommend_upgradeÚbasedirs       r   Úcheck_support_statusz%LocalHgDirFormat.check_support_status:   s   € å'¨tÐ4Ñ4Ô4Ð4r   c                 ól   — t          ¦   «                              |¦  «         t          | j        ¦  «        ‚r   )ÚLocalHgProberÚprobe_transportr   Úopenr#   s     r   r7   zLocalHgDirFormat.open>   ó*   € å‰Œ×'Ò'¨	Ñ2Ô2Ð2Ý! $¤)Ñ,Ô,Ð,r   ©TN©r
   r   r   Ú__doc__r   r   r$   r(   r+   r3   r7   r   r   r   r   r   (   s’   € € € € € Ø%Ð%ð6ð 6ð 6ð3ð 3ð 3ð1ð 1ð 1ðð ð ðð ð ð IMØ%)ð5ð 5ð 5ð 5ð-ð -ð -ð -ð -r   r   c                   óf   — e Zd Zed„ ¦   «         Zed„ ¦   «         Zed„ ¦   «         Zed„ ¦   «         ZdS )r5   c                 ó   — dS )Néd   r   ©Úklassr   s     r   ÚpriorityzLocalHgProber.priorityF   s   € àˆsr   c                 óŒ   — 	 |                       ddg¦  «        S # t          j        t          j        t          j        f$ r Y dS w xY w)Nz.hg/requiresz.hg/00changelog.iF)Úhas_anyÚ_mod_transportÚ
NoSuchFiler   ÚPermissionDeniedÚInvalidHttpResponse)r   s    r   Ú_has_hg_dumb_repositoryz%LocalHgProber._has_hg_dumb_repositoryJ   sV   € ð	Ø×$Ò$ nÐ6IÐ%JÑKÔKÐKøÝÔ)­6Ô+BÝÔ*ð,ð 	ð 	ð 	à�5�5ð	øøøs   ‚ ™&AÁAc                 ó|   — |                       |¦  «        rt          ¦   «         S t          j        |j        ¬¦  «        ‚)z;Our format is present if the transport has a '.hg/' subdir.©Úpath)rH   r   r   ÚNotBranchErrorÚbaser?   s     r   r6   zLocalHgProber.probe_transportR   s<   € ð ×(Ò(¨Ñ3Ô3ð 	&Ý#Ñ%Ô%Ð%ÝÔ#¨¬Ð8Ñ8Ô8Ð8r   c                 ó    — t          ¦   «         gS r   )r   ©Úclss    r   Úknown_formatszLocalHgProber.known_formatsY   ó   € å Ñ"Ô"Ð#Ð#r   N)	r
   r   r   ÚclassmethodrA   ÚstaticmethodrH   r6   rQ   r   r   r   r5   r5   D   s~   € € € € € àðð ñ „[ðð ðð ñ „\ðð ð9ð 9ñ „[ð9ð ð$ð $ñ „[ð$ð $ð $r   r5   c                   óB   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Z	 	 dd	„Z	d
„ Z
dS )ÚSmartHgDirFormatr   c                 ó*   — t          | j        ¦  «        ‚r   r   r   s    r   r   zSmartHgDirFormat.get_convertera   r   r   c                 ó   — dS )Nz!Smart Mercurial control directoryr   r   s    r   r   z'SmartHgDirFormat.get_format_descriptiond   r   r   c                 ó*   — t          j        | ¦  «        ‚r   r!   r#   s     r   r$   z(SmartHgDirFormat.initialize_on_transportg   r%   r   c                 ó   — dS r'   r   r   s    r   r(   zSmartHgDirFormat.is_supportedj   r)   r   c                 ó   — dS r'   r   r#   s     r   r+   z#SmartHgDirFormat.supports_transportm   r)   r   TNc                 ó   — t          ¦   «         ‚r   r.   r/   s       r   r3   z%SmartHgDirFormat.check_support_statusp   s   € å'Ñ)Ô)Ð)r   c                 ól   — t          ¦   «                              |¦  «         t          | j        ¦  «        ‚r   )ÚSmartHgProberr6   r   r7   r#   s     r   r7   zSmartHgDirFormat.opent   r8   r   r9   r:   r   r   r   rV   rV   ^   s’   € € € € € Ø%Ð%ð6ð 6ð 6ð3ð 3ð 3ð1ð 1ð 1ðð ð ðð ð ð IMØ%)ð*ð *ð *ð *ð-ð -ð -ð -ð -r   rV   c                   ón   — e Zd ZddgZed„ ¦   «         Zed„ ¦   «         Zed„ ¦   «         Zed„ ¦   «         Z	dS )r^   ÚhttpÚhttpsc                 ó   — d|j         v rdS dS )Nr	   éZ   éc   )rM   r?   s     r   rA   zSmartHgProber.priority   s   € à�9”>Ð!Ð!Ø�2ð ˆrr   c                 óR  — ddl m} |                     |¦  «        }|                     d¬¦  «        }|                     |¦  «        }|                      d|ddi¬¦  «        }|j        d	k    rd
S |j        dk    rd
S |                     d¦  «        }|€d
S |                     d¦  «        S )zøCheck if there is a Mercurial smart server at the remote location.

        :param transport: Transport to check
        :param externa_url: External URL for transport
        :return: Boolean indicating whether transport is backed onto hg
        é    )Úurlparsezcmd=capabilities)ÚqueryÚGETÚAcceptzapplication/mercurial-0.1)Úheadersi”  Fi–  zContent-TypeNzapplication/mercurial)Úbreezy.urlutilsrg   Ú_replaceÚ
urlunparseÚrequestÚstatusÚ	getheaderÚ
startswith)r   Úexternal_urlrg   Ú
parsed_urlÚurlÚrespÚcts          r   Ú_has_hg_http_smart_serverz'SmartHgProber._has_hg_http_smart_server‡   sÎ   € ð 	-Ð,Ð,Ð,Ð,Ð,Ø×&Ò& |Ñ4Ô4ˆ
Ø×(Ò(Ð/AÐ(ÑBÔBˆ
Ø×!Ò! *Ñ-Ô-ˆØ× Ò Ø�3 Ð+FÐ Gð !ñ Iô IˆàŒ;˜#ÒÐØ�5ØŒ;˜#ÒÐà�5Ø�^Š^˜NÑ+Ô+ˆØˆ:Ø�5Ø�}Š}Ð4Ñ5Ô5Ð5r   c                 ó
  — 	 |                      ¦   «         }n-# t          j        $ r t          j        |j        ¬¦  «        ‚w xY w|                     d¦  «        d         }|| j        vrt          j        |j        ¬¦  «        ‚ddlm} | 	                    |¦  «        }| 
                    d¦  «        s| 
                    d¦  «        r$|                      ||¦  «        rt          ¦   «         S t          j        |j        ¬¦  «        ‚)NrJ   ú:rf   )Úurlutilszhttp:zhttps:)rs   r   ÚInProcessTransportrL   rM   ÚsplitÚ_supported_schemesÚbreezyr{   Ústrip_segment_parametersrr   rx   rV   )r@   r   rs   Úschemer{   s        r   r6   zSmartHgProber.probe_transportŸ   s  € ð	=Ø$×1Ò1Ñ3Ô3ˆLˆLøÝÔ(ð 	=ð 	=ð 	=ÝÔ'¨Y¬^Ð<Ñ<Ô<Ð<ð	=øøøà×#Ò# CÑ(Ô(¨Ô+ˆØ˜Ô1Ð1Ð1ÝÔ'¨Y¬^Ð<Ñ<Ô<Ð<Ø#Ð#Ð#Ð#Ð#Ð#Ø×8Ò8¸ÑFÔFˆð ×#Ò# GÑ,Ô,ð 	*Ø×'Ò'¨Ñ1Ô1ð	*à×.Ò.¨y¸,ÑGÔGð *Ý'Ñ)Ô)Ð)ÝÔ#¨¬Ð8Ñ8Ô8Ð8s	   ‚ —*Ac                 ó    — t          ¦   «         gS r   )rV   rO   s    r   rQ   zSmartHgProber.known_formats²   rR   r   N)
r
   r   r   r~   rS   rA   rT   rx   r6   rQ   r   r   r   r^   r^   z   s‹   € € € € € ð ! 'Ð*Ðàðð ñ „[ðð ð6ð 6ñ „\ð6ð. ð9ð 9ñ „[ð9ð$ ð$ð $ñ „[ð$ð $ð $r   r^   N)r;   Ú r   r   r   rD   r   ÚUnsupportedVcsr   ÚControlDirFormatr   ÚProberr5   rV   r^   Úregister_proberr   r   r   ú<module>rˆ      su  ðð"ð ð
ð ð ð ð ð ð ð ð ð ð Ð Ð Ð Ð Ð ðJð Jð Jð Jð J Ô 5ñ Jô Jð Jð-ð -ð -ð -ð -�zÔ2ñ -ô -ð -ð8$ð $ð $ð $ð $�JÔ%ñ $ô $ð $ð4-ð -ð -ð -ð -�zÔ2ñ -ô -ð -ð8:$ð :$ð :$ð :$ð :$�JÔ%ñ :$ô :$ð :$ðz Ô × +Ò +¨MÑ :Ô :Ð :Ø 
Ô × +Ò +¨MÑ :Ô :Ð :Ð :Ð :r   