-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/cmds.pyc

σ
ƒk…Pc@@sdZddlmZddlmZmZmZddlm	Z	ddl
mZmZm
Z
mZddlmZddlmZmZde	fd	„ƒYZd
e	fd„ƒYZde	fd
„ƒYZde	fd„ƒYZde	fd„ƒYZde	fd„ƒYZdS(sLaunchpad plugin commands.i(tabsolute_import(tbrancht
controldirttrace(tCommand(tBzrCommandErrort
InvalidURLtNoPublicBranchtNotBranchError(tgettext(tOptiont
ListOptiontcmd_register_branchc
B@sΌeZdZdgZeddeƒeddedeƒeddeƒed	d
eƒeddeƒed
deƒeddeƒeddƒgZdddddddde
d„	ZRS(sΒRegister a branch with launchpad.net.

    This command lists a bzr branch in the directory of branches on
    launchpad.net.  Registration allows the branch to be associated with
    bugs or specifications.

    Before using this command you must register the project to which the
    branch belongs, and create an account for yourself on launchpad.net.

    arguments:
        public_url: The publicly visible url for the branch to register.
                    This must be an http or https url (which Launchpad can read
                    from to access the branch). Local file urls, SFTP urls, and
                    bzr+ssh urls will not work.
                    If no public_url is provided, bzr will use the configured
                    public_url if there is one for the current branch, and
                    otherwise error.

    example:
        bzr register-branch http://foo.com/bzr/fooproject.mine \
                --project fooproject
    spublic_url?tprojects:Launchpad project short name to associate with the branch.tproducts:Launchpad product short name to associate with the branch.thiddensbranch-namesOShort name for the branch; by default taken from the last component of the url.sbranch-titles'One-sentence description of the branch.sbranch-descriptions<Longer description of the purpose or contents of the branch.tauthors/Branch author's email address, if not yourself.slink-bugsThe bug this branch fixes.sdry-runs/Prepare the request but don't actually send it.tc

C@s^ddlm}
m}m}m}
|dkr˜ytjjdƒd}Wn#t	k
rmt
tdƒƒ‚nX|jƒ}|dkr˜t
|ƒ‚q˜n|dk	rΐ|}tjtdƒƒn|
d|d|d|d	|d
|d|ƒ}|d|d|ƒ}|	s|
ƒ}n	|ƒ}|jƒ|j|ƒ|rJ|j|ƒn|jjd
ƒdS(Ni(tBranchRegistrationRequesttBranchBugLinkRequesttDryRunLaunchpadServicetLaunchpadServicet.sLregister-branch requires a public branch url - see bzr help register-branch.s.--product is deprecated; please use --project.t
branch_urltbranch_nametbranch_titletbranch_descriptiontproduct_nametauthor_emailtbug_idsBranch registered.
(t(bzrlib.plugins.launchpad.lp_registrationRRRRtNonet_mod_branchtBranchtopen_containingRRR	tget_public_branchRRtnotetgather_user_credentialstsubmittoutftwrite(tselft
public_urlR
RRRRRtlink_bugtdry_runRRRRtbtregotlinkotservice((sA/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/cmds.pytrun_s<
"
	
			

N(t__name__t
__module__t__doc__t
takes_argsR
tunicodetTruetintt
takes_optionsRtFalseR1(((sA/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/cmds.pyR*sF	tcmd_launchpad_opencB@sSeZdZdgZeddƒgZdgZd„Zd„Zde
d„ZRS(	s1Open a Launchpad branch page in your web browser.slp-opensdry-runs@Do not actually open the browser. Just say the URL we would use.s	location?cc@sx|Vytjj|ƒd}Wntk
r3dSX|jƒ}|dk	rT|Vn|jƒ}|dk	rt|VndS(s?Yield possible external locations for the branch at 'location'.iN(R R!R"RR#Rtget_push_location(R)tlocationRR((sA/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/cmds.pyt_possible_locations‘s
cC@seddlm}xB|j|ƒD]1}y|j|ƒSWq |tfk
rPq Xq W||ƒ‚dS(Ni(tNotLaunchpadBranch(RR?R>tget_web_url_from_branch_urlR(R)R0R=R?R((sA/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/cmds.pyt_get_web_url―scC@swddlm}|dkr%d}n|j|ƒ|ƒ}tjtdƒ|ƒ|ssddl}|j|ƒndS(Ni(Ru.sOpening %s in web browser(	RRRRARR$R	t
webbrowsertopen(R)R=R,Rtweb_urlRB((sA/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/cmds.pyR1Ήs	N(R2R3R4taliasesR
R9R5R>RARR:R1(((sA/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/cmds.pyR;–s				
tcmd_launchpad_logincB@sGeZdZdgZdgZdeddƒgZdeed„Z	RS(s«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::

          bzr launchpad-login

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

          bzr launchpad-login bob
    slp-loginsname?tverbosesno-checks(Don't check that the user name is valid.cC@sddlm}|}|dkrž|jƒ}|r|rj|j|ƒ|rj|jjtdƒƒqjn|jj|dƒq|jjtdƒƒdSnt|jƒ}|rί|j|ƒ|rί|jjtdƒƒqίn|j	|ƒ|r|jjtdƒ|fƒndS(Ni(taccounts+Launchpad user ID exists and has SSH keys.
s
s!No Launchpad user ID configured.
isLaunchpad user ID set to '%s'.
(
tbzrlib.plugins.launchpadRHRtget_lp_logintcheck_lp_loginR'R(R	tlowertset_lp_login(R)tnametno_checkRGRHt
check_accounttusername((sA/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/cmds.pyR1ήs.


N(
R2R3R4RER5R
R9RR:R1(((sA/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/cmds.pyRFΖs		tcmd_launchpad_mirrorcB@s,eZdZdgZdgZdd„ZRS(s%Ask Launchpad to mirror a branch now.s	lp-mirrors	location?Rc	C@s|ddlm}ddlm}tjj|ƒ\}}|ƒ}|j|ƒ}|jj	||dt
ƒ}|jjƒdS(Ni(tlp_api(Rtcreate_missing(
RIRSRRR R!R"tlogintLaunchpadBranchtfrom_bzrR:tlpt
requestMirror(	R)R=RSRRt_R0t	launchpadt	lp_branch((sA/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/cmds.pyR1s		(R2R3R4RER5R1(((sA/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/cmds.pyRRύs		tcmd_lp_propose_mergecB@s§eZdZedddƒeddddeddƒed	dd
ƒeddeƒed
dddeddƒgZdgZddgZ	ddededd„ZRS(s¨Propose merging a branch on Launchpad.

    This will open your usual editor to provide the initial comment.  When it
    has created the proposal, it will open it in your default web browser.

    The branch will be proposed to merge into SUBMIT_BRANCH.  If SUBMIT_BRANCH
    is not supplied, the remembered submit branch will be used.  If no submit
    branch is remembered, the development focus will be used.

    By default, the SUBMIT_BRANCH's review team will be requested to review
    the merge proposal.  This can be overriden by specifying --review (-R).
    The parameter the launchpad account name of the desired reviewer.  This
    may optionally be followed by '=' and the review type.  For example:

      bzr lp-propose-merge --review jrandom --review review-team=qa

    This will propose a merge,  request "jrandom" to perform a review of
    unspecified type, and request "review-team" to perform a "qa" review.
    tstagingthelpsPropose the merge on staging.tmessaget
short_nametmttypesCommit message.tapprovesPMark the proposal as approved immediately, setting the approved revision to tip.tfixessThe bug this proposal fixes.treviewtRs%Requested reviewer and optional type.ssubmit_branch?s	lp-submits
lp-proposecC@sddlm}tjjdƒ\}}	}
|dkr@d}nmg}xI|D]A}d|kr{|j|jddƒƒqM|j|dfƒqMW|dkr­|	jƒ}n|dkrΒd}nt	j
j|ƒ}|j||	||||d|d|ƒ}
|
j
ƒ|
jƒdS(	Ni(t
lp_proposeRt=iRRdRe(RIRhRt
ControlDirtopen_containing_tree_or_branchRtappendtsplittget_submit_branchR R!RCtProposertcheck_proposaltcreate_proposal(R)t
submit_branchRfR^R`RdReRhttreeRtrelpathtreviewsttargettproposer((sA/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/cmds.pyR12s(		
		
N(
R2R3R4R
R6tstrRR9R5RERR:R1(((sA/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/cmds.pyR]s				tcmd_lp_find_proposalcB@s,eZdZdgZdd„Zd„ZRS(sFind 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::

      bzr lp-find-proposal -r mainline:annotate:README:1
    trevisionc
C@s&ddlm}ddlm}ddl}tjjdƒd}|jj	ƒ}|j
ƒz―|dkry|jƒ}n|dj
|ƒ}|j||ƒ}t|ƒdkrΕttdƒƒ‚ntjtdƒt|ƒƒx$|D]}	|j|j|	ƒƒqιWWd|jƒ|jƒXdS(Ni(tui(RSRsNo review found.s%d proposals(s) found.(tbzrlibR{RIRSRBR R!R"t
ui_factorytnested_progress_bart	lock_readRt
last_revisiontas_revision_idt_find_proposalstlenRR	RR$RCt
canonical_urltunlocktfinished(
R)RzR{RSRBR-tpbtrevision_idtmergedtmp((sA/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/cmds.pyR1_s$


cC@s]ddlm}m}|j|jƒddƒ}|jtdƒƒt|jj	d|ƒƒS(Ni(RStlp_registrationtversiontdevelsFinding proposalstmerged_revision(
RIRSR‹RURtupdateR	tlisttbranchestgetMergeProposals(R)RˆR‡RSR‹R[((sA/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/cmds.pyR‚us	N(R2R3R4R9RR1R‚(((sA/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/cmds.pyRyMs	N(R4t
__future__RR|RR RRtbzrlib.commandsRt
bzrlib.errorsRRRRtbzrlib.i18nR	t
bzrlib.optionR
RRR;RFRRR]Ry(((sA/usr/lib/python2.7/dist-packages/bzrlib/plugins/launchpad/cmds.pyt<module>s"l07?

Copyright © 2017 || Recoded By Mr.Bumblebee