~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/devscripts/ec2test/builtins.py

  • Committer: Michael Hudson
  • Date: 2010-07-27 05:07:09 UTC
  • mto: (11128.11.2)
  • mto: This revision was merged to the branch mainline in revision 11299.
  • Revision ID: michael.hudson@linaro.org-20100727050709-lue5tgfc3w5bhgj8
merge more separate apache config from later pipe

Show diffs side-by-side

added added

removed removed

Lines of Context:
321
321
        Option('print-commit', help="Print the full commit message."),
322
322
        Option(
323
323
            'testfix',
324
 
            help="This is a testfix (tags commit with [testfix])."),
325
 
        Option(
326
 
            'no-qa',
327
 
            help="Does not require QA (tags commit with [no-qa])."),
328
 
        Option(
329
 
            'incremental',
330
 
            help="Incremental to other bug fix (tags commit with [incr])."),
 
324
            help="Include the [testfix] prefix in the commit message."),
331
325
        Option(
332
326
            'commit-text', short_name='s', type=str,
333
327
            help=(
361
355
    def run(self, merge_proposal=None, machine=None,
362
356
            instance_type=DEFAULT_INSTANCE_TYPE, postmortem=False,
363
357
            debug=False, commit_text=None, dry_run=False, testfix=False,
364
 
            no_qa=False, incremental=False, print_commit=False, force=False,
365
 
            attached=False):
 
358
            print_commit=False, force=False, attached=False):
366
359
        try:
367
360
            from devscripts.autoland import (
368
 
                LaunchpadBranchLander, MissingReviewError, MissingBugsError,
369
 
                MissingBugsIncrementalError)
 
361
                LaunchpadBranchLander, MissingReviewError)
370
362
        except ImportError:
371
363
            self.outf.write(
372
364
                "***************************************************\n\n"
382
374
        if print_commit and dry_run:
383
375
            raise BzrCommandError(
384
376
                "Cannot specify --print-commit and --dry-run.")
385
 
        if no_qa and incremental:
386
 
            raise BzrCommandError(
387
 
                "--no-qa and --incremental cannot be given at the same time.")
388
377
        lander = LaunchpadBranchLander.load()
389
378
 
390
379
        if merge_proposal is None:
407
396
                "Commit text not specified. Use --commit-text, or specify a "
408
397
                "message on the merge proposal.")
409
398
        try:
410
 
            commit_message = mp.get_commit_message(
411
 
                commit_text, testfix, no_qa, incremental)
 
399
            commit_message = mp.get_commit_message(commit_text, testfix)
412
400
        except MissingReviewError:
413
401
            raise BzrCommandError(
414
402
                "Cannot land branches that haven't got approved code "
415
403
                "reviews. Get an 'Approved' vote so we can fill in the "
416
404
                "[r=REVIEWER] section.")
417
 
        except MissingBugsError:
418
 
            raise BzrCommandError(
419
 
                "Branch doesn't have linked bugs and doesn't have no-qa "
420
 
                "option set. Use --no-qa, or link the related bugs to the "
421
 
                "branch.")
422
 
        except MissingBugsIncrementalError:
423
 
            raise BzrCommandError(
424
 
                "--incremental option requires bugs linked to the branch. "
425
 
                "Link the bugs or remove the --incremental option.")
426
 
 
427
405
        if print_commit:
428
406
            print commit_message
429
407
            return