§
    cÌc†c  ã                   ó²  — d Z ddlZddlmZmZmZmZ ddlmZ ddl	m
Z
mZ ddlmZ d	d
lmZmZmZ  G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ de¦  «        Z G d„ d e¦  «        Z G d!„ d"e¦  «        Z G d#„ d$e¦  «        Z G d%„ d&e¦  «        Z G d'„ d(e¦  «        Z  G d)„ d*e¦  «        Z! G d+„ d,e¦  «        Z" G d-„ d.e¦  «        Z# G d/„ d0e¦  «        Z$ G d1„ d2e¦  «        Z% G d3„ d4e¦  «        Z&dS )5z2Server-side bzrdir related request implmentations.é    Né   )ÚbranchÚerrorsÚ
repositoryÚurlutilsé   )Ú	BzrProber)ÚBzrDirÚBzrDirFormat)Únetwork_format_registryé   )ÚFailedSmartServerResponseÚSmartServerRequestÚSuccessfulSmartServerResponsec                   ó   — e Zd Zd„ ZdS )ÚSmartServerRequestOpenBzrDirc                 ó  — 	 |                       |¦  «        }t          ¦   «         }	 |                     |¦  «         d}n:# t          j        t          j        f$ r d}Y nw xY w# t          j        $ r d}Y nw xY wt          |f¦  «        S ©Nó   yesó   no)Útransport_from_client_pathr	   Úprobe_transportr   ÚNotBranchErrorÚUnknownFormatErrorÚPathNotChildr   )ÚselfÚpathÚtÚ
bzr_proberÚanswers        ú9/usr/lib/python3/dist-packages/breezy/bzr/smart/bzrdir.pyÚdozSmartServerRequestOpenBzrDir.do.   sµ   € ð	 Ø×/Ò/°Ñ5Ô5ˆAõ #™œˆJð Ø×*Ò*¨1Ñ-Ô-Ð-ð  ��øõ Ô)­6Ô+DÐEð ð ð Ø���ðøøøøõ Ô"ð 	ð 	ð 	ð ˆFˆFˆFð	øøøõ -¨f¨YÑ7Ô7Ð7s    ‚A! ¦> ¾AÁAÁ!A5Á4A5N©Ú__name__Ú
__module__Ú__qualname__r"   © ó    r!   r   r   ,   s#   € € € € € ð8ð 8ð 8ð 8ð 8r(   r   c                   ó   — e Zd Zd„ ZdS )Ú SmartServerRequestOpenBzrDir_2_1c                 ó2  — 	 |                       |¦  «        }n$# t          j        $ r t          d¦  «        cY S w xY w	 t	          j        |¦  «        }d}|                     ¦   «         r|dz  }n|dz  }n# t          j        $ r d}Y nw xY wt          |¦  «        S )z_Is there a BzrDir present, and if so does it have a working tree?

        New in 2.1.
        ©r   ©r   )r   r   r   r   r
   Úopen_from_transportÚhas_workingtreer   )r   r   r   Úbdr    s        r!   r"   z#SmartServerRequestOpenBzrDir_2_1.doE   sÑ   € ð
	;Ø×/Ò/°Ñ5Ô5ˆAˆAøÝÔ"ð 	;ð 	;ð 	;õ 1°Ñ:Ô:Ð:Ð:Ð:ð	;øøøð		#ÝÔ+¨AÑ.Ô.ˆBð ˆFØ×!Ò!Ñ#Ô#ð #Ø˜)Ñ#��à˜(Ñ"��øõ Ô$ð 	ð 	ð 	ØˆFˆFˆFð	øøøõ -¨VÑ4Ô4Ð4s   ‚ ˜9¸9½A3 Á3BÂBNr#   r'   r(   r!   r*   r*   C   s#   € € € € € ð5ð 5ð 5ð 5ð 5r(   r*   c                   ó&   — e Zd Zd„ Zd„ Zd„ Zd„ ZdS )ÚSmartServerRequestBzrDirc                 óÈ   — 	 t          j        |                      |¦  «        ¦  «        | _        n+# t          j        $ r}t          d¦  «        cY d}~S d}~ww xY w | j        |Ž S )zBOpen a BzrDir at path, and return `self.do_bzrdir_request(*args)`.©s   nobranchN)r
   r.   r   Ú_bzrdirr   r   r   Údo_bzrdir_request)r   r   ÚargsÚes       r!   r"   zSmartServerRequestBzrDir.do_   s}   € ð	=Ý!Ô5Ø×/Ò/°Ñ5Ô5ñ7ô 7ˆDŒLˆLøåÔ$ð 	=ð 	=ð 	=Ý,¨^Ñ<Ô<Ð<Ð<Ð<Ð<Ð<Ð<øøøøð	=øøøà%ˆtÔ% tÐ,Ð,s   ‚,/ ¯A¾AÁAÁAc                 ó   — |rdS dS r   r'   )r   Ú	a_booleans     r!   Ú_boolean_to_yes_noz+SmartServerRequestBzrDir._boolean_to_yes_noh   s   € Øð 	Ø�6à�5r(   c                 ó¨   — |                       |j        ¦  «        }|                       |j        ¦  «        }|                       |j        ¦  «        }|||fS ©N)r;   Úrich_root_dataÚsupports_tree_referenceÚsupports_external_lookups)r   Úrepo_formatÚ	rich_rootÚtree_refÚexternal_lookups        r!   Ú_format_to_capabilitiesz0SmartServerRequestBzrDir._format_to_capabilitiesn   s[   € Ø×+Ò+¨KÔ,FÑGÔGˆ	Ø×*Ò*ØÔ/ñ1ô 1ˆà×1Ò1ØÔ1ñ3ô 3ˆà˜( OÐ3Ð3r(   c                 óÚ   — |j                              |j        ¦  «        }t          |¦  «        r'dgt          |                     d¦  «        ¦  «        z  }ng }d                     |¦  «        S )z<Get the relative path for repository from current_transport.z..ú/)Úuser_transportÚrelpathÚbaseÚlenÚsplitÚjoin)r   Úcurrent_transportr   rI   Úsegmentss        r!   Ú_repo_relpathz&SmartServerRequestBzrDir._repo_relpathv   si   € ð Ô+×3Ò3ØÔ"ñ$ô $ˆåˆw‰<Œ<ð 	Ø�v¥ G§M¢M°#Ñ$6Ô$6Ñ 7Ô 7Ñ7ˆHˆHàˆHØ�xŠx˜Ñ!Ô!Ð!r(   N)r$   r%   r&   r"   r;   rE   rP   r'   r(   r!   r2   r2   ]   sP   € € € € € ð-ð -ð -ðð ð ð4ð 4ð 4ð
