139
139
help="Incremental to other bug fix (tags commit with [incr])."),
141
'rollback', type=int,
143
"Rollback given revision number. (tags commit with "
144
"[rollback=revno]).")),
142
def run(self, location=None, dry_run=False, testfix=False,
143
no_qa=False, incremental=False):
147
def run(self, location=None, dry_run=False, testfix=False,
148
no_qa=False, incremental=False, rollback=None):
144
149
from bzrlib.plugins.pqm.lpland import Submitter
145
150
from bzrlib import branch as _mod_branch
146
151
from bzrlib.plugins.pqm.lpland import (
147
152
MissingReviewError, MissingBugsError, MissingBugsIncrementalError)
150
if no_qa and incremental:
151
raise BzrCommandError(
152
"--no-qa and --incremental cannot be given at the same time.")
154
154
branch = _mod_branch.Branch.open_containing('.')[0]
159
if rollback and (no_qa or incremental):
160
print "--rollback option used. Ignoring --no-qa and --incremental."
160
submitter = Submitter(branch, location, testfix, no_qa, incremental
162
submitter = Submitter(branch, location, testfix, no_qa,
163
incremental, rollback=rollback).run(outf)
162
164
except MissingReviewError:
163
165
raise BzrCommandError(
164
166
"Cannot land branches that haven't got approved code "