§
    cÌc5  ã                   óÆ   — d Z ddl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  G d„ de¦  «        Z G d	„ d
e¦  «        Z G d„ de¦  «        Z G d„ de¦  «        ZdS )zLaunchpad plugin commands.é   )ÚbranchÚ
controldirÚtrace)ÚCommand)ÚCommandErrorÚNotBranchError)Úgettext)ÚOptionÚ
ListOptionc                   ó@   — e Zd ZdZdgZ edd¦  «        gZdgZd	d„ZdS )
Úcmd_launchpad_openz1Open a Launchpad branch page in your web browser.zlp-openzdry-runz@Do not actually open the browser. Just say the URL we would use.z	location?NFc                 ót   — t          j        d¦  «         ddlm}  |¦   «                              ||¬¦  «        S )Nz2lp-open is deprecated. Please use web-open insteadé    )Úcmd_web_open)ÚlocationÚdry_run)r   ÚwarningÚbreezy.plugins.propose.cmdsr   Úrun)Úselfr   r   r   s       ú?/usr/lib/python3/dist-packages/breezy/plugins/launchpad/cmds.pyr   zcmd_launchpad_open.run1   sD   € ÝŒÐJÑKÔKÐKØ<Ð<Ð<Ð<Ð<Ð<Øˆ|‰~Œ~×!Ò!¨8¸WÐ!ÑEÔEÐEó    )NF)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úaliasesr
   Útakes_optionsÚ
takes_argsr   © r   r   r   r   &   s`   € € € € € ØE€Gàˆk€Gàˆˆyðñ	ô 	ð
€Mð
 �€JðFð Fð Fð Fð Fð Fr   r   c                   ó`   — e Zd ZdZdgZdgZd edd¦  «         eded¬	¦  «        gZ	 	 dd„Z	d
S )Úcmd_launchpad_logina«  Show or set the Launchpad user ID.

    When communicating with Launchpad, some commands need to know your
    Launchpad user ID.  This command can be used to set or show the
    user ID that Bazaar will use for such communication.

    :Examples:
      Show the Launchpad ID of the current user::

          brz launchpad-login

      Set the Launchpad ID of the current user to 'bob'::

          brz launchpad-login bob
    zlp-loginzname?Úverbosezno-checkz(Don't check that the user name is valid.zservice-rootz$Launchpad service root to connect to)ÚtypeÚhelpNFÚ
productionc                 óÊ  — ddl m} | }|€�|                     ¦   «         }|r^|r>|                     |¦  «         |r'| j                             t          d¦  «        ¦  «         | j                             |dz   ¦  «         n¿| j                             t          d¦  «        ¦  «         dS |                     ¦   «         }|r>|                     |¦  «         |r'| j                             t          d¦  «        ¦  «         |                     |¦  «         |r+| j                             t          d¦  «        |fz  ¦  «         |r"ddl	m
} ddlm}	  | |	|¦  «        ¦  «         d S d S )	Né   ©Úaccountz+Launchpad user ID exists and has SSH keys.
ú
z!No Launchpad user ID configured.
zLaunchpad user ID set to '%s'.
)Úconnect_launchpad)Úlookup_service_root)Ú r*   Úget_lp_loginÚcheck_lp_loginÚoutfÚwriter	   ÚlowerÚset_lp_loginÚlp_apir,   Úurisr-   )
r   ÚnameÚno_checkr#   Úservice_rootr*   Úcheck_accountÚusernamer,   r-   s
             r   r   zcmd_launchpad_login.runQ   sÎ  € ð 	ÐÐÐÐÐØ$˜ˆàˆ<Ø×+Ò+Ñ-Ô-ˆHØð 	Ø ð MØ×*Ò*¨8Ñ4Ô4Ð4Øð MØœ	Ÿš­ØJñ)Lô )Lñ Mô Mð Mà”	—’ ¨4¡Ñ0Ô0Ð0Ð0à”	—’¥Ð(LÑ MÔ MÑNÔNÐNØ�qà—:’:‘<”<ˆDØð IØ×&Ò& tÑ,Ô,Ð,Øð IØ”I—O’O¥GØFñ%Hô %Hñ Iô Ið Ià× Ò  Ñ&Ô&Ð&Øð )Ø”	—’¥Ð(JÑ KÔ KØ!% ñ!(ñ )ô )ð )àð 	AØ1Ð1Ð1Ð1Ð1Ð1Ø1Ð1Ð1Ð1Ð1Ð1ØÐÐ1Ð1°,Ñ?Ô?Ñ@Ô@Ð@Ð@Ð@ð	Að 	Ar   )NFFr&   )