"ð 
"ð 
"ð 
"ð 
"r(   r2   c                   ó   — e Zd Zdd„ZdS )Ú%SmartServerBzrDirRequestDestroyBranchNc                 óÜ   — 	 | j                              |�|                     d¦  «        nd¦  «         n+# t          j        $ r}t          d¦  «        cY d}~S d}~ww xY wt          d¦  «        S )znDestroy the branch with the specified name.

        New in 2.5.0.
        :return: On success, 'ok'.
        Núutf-8r4   ©ó   ok)r5   Údestroy_branchÚdecoder   r   r   r   ©r   Únamer8   s      r!   r6   z7SmartServerBzrDirRequestDestroyBranch.do_bzrdir_request…   s�   € ð	=ØŒL×'Ò'Ø(,Ð(8�—’˜GÑ$Ô$Ð$¸dñDô Dð Dð DøåÔ$ð 	=ð 	=ð 	=Ý,¨^Ñ<Ô<Ð<Ð<Ð<Ð<Ð<Ð<øøøøð	=øøøå,¨XÑ6Ô6Ð6s   ‚14 ´AÁAÁAÁAr=   ©r$   r%   r&   r6   r'   r(   r!   rR   rR   ƒ   ó(   € € € € € ð7ð 7ð 7ð 7ð 7ð 7r(   rR   c                   ó   — e Zd Zdd„ZdS )Ú&SmartServerBzrDirRequestHasWorkingTreeNc                 óp   — | j                              ¦   «         rt          d¦  «        S t          d¦  «        S )z§Check whether there is a working tree present.

        New in 2.5.0.

        :return: If there is a working tree present, 'yes'.
            Otherwise 'no'.
        r-   r,   )r5   r/   r   )r   rZ   s     r!   r6   z8SmartServerBzrDirRequestHasWorkingTree.do_bzrdir_request•   s6   € ð Œ<×'Ò'Ñ)Ô)ð 	<Ý0°Ñ<Ô<Ð<å0°Ñ;Ô;Ð;r(   r=   r[   r'   r(   r!   r^   r^   “   s(   € € € € € ð<ð <ð <ð <ð <ð <r(   r^   c                   ó   — e Zd Zdd„ZdS )Ú)SmartServerBzrDirRequestDestroyRepositoryNc                 ó¬   — 	 | j                              ¦   «          n+# t          j        $ r}t	          d¦  «        cY d}~S d}~ww xY wt          d¦  «        S )z[Destroy the repository.

        New in 2.5.0.

        :return: On success, 'ok'.
        ©s   norepositoryNrU   )r5   Údestroy_repositoryr   ÚNoRepositoryPresentr   r   rY   s      r!   r6   z;SmartServerBzrDirRequestDestroyRepository.do_bzrdir_request¥   sq   € ð	AØŒL×+Ò+Ñ-Ô-Ð-Ð-øÝÔ)ð 	Að 	Að 	AÝ,Ð-?Ñ@Ô@Ð@Ð@Ð@Ð@Ð@Ð@øøøøð	Aøøøå,¨XÑ6Ô6Ð6s   ‚ œA«?¹A¿Ar=   r[   r'   r(   r!   ra   ra   £   r\   r(   ra   c                   ó   — e Zd Zd„ ZdS )Ú&SmartServerBzrDirRequestCloningMetaDirc                 óº  — 	 | j                              ¦   «         }n# t          j        $ r d}Y nw xY w|�t	          d¦  «        S |dk    rd}nd}| j                              |¬¦  «        }|                     ¦   «         }|j        sBd|                     ¦   «                              ¦   «         f}|j	                             ¦   «         }nd}d	}t          |||f¦  «        S )
a®  Get the format that should be used when cloning from this dir.

        New in 1.13.

        :return: on success, a 3-tuple of network names for (control,
            repository, branch) directories, where '' signifies "not present".
            If this BzrDir contains a branch reference then this will fail with
            BranchReference; clients should resolve branch references before
            calling this RPC.
        N©s   BranchReferenceó   TrueTF)Úrequire_stackingó   branch)rl   r(   r(   )r5   Úget_branch_referencer   r   r   Úcloning_metadirÚnetwork_nameÚfixed_componentsÚget_branch_formatÚrepository_formatr   )r   rk   Ú
