277
285
register_command(cmd_launchpad_mirror)
288
class cmd_lp_propose_merge(Command):
289
"""Propose merging a branch on Launchpad.
291
This will open your usual editor to provide the initial comment. When it
292
has created the proposal, it will open it in your default web browser.
294
The branch will be proposed to merge into SUBMIT_BRANCH. If SUBMIT_BRANCH
295
is not supplied, the remembered submit branch will be used. If no submit
296
branch is remembered, the development focus will be used.
298
By default, the SUBMIT_BRANCH's review team will be requested to review
299
the merge proposal. This can be overriden by specifying --review (-R).
300
The parameter the launchpad account name of the desired reviewer. This
301
may optionally be followed by '=' and the review type. For example:
303
bzr lp-propose-merge --review jrandom --review review-team=qa
305
This will propose a merge, request "jrandom" to perform a review of
306
unspecified type, and request "review-team" to perform a "qa" review.
309
takes_options = [Option('staging',
310
help='Propose the merge on staging.'),
311
Option('message', short_name='m', type=unicode,
312
help='Commit message.'),
313
ListOption('review', short_name='R', type=unicode,
314
help='Requested reviewer and optional type.')]
316
takes_args = ['submit_branch?']
318
aliases = ['lp-submit', 'lp-propose']
320
def run(self, submit_branch=None, review=None, staging=False,
322
from bzrlib.plugins.launchpad import lp_propose
323
tree, branch, relpath = bzrdir.BzrDir.open_containing_tree_or_branch(
329
for review in review:
331
reviews.append(review.split('=', 2))
333
reviews.append((review, ''))
334
if submit_branch is None:
335
submit_branch = branch.get_submit_branch()
336
if submit_branch is None:
339
target = _mod_branch.Branch.open(submit_branch)
340
proposer = lp_propose.Proposer(tree, branch, target, message,
342
proposer.check_proposal()
343
proposer.create_proposal()
346
register_command(cmd_lp_propose_merge)
280
349
def _register_directory():
281
350
directories.register_lazy('lp:', 'bzrlib.plugins.launchpad.lp_directory',
282
351
'LaunchpadDirectory',