r   r   r   r   r   r   r
   Ústrr   r   r    r   r   r"   r"   7   s†   € € € € € ð€Gð ˆl€GØ�€JàØˆˆzØ9ñ	;ô 	;àˆˆ~ CØ:ð	<ñ 	<ô 	<ð	
€Mð 6;Ø%ð Að  Að  Að  Að  Að  Ar   r"   c                   ó&   — e Zd ZdZdgZdgZdd„ZdS )Úcmd_launchpad_logouta7  Unset the Launchpad user ID.

    When communicating with Launchpad, some commands need to know your
    Launchpad user ID.  This command will log you out from Launchpad.
    This means that communication with Launchpad will happen over
    HTTPS, and will not require one of your SSH keys to be available.
    z	lp-logoutr#   Fc                 ó  — ddl m} |                     ¦   «         }|€)| j                             t          d¦  «        ¦  «         dS |                     d ¦  «         |r,| j                             t          d¦  «        |z  ¦  «         d S d S )Nr(   r)   zNot logged into Launchpad.
z!Launchpad user ID %s logged out.
)r.   r*   r/   r1   r2   r	   r4   )r   r#   r*   Úold_usernames       r   r   zcmd_launchpad_logout.run   s¬   € ØÐÐÐÐÐØ×+Ò+Ñ-Ô-ˆØÐØŒI�OŠO�GÐ$BÑCÔCÑDÔDÐDØ�1Ø×Ò˜TÑ"Ô"Ð"Øð 	ØŒI�OŠO�GØ4ñ6ô 6àññ ô ð ð ð ð	ð 	r   N)F)r   r   r   r   r   r   r   r    r   r   r>   r>   t   s?   € € € € € ð€Gð ˆm€GØ�K€Mð
ð 
ð 
ð 
ð 
ð 
r   r>   c                   ó&   — e Zd ZdZdgZdd„Zd„ ZdS )Úcmd_lp_find_proposala  Find the proposal to merge this revision.

    Finds the merge proposal(s) that discussed landing the specified revision.
    This works only if the if the merged_revno was recorded for the merge
    proposal.  The proposal(s) are opened in a web browser.

    Only the revision specified is searched for.  To find the mainline
    revision that merged it into mainline, use the "mainline" revision spec.

    So, to find the merge proposal that reviewed line 1 of README::

      brz lp-find-proposal -r mainline:annotate:README:1
    ÚrevisionNc                 óØ  — ddl m} ddl m} dd l}t          j                             d¦  «        d         }|j                             ¦   «         5 }| 	                    ¦   «         5  |€| 
                    ¦   «         }n|d                              |¦  «        }|                      ||¦  «        }t          |¦  «        dk    rt          t          d¦  «        ¦  «        ‚t!          j        t          d¦  «        t          |¦  «        z  ¦  «         |D ]*}	|                     |                     |	¦  «        ¦  «         Œ+	 d d d ¦  «         n# 1 swxY w Y   d d d ¦  «         d S # 1 swxY w Y   d S )	Nr   )Úuir(   )r6   r   ú.zNo review found.z%d proposals(s) found.)r.   rE   r6   Ú