branch_refÚcontrol_formatÚcontrol_nameÚbranch_nameÚrepository_names          r!   r6   z8SmartServerBzrDirRequestCloningMetaDir.do_bzrdir_requestµ   s  € ð	Øœ×:Ò:Ñ<Ô<ˆJˆJøÝÔ$ð 	ð 	ð 	ØˆJˆJˆJð	øøøàÐ!õ -Ð-BÑCÔCÐCØ˜wÒ&Ð&Ø#ÐÐà$ÐØœ×5Ò5Ø-ð 6ñ /ô /ˆà%×2Ò2Ñ4Ô4ˆØÔ.ð 	"Ø$Ø)×;Ò;Ñ=Ô=×JÒJÑLÔLðNˆKà,Ô>×KÒKÑMÔMˆOˆOð +ˆKØ!ˆOÝ,¨l¸OØ.9ð.;ñ <ô <ð 	<ó   ‚ œ0¯0Nr[   r'   r(   r!   rg   rg   ³   s#   € € € € € ð$<ð $<ð $<ð $<ð $<r(   rg   c                   ó   — e Zd ZdZd„ ZdS )Ú'SmartServerBzrDirRequestCheckoutMetaDira¸  Get the format to use for checkouts.

    New in 2.5.

    :return: on success, a 3-tuple of network names for (control,
        repository, branch) directories, where '' signifies "not present".
        If this BzrDir contains a branch reference then this will fail with
        BranchReference; clients should resolve branch references before
        calling this RPC (they should not try to create a checkout of a
        checkout).
    c                 óœ  — 	 | j                              ¦   «         }n# t          j        $ r d }Y nw xY w|�t	          d¦  «        S | j                              ¦   «         }|                     ¦   «         }|j        s@|                     ¦   «                              ¦   «         }|j	                             ¦   «         }nd}d}t          |||f¦  «        S )Nri   r(   )r5   rm   r   r   r   Úcheckout_metadirro   rp   rq   rr   r   )r   rs   rt   ru   rv   Ú	repo_names         r!   r6   z9SmartServerBzrDirRequestCheckoutMetaDir.do_bzrdir_requesté   sâ   € ð	Øœ×:Ò:Ñ<Ô<ˆJˆJøÝÔ$ð 	ð 	ð 	ØˆJˆJˆJð	øøøàÐ!õ -Ð-BÑCÔCÐCØœ×6Ò6Ñ8Ô8ˆØ%×2Ò2Ñ4Ô4ˆØÔ.ð 	Ø(×:Ò:Ñ<Ô<×IÒIÑKÔKˆKØ&Ô8×EÒEÑGÔGˆIˆIàˆKØˆIÝ,Ø˜9 kÐ2ñ4ô 4ð 	4rx   N)r$   r%   r&   Ú__doc__r6   r'   r(   r!   rz   rz   Ü   s-   € € € € € ð
ð 
ð4ð 4ð 4ð 4ð 4r(   rz   c                   ó   — e Zd Zd„ ZdS )ÚSmartServerRequestCreateBranchc           	      óê  — t          j        |                      |¦  «        ¦  «        }t          j                             |¦  «        }||_        |                     |d¬¦  «        }|                      |j	        j
        ¦  «        \  }}}|j
                             ¦   «         }	|j	        j
                             ¦   «         }
|                      |j        |j	        ¦  «        }t          d|	|||||
f¦  «        S )a®  Create a branch in the bzr dir at path.

        This operates precisely like 'bzrdir.create_branch'.

        If a bzrdir is not present, an exception is propogated
        rather than 'no branch' because these are different conditions (and
        this method should only be called after establishing that a bzr dir
        exists anyway).

        This is the initial version of this method introduced to the smart
        server for 1.13.

        :param path: The path to the bzrdir.
        :param network_name: The network name of the branch type to create.
        :return: ('ok', branch_format, repo_path, rich_root, tree_ref,
            external_lookup, repo_format)
        Ú ©rZ   rV   )r
   r.   r   r   r   ÚgetÚbranch_formatÚ
