~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugins/launchpad/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-05-21 11:01:38 UTC
  • mfrom: (5244.1.3 propose-accepted)
  • Revision ID: pqm@pqm.ubuntu.com-20100521110138-pyuhper87ny71bpz
(lifeless) Add a --approve to lp-propose for proposals that are
 self-approvable. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
310
310
                            help='Propose the merge on staging.'),
311
311
                     Option('message', short_name='m', type=unicode,
312
312
                            help='Commit message.'),
 
313
                     Option('approve',
 
314
                            help='Mark the proposal as approved immediately.'),
313
315
                     ListOption('review', short_name='R', type=unicode,
314
316
                            help='Requested reviewer and optional type.')]
315
317
 
318
320
    aliases = ['lp-submit', 'lp-propose']
319
321
 
320
322
    def run(self, submit_branch=None, review=None, staging=False,
321
 
            message=None):
 
323
            message=None, approve=False):
322
324
        from bzrlib.plugins.launchpad import lp_propose
323
325
        tree, branch, relpath = bzrdir.BzrDir.open_containing_tree_or_branch(
324
326
            '.')
338
340
        else:
339
341
            target = _mod_branch.Branch.open(submit_branch)
340
342
        proposer = lp_propose.Proposer(tree, branch, target, message,
341
 
                                       reviews, staging)
 
343
                                       reviews, staging, approve=approve)
342
344
        proposer.check_proposal()
343
345
        proposer.create_proposal()
344
346