webbrowserÚ_mod_branchÚBranchÚopen_containingÚ
ui_factoryÚnested_progress_barÚ	lock_readÚlast_revisionÚas_revision_idÚ_find_proposalsÚlenr   r	   r   ÚnoteÚopenÚcanonical_url)
r   rC   rE   r6   rG   ÚbÚpbÚrevision_idÚmergedÚmps
             r   r   zcmd_lp_find_proposal.runž   sê  € ØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÝÔ×.Ò.¨sÑ3Ô3°AÔ6ˆØŒ]×.Ò.Ñ0Ô0ð 
	8°B¸¿º¹¼ð 
	8ð 
	8ØÐØŸošoÑ/Ô/��à& qœk×8Ò8¸Ñ;Ô;�Ø×)Ò)¨+°rÑ:Ô:ˆFÝ�6‰{Œ{˜aÒÐÝ"¥7Ð+=Ñ#>Ô#>Ñ?Ô?Ð?ÝŒJ•wÐ7Ñ8Ô8½3¸v¹;¼;ÑFÑGÔGÐGØð 8ð 8�Ø—’ × 2Ò 2°2Ñ 6Ô 6Ñ7Ô7Ð7Ð7ð8ð
	8ð 
	8ð 
	8ñ 
	8ô 
	8ð 
	8ð 
	8ð 
	8ð 
	8ð 
	8ð 
	8øøøð 
	8ð 
	8ð 
	8ð 
	8ð 
	8ð 
	8ð 
	8ñ 
	8ô 
	8ð 
	8ð 
	8ð 
	8ð 
	8ð 
	8ð 
	8ð 
	8øøøð 
	8ð 
	8ð 
	8ð 
	8ð 
	8ð 
	8s7   ÁEÁ$CEÄ;EÅE	ÅEÅE	ÅEÅE#Å&E#c                 ó  — ddl m}m} |j        }|                     |d¬¦  «        }|                     t          d¦  «        ¦  «         t          |j         	                    | 
                    d¦  «        ¬¦  «        ¦  «        S )Nr(   )r6   r5   Údevel)ÚversionzFinding proposalszutf-8)Úmerged_revision)r.   r6   r5   ÚLPNET_SERVICE_ROOTr,   Úupdater	   ÚlistÚbranchesÚgetMergeProposalsÚdecode)r   rW   rV   r6   r5   Úlp_base_urlÚ	launchpads          r   rP   z$cmd_lp_find_proposal._find_proposals¯   s—   € Ø"Ð"Ð"Ð"Ð"Ð"Ð"Ð"àÔ-ˆØ×,Ò,¨[À'Ð,ÑJÔJˆ	Ø
�	Š	•'Ð-Ñ.Ô.Ñ/Ô/Ð/Ý�IÔ&×8Ò8Ø$/×$6Ò$6°wÑ$?Ô$?ð 9ñ Aô Añ Bô Bð 	Br   )N)r   r   r   r   r   r   rP   r    r   r   rB   rB   Œ   sL   € € € € € ð€Gð  �L€Mð8ð 8ð 8ð 8ð"Bð Bð Bð Bð Br   rB   N)r   r.   r   rH   r   r   Úcommandsr   Úerrorsr   r   Úi18nr	   Úoptionr
   r   r   r"   r>   rB   r    r   r   ú<module>rj      sŽ  ðð" !Ð  ðð ð ð ð ð ð ð ð ð ð
ð ð ð ð ð ðð ð ð ð ð ð ð ð Ð Ð Ð Ð Ð ðð ð ð ð ð ð ð ðFð Fð Fð Fð F˜ñ Fô Fð Fð":Að :Að :Að :Að :A˜'ñ :Aô :Að :Aðzð ð ð ð ˜7ñ ô ð ð0*Bð *Bð *Bð *Bð *B˜7ñ *Bô *Bð *Bð *Bð *Br   