initializerE   r   Ú_formatro   rP   Úroot_transportr   )r   r   ro   ÚbzrdirÚformatÚresultrB   rC   rD   r…   rA   Ú	repo_paths               r!   r"   z!SmartServerRequestCreateBranch.do  sù   € õ$ Ô+Ø×+Ò+¨DÑ1Ô1ñ3ô 3ˆåÔ/×3Ò3°LÑAÔAˆØ%ˆÔØ×"Ò" 6°Ð"Ñ3Ô3ˆØ/3×/KÒ/KØÔÔ%ñ0'ô 0'Ñ,ˆ	�8˜_àœ×3Ò3Ñ5Ô5ˆØÔ'Ô/×<Ò<Ñ>Ô>ˆØ×&Ò& vÔ'<Ø'-Ô'8ñ:ô :ˆ	õ -¨e°]ÀIØ.7¸À?ÐT_ð.añ bô bð 	br(   Nr#   r'   r(   r!   r€   r€   ÿ   s(   € € € € € ð bð  bð  bð  bð  br(   r€   c                   ó   — e Zd Zd„ ZdS )Ú"SmartServerRequestCreateRepositoryc                 óh  — t          j        |                      |¦  «        ¦  «        }|dk    }t          j                             |¦  «        }||_        |                     ||¬¦  «        }|                      |j	        ¦  «        \  }}}	t          d|||	|j	                             ¦   «         f¦  «        S )aô  Create a repository in the bzr dir at path.

        This operates precisely like 'bzrdir.create_repository'.

        If a bzrdir is not present, an exception is propagated
        rather than 'no branch' because these are different conditions (and
        this method should only be called after establishing that a bzr dir
        exists anyway).

        This is the initial version of this method introduced to the smart
        server for 1.13.

        :param path: The path to the bzrdir.
        :param network_name: The network name of the repository type to create.
        :param shared: The value to pass create_repository for the shared
            parameter.
        :return: (ok, rich_root, tree_ref, external_lookup, network_name)
        rj   )ÚsharedrV   )r
   r.   r   r   r   r„   rr   r†   rE   r‡   r   ro   )
r   r   ro   r�   r‰   rŠ   r‹   rB   rC   rD   s
             r!   r"   z%SmartServerRequestCreateRepository.do&  s¼   € õ& Ô+Ø×+Ò+¨DÑ1Ô1ñ3ô 3ˆà˜7Ò"ˆÝÔ3×7Ò7¸ÑEÔEˆØ#)ˆÔ Ø×"Ò" 6°&Ð"Ñ9Ô9ˆØ/3×/KÒ/KØŒNñ0ô 0Ñ,ˆ	�8˜_å,¨e°YÀØ.=¸v¼~×?ZÒ?ZÑ?\Ô?\ð.^ñ _ô _ð 	_r(   Nr#   r'   r(   r!   rŽ   rŽ   $  s(   € € € € € ð_ð _ð _ð _ð _r(   rŽ   c                   ó   — e Zd Zd„ ZdS )Ú SmartServerRequestFindRepositoryc                 ó*  — t          j        |                      |¦  «        ¦  «        }|                     ¦   «         }|                      |j        |¦  «        }|                      |j        ¦  «        \  }}}|j                             ¦   «         }|||||fS )aÏ  try to find a repository from path upwards

        This operates precisely like 'bzrdir.find_repository'.

        :return: (relpath, rich_root, tree_ref, external_lookup, network_name).
            All are strings, relpath is a / prefixed path, the next three are
            either 'yes' or 'no', and the last is a repository format network
            name.
        :raises errors.NoRepositoryPresent: When there is no repository
            present.
        )	r
   r.   r   Úfind_repositoryrP   rˆ   rE   r‡   ro   )r   r   r‰   r   rB   rC   rD   ro   s           r!   Ú_findz&SmartServerRequestFindRepository._findG  s—   € õ Ô+Ø×+Ò+¨DÑ1Ô1ñ3ô 3ˆà×+Ò+Ñ-Ô-ˆ
Ø×!Ò! &Ô"7¸ÑDÔDˆØ/3×/KÒ/KØÔñ0 ô 0 Ñ,ˆ	�8˜_à!Ô)×6Ò6Ñ8Ô8ˆØ�Y ¨/¸<ÐGÐGr(   N)r$   r%   r&   r•   r'   r(   r!   r’   r’   E  s(   € € € € € ðHð Hð Hð Hð Hr(   r’   c                   ó   — e Zd Zd„ ZdS )Ú"SmartServerRequestFindRepositoryV1c                 óÎ   — 	 |                       |¦  «        \  }}}}}t          d|                     d¦  «        ||f¦  «        S # t          j        $ r t          d¦  «        cY S w xY w)aõ  try to find a repository from path upwards

        This operates precisely like 'bzrdir.find_repository'.

        If a bzrdir is not present, an exception is propagated
        rather than 'no branch' because these are different conditions.

        This is the initial version of this method introduced with the smart
        server. Modern clients will try the V2 method that adds support for the
        supports_external_lookups attribute.

        :return: norepository or ok, relpath.
        rV   rT   rc   ©r•   r   Úencoder   re   r   ©r   r   rB   rC   rD   rZ   s         r!   r"   z%SmartServerRequestFindRepositoryV1.do_  s   € ð	BØ?C¿zºzÈ$Ñ?OÔ?OÑ<ˆD�)˜X ¸Ý0°%¸¿ºÀWÑ9MÔ9MÈyÐZbÐ1cÑdÔdÐdøÝÔ)ð 	Bð 	Bð 	BÝ,Ð-@ÑAÔAÐAÐAÐAð	Bøøøs   ‚A A ÁA$Á#A$Nr#   r'   r(   r!   r—   r—   ]  s(   € € € € € ðBð Bð Bð Bð Br(   r—   c                   ó   — e Zd Zd„ ZdS )Ú"SmartServerRequestFindRepositoryV2c                 óÐ   — 	 |                       |¦  «        \  }}}}}t          d|                     d¦  «        |||f¦  «        S # t          j        $ r t          d¦  «        cY S w xY w)a
  try to find a repository from path upwards

        This operates precisely like 'bzrdir.find_repository'.

        If a bzrdir is not present, an exception is propagated
        rather than 'no branch' because these are different conditions.

        This is the second edition of this method introduced in bzr 1.3, which
        returns information about the supports_external_lookups format
        attribute too.

        :return: norepository or ok, relpath, rich_root, tree_ref,
            external_lookup.
        rV   rT   rc   r™   r›   s         r!   r"   z%SmartServerRequestFindRepositoryV2.dov  sŠ   € ð	BØ?C¿zºzÈ$Ñ?OÔ?OÑ<ˆD�)˜X ¸Ý0Ø˜Ÿš GÑ,Ô,¨i¸À?ÐSñUô Uð UøåÔ)ð 	Bð 	Bð 	BÝ,Ð-@ÑAÔAÐAÐAÐAð	Bøøøs   ‚AA ÁA%Á$A%Nr#   r'   r(   r!   r�   r�   t  s(   € € € € € ðBð Bð Bð Bð Br(   r�   c                   ó   — e Zd Zd„ ZdS )Ú"SmartServerRequestFindRepositoryV3c                 óÒ   — 	 |                       |¦  «        \  }}}}}t          d|                     d¦  «        ||||f¦  «        S # t          j        $ r t          d¦  «        cY S w xY w)a  try to find a repository from path upwards

        This operates precisely like 'bzrdir.find_repository'.

        If a bzrdir is not present, an exception is propogated
        rather than 'no branch' because these are different conditions.

        This is the third edition of this method introduced in bzr 1.13, which
        returns information about the network name of the repository format.

        :return: norepository or ok, relpath, rich_root, tree_ref,
            external_lookup, network_name.
        rV   rT   rc   r™   r›   s         r!   r"   z%SmartServerRequestFindRepositoryV3.do�  s�   € ð	BØ?C¿zºzÈ$Ñ?OÔ?OÑ<ˆD�)˜X ¸Ý0Ø˜Ÿš GÑ,Ô,¨i¸À?ÐTXÐYñ[ô [ð [øåÔ)ð 	Bð 	Bð 	BÝ,Ð-@ÑAÔAÐAÐAÐAð	Bøøøs   ‚AA ÁA&Á%A&Nr#   r'   r(   r!   r    r    �  s(   € € € € € ðBð Bð Bð Bð Br(   r    c                   ó   — e Zd Zd„ ZdS )Ú"SmartServerBzrDirRequestConfigFilec                 óª   — | j                              ¦   «         }|€d}n&|                     ¦   «                              ¦   «         }t	          d|¦  «        S )z‘Get the configuration bytes for a config file in bzrdir.

        The body is not utf8 decoded - it is the literal bytestream from disk.
        Nr(   r'   )r5   Ú_get_configÚ_get_config_fileÚreadr   )r   ÚconfigÚcontents      r!   r6   z4SmartServerBzrDirRequestConfigFile.do_bzrdir_request§  sP   € ð
 ”×)Ò)Ñ+Ô+ˆØˆ>ØˆGˆGà×-Ò-Ñ/Ô/×4Ò4Ñ6Ô6ˆGÝ,¨R°Ñ9Ô9Ð9r(   Nr[   r'   r(   r!   r£   r£   ¥  s#   € € € € € ð
:ð 
:ð 
:ð 
:ð 
:r(   r£   c                   ó   — e Zd Zd„ ZdS )Ú#SmartServerBzrDirRequestGetBranchesc                 óÔ  — | j                              ¦   «         }i }|D ]©}|€d}| j                              |¬¦  «        }|�7t          j        | j         j        |¦  «        }d|                     d¦  «        f}n7| j                              |d¬¦  «        }d|j         	                    ¦   «         f}|||                     d¦  «        <   Œªt          d	t          j        |¦  «        ¦  «        S )
z©Get the branches in a control directory.

        The body is a bencoded dictionary, with values similar to the return
        value of the open branch request.
        Nr(   rƒ   ó   refrT   T)rZ   Úignore_fallbacksrl   )s   success)r5   Úbranch_namesrm   r   Úrelative_urlÚuser_urlrš   Úopen_branchr‡   ro   r   Úbencode)r   r¯   ÚretrZ   rs   ÚvalueÚbs          r!   r6   z5SmartServerBzrDirRequestGetBranches.do_bzrdir_request¶  sð   € ð ”|×0Ò0Ñ2Ô2ˆØˆØ ð 
	.ð 
	.ˆDØˆ|Ø�Øœ×:Ò:ÀÐ:ÑEÔEˆJØÐ%Ý%Ô2°4´<Ô3HÈ*ÑUÔU�
Ø ×!2Ò!2°7Ñ!;Ô!;Ð<��à”L×,Ò,°$ÈÐ,ÑNÔN�Ø" A¤I×$:Ò$:Ñ$<Ô$<Ð=�Ø(-ˆC�—’˜GÑ$Ô$Ñ%Ð%Ý,Ø�GœO¨CÑ0Ô0ñ2ô 2ð 	2r(   Nr[   r'   r(   r!   r«   r«   ´  s#   € € € € € ð2ð 2ð 2ð 2ð 2r(   r«   c                   ó   — e Zd Zd„ ZdS )Ú"SmartServerRequestInitializeBzrDirc                 ó–   — |                       |¦  «        }t          j        ¦   «                              |¦  «         t	          d¦  «        S )z‡Initialize a bzrdir at path.

        The default format of the server is used.
        :return: SmartServerResponse(('ok', ))
        rU   )r   r   Úget_default_formatÚinitialize_on_transportr   )r   r   Útarget_transports      r!   r"   z%SmartServerRequestInitializeBzrDir.doÏ  sD   € ð  ×:Ò:¸4Ñ@Ô@ÐÝÔ'Ñ)Ô)×AÒAÐBRÑSÔSÐSÝ,¨YÑ7Ô7Ð7r(   Nr#   r'   r(   r!   r¸   r¸   Í  s#   € € € € € ð8ð 8ð 8ð 8ð 8r(   r¸   c                   ó,   — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ ZdS )Ú$SmartServerRequestBzrDirInitializeExc                 óN   — |sd S |dk    rdS |dk    rdS t          d|z  ¦  «        ‚)Nó   FalseFrj   Tzinvalid arg %r)ÚAssertionError©r   Úargs     r!   Úparse_NoneTrueFalsez8SmartServerRequestBzrDirInitializeEx.parse_NoneTrueFalseÜ  s?   € Øð 	Ø�4Ø�(Š?ˆ?Ø�5Ø�'Š>ˆ>Ø�4ÝÐ-°Ñ3Ñ4Ô4Ð4r(   c                 ó
   — |pd S r=   r'   rÂ   s     r!   Úparse_NoneBytestringz9SmartServerRequestBzrDirInitializeEx.parse_NoneBytestringå  s   € Øˆ{�dÐr(   c                 ó4   — |sd S |                      d¦  «        S )NrT   )rX   rÂ   s     r!   Úparse_NoneStringz5SmartServerRequestBzrDirInitializeEx.parse_NoneStringè  s!   € Øð 	Ø�4Ø�zŠz˜'Ñ"Ô"Ð"r(   c                 ó   — |du rdS |sdS dS )NFrÀ   r(   rj   r'   rÂ   s     r!   Ú_serialize_NoneTrueFalsez=SmartServerRequestBzrDirInitializeEx._serialize_NoneTrueFalseí  s"   € Ø�%ˆ<ˆ<Ø�8Øð 	Ø�3Øˆwr(   c                 óÚ  — |                       |¦  «        }t          j        |¦  «        }|                      |¦  «        }|                      |¦  «        }|                      |¦  «        }|                      |¦  «        }|                      |¦  «        }|                      |	¦  «        }	|                      |
¦  «        }
|dk    r|j                             d¦  «        }|                      |¦  «        }|                     ||||||||	|
¬¦	  «	        \  }}}}|€d}d}dx}x}}d}d}d}d}nß|  	                    |j
        |¦  «        }|dk    rd}|                      |j        ¦  «        \  }}}|j                             ¦   «         }|j        j                             ¦   «         }|j        }|j        }|                     ¦   «          |                     ¦   «         j        pd}|r|                     ¦   «          |                     ¦   «          |pd}|pd}|rt+          j        |j        |¦  «        }|                     d¦  «        r.| j        |d	d…         z   }t+          j        | j        |¦  «        }d}t3          |                     d¦  «        ||||||j                             ¦   «         |                      |¦  «        |                     d¦  «        |                     d¦  «        |f¦  «        S )
aÔ  Initialize a bzrdir at path as per
        BzrDirFormat.initialize_on_transport_ex.

        New in 1.16.  (Replaces BzrDirFormat.initialize_ex verb from 1.15).

        :return: return SuccessfulSmartServerResponse((repo_path, rich_root,
            tree_ref, external_lookup, repo_network_name,
            repo_bzrdir_network_name, bzrdir_format_network_name,
            NoneTrueFalse(stacking), final_stack, final_stack_pwd,
            repo_lock_token))
        ó   .rT   )Úuse_existing_dirÚcreate_prefixÚforce_new_repoÚ
stacked_onÚstack_on_pwdÚrepo_format_nameÚmake_working_treesÚshared_repoNr‚   r(   ú.rG   r   )r   r   r„   rÄ   rÈ   rJ   rš   rÆ   Úinitialize_on_transport_exrP   rˆ   rE   r‡   ro   Ú
controldirÚ	_stack_onÚ_stack_on_pwdÚunlockÚ
lock_writeÚrepository_tokenÚleave_lock_in_placer   r°   Ú
startswithÚ_root_client_pathr   rÊ   )r   Úbzrdir_network_namer   rÍ   rÎ   rÏ   rÐ   rÑ   rÒ   rÓ   rÔ   r¼   rŠ   Úrepor‰   ÚstackingÚrepository_policyrŒ   r}   rB   rC   rD   Úrepo_bzrdir_nameÚfinal_stackÚfinal_stack_pwdÚrepo_lock_tokenÚclient_paths                              r!   r"   z'SmartServerRequestBzrDirInitializeEx.doô  s8  € ð  ×:Ò:¸4Ñ@Ô@ÐÝ(Ô,Ð-@ÑAÔAˆØ×3Ò3Ð4DÑEÔEÐØ×0Ò0°Ñ?Ô?ˆØ×1Ò1°.ÑAÔAˆØ×*Ò*¨:Ñ6Ô6ˆ
Ø×,Ò,¨\Ñ:Ô:ˆØ!×5Ò5Ð6HÑIÔIÐØ×.Ò.¨{Ñ;Ô;ˆØ˜4ÒÐØ+Ô0×7Ò7¸Ñ@Ô@ˆLØ×4Ò4Ð5EÑFÔFÐà×-Ò-Ð.>Ø?OÐ_lØ=KÐXbØ;GÐZjØASÐalð	 .ñ nô nñ 	2ˆˆf�hÐ 1ð ˆ<ØˆIØˆIØ58Ð8ˆIÐ8˜ ?Ø"ÐØˆKØ"ˆOØ!ˆOˆOà×*Ò*¨6Ô+@À$ÑGÔGˆIØ˜BŠˆØ�	Ø37×3OÒ3OØ”ñ4ô 4Ñ0ˆI�x àœ×1Ò1Ñ3Ô3ˆIØ#œÔ6×CÒCÑEÔEÐØ+Ô5ˆKØ/Ô=ˆOð �KŠK‰MŒMˆMØ"ŸošoÑ/Ô/Ô@ÐGÀCˆOØð +Ø×(Ò(Ñ*Ô*Ð*Ø�KŠK‰MŒMˆMØ!Ð' RˆØ)Ð/¨Rˆð ð 	8Ý&Ô3Ø Ô% ñ8ô 8ˆOð ×!Ò! #Ñ&Ô&ð 	"ØÔ0°;¸q¸r¸r´?ÑBˆKÝ"Ô/ØÔ&¨ñ5ô 5ˆKà!ˆOå,¨i×.>Ò.>¸wÑ.GÔ.GØ.7¸À?ÐT]Ð_oØ.4¬n×.IÒ.IÑ.KÔ.KØ.2×.KÒ.KØ2:ñ/<ô /<Ø=H×=OÒ=OÐPWÑ=XÔ=XØ.=×.DÒ.DÀWÑ.MÔ.MÈð.`ñ aô að 	ar(   N)r$   r%   r&   rÄ   rÆ   rÈ   rÊ   r"   r'   r(   r!   r¾   r¾   Ú  si   € € € € € ð5ð 5ð 5ðð ð ð#ð #ð #ð
ð ð ðMað Mað Mað Mað Mar(   r¾   c                   ó   — e Zd Zd„ ZdS )ÚSmartServerRequestOpenBranchc                 óÜ   — 	 | j                              ¦   «         }|€d}t          d|                     d¦  «        f¦  «        S # t          j        $ r}t          d¦  «        cY d}~S d}~ww xY w)z@open a branch at path and return the branch reference or branch.Nr‚   rV   rT   r4   )r5   rm   r   rš   r   r   r   )r   Úreference_urlr8   s      r!   r6   z.SmartServerRequestOpenBranch.do_bzrdir_requestF  s…   € ð	=Ø œL×=Ò=Ñ?Ô?ˆMØÐ$Ø "�Ý0°%¸×9MÒ9MÈgÑ9VÔ9VÐ1WÑXÔXÐXøÝÔ$ð 	=ð 	=ð 	=Ý,¨^Ñ<Ô<Ð<Ð<Ð<Ð<Ð<Ð<øøøøð	=øøøs   ‚A A ÁA+ÁA&Á A+Á&A+Nr[   r'   r(   r!   rê   rê   D  s#   € € € € € ð=ð =ð =ð =ð =r(   rê   c                   ó   — e Zd Zd„ ZdS )ÚSmartServerRequestOpenBranchV2c                 ób  — 	 | j                              ¦   «         }|€E| j                              d¬¦  «        }|j                             ¦   «         }t          d|f¦  «        S t          d|                     d¦  «        f¦  «        S # t          j        $ r}t          d¦  «        cY d}~S d}~ww xY w)z9open a branch at path and return the reference or format.NT©r®   rl   r­   rT   r4   )
r5   rm   r²   r‡   ro   r   rš   r   r   r   )r   rì   ÚbrrŠ   r8   s        r!   r6   z0SmartServerRequestOpenBranchV2.do_bzrdir_requestS  s¿   € ð		=Ø œL×=Ò=Ñ?Ô?ˆMØÐ$Ø”\×-Ò-¸tÐ-ÑDÔD�Øœ×0Ò0Ñ2Ô2�Ý4°iÀÐ5HÑIÔIÐIå4°f¸m×>RÒ>RÐSZÑ>[Ô>[Ð5\Ñ]Ô]Ð]øÝÔ$ð 	=ð 	=ð 	=Ý,¨^Ñ<Ô<Ð<Ð<Ð<Ð<Ð<Ð<øøøøð	=øøøs$   ‚AB Á"#B ÂB.ÂB)Â#B.Â)B.Nr[   r'   r(   r!   rî   rî   Q  s#   € € € € € ð=ð =ð =ð =ð =r(   rî   c                   ó   — e Zd Zd„ ZdS )ÚSmartServerRequestOpenBranchV3c                 ó  — 	 | j                              ¦   «         }|€E| j                              d¬¦  «        }|j                             ¦   «         }t          d|f¦  «        S t          d|                     d¦  «        f¦  «        S # t          j        $ rk}t          |¦  «         d}|j
        }|r8|                     d¦  «        r
|d	d…         }||                     d¦  «        fz  }t          |¦  «        cY d}~S d}~ww xY w)
aŠ  Open a branch at path and return the reference or format.

        This version introduced in 2.1.

        Differences to SmartServerRequestOpenBranchV2:
          * can return 2-element ('nobranch', extra), where 'extra' is a string
            with an explanation like 'location is a repository'.  Previously
            a 'nobranch' response would never have more than one element.
        NTrð   rl   r­   rT   r4   z: r   )r5   rm   r²   r‡   ro   r   rš   r   r   ÚstrÚdetailrÞ   r   )r   rì   rñ   rŠ   r8   Úresprö   s          r!   r6   z0SmartServerRequestOpenBranchV3.do_bzrdir_requestc  s  € ð	3Ø œL×=Ò=Ñ?Ô?ˆMØÐ$Ø”\×-Ò-¸tÐ-ÑDÔD�Øœ×0Ò0Ñ2Ô2�Ý4°iÀÐ5HÑIÔIÐIå4°f¸m×>RÒ>RÐSZÑ>[Ô>[Ð5\Ñ]Ô]Ð]øÝÔ$ð 
	3ð 
	3ð 
	3õ �‰FŒFˆFØ!ˆDØ”XˆFØð 2Ø×$Ò$ TÑ*Ô*ð (Ø# A B BœZ�FØ˜Ÿš wÑ/Ô/Ð1Ñ1�Ý,¨TÑ2Ô2Ð2Ð2Ð2Ð2Ð2Ð2øøøøð
	3øøøs%   ‚AB Á"#B ÂD ÂA C;Ã5D Ã;D Nr[   r'   r(   r!   ró   ró   a  s#   € € € € € ð3ð 3ð 3ð 3ð 3r(   ró   )'r~   Úfastbencoder³   r‚   r   r   r   r   r	   r‰   r
   r   r×   r   Úrequestr   r   r   r   r*   r2   rR   r^   ra   rg   rz   r€   rŽ   r’   r—   r�   r    r£   r«   r¸   r¾   rê   rî   ró   r'   r(   r!   ú<module>rú      sÂ  ðð" 9Ð 8à Ð Ð Ð ðð ð ð ð ð ð ð ð ð ð ð ðð ð ð ð ð ðð ð ð ð ð ð ð ðð ð ð ð ð ðð ð ð ð ð ð ð ð ð ð8ð 8ð 8ð 8ð 8Ð#5ñ 8ô 8ð 8ð.5ð 5ð 5ð 5ð 5Ð'9ñ 5ô 5ð 5ð4#"ð #"ð #"ð #"ð #"Ð1ñ #"ô #"ð #"ðL7ð 7ð 7ð 7ð 7Ð,Dñ 7ô 7ð 7ð <ð <ð <ð <ð <Ð-Eñ <ô <ð <ð 7ð 7ð 7ð 7ð 7Ð0Hñ 7ô 7ð 7ð &<ð &<ð &<ð &<ð &<Ð-Eñ &<ô &<ð &<ðR 4ð  4ð  4ð  4ð  4Ð.Fñ  4ô  4ð  4ðF"bð "bð "bð "bð "bÐ%=ñ "bô "bð "bðJ_ð _ð _ð _ð _Ð)Añ _ô _ð _ðBHð Hð Hð Hð HÐ'?ñ Hô Hð Hð0Bð Bð Bð Bð BÐ)Iñ Bô Bð Bð.Bð Bð Bð Bð BÐ)Iñ Bô Bð Bð2Bð Bð Bð Bð BÐ)Iñ Bô Bð Bð0:ð :ð :ð :ð :Ð)Añ :ô :ð :ð2ð 2ð 2ð 2ð 2Ð*Bñ 2ô 2ð 2ð2
8ð 
8ð 
8ð 
8ð 
8Ð);ñ 
8ô 
8ð 
8ðgað gað gað gað gaÐ+Cñ gaô gað gaðT
=ð 
=ð 
=ð 
=ð 
=Ð#;ñ 
=ô 
=ð 
=ð=ð =ð =ð =ð =Ð%=ñ =ô =ð =ð 3ð 3ð 3ð 3ð 3Ð%=ñ 3ô 3ð 3ð 3ð 3r(   