Commit 5754f66f authored by Sergiy Byelozyorov's avatar Sergiy Byelozyorov Committed by Commit Bot

[tools] Use TBR by default for uploaded branch CLs

R=machenbach@chromium.org

Bug: v8:7766
Change-Id: If96c5b278ef25f2b8729a4abc81defb598b444ee
Reviewed-on: https://chromium-review.googlesource.com/1066558Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53286}
parent a88f7a94
......@@ -767,16 +767,24 @@ class UploadStep(Step):
MESSAGE = "Upload for code review."
def RunStep(self):
reviewer = None
if self._options.reviewer:
print "Using account %s for review." % self._options.reviewer
reviewer = self._options.reviewer
else:
tbr_reviewer = None
if self._options.tbr_reviewer:
print "Using account %s for TBR review." % self._options.tbr_reviewer
tbr_reviewer = self._options.tbr_reviewer
if not reviewer and not tbr_reviewer:
print "Please enter the email address of a V8 reviewer for your patch: ",
self.DieNoManualMode("A reviewer must be specified in forced mode.")
reviewer = self.ReadLine()
self.GitUpload(reviewer, self._options.author, self._options.force_upload,
bypass_hooks=self._options.bypass_upload_hooks,
cc=self._options.cc)
cc=self._options.cc, tbr_reviewer=tbr_reviewer)
def MakeStep(step_class=Step, number=0, state=None, config=None,
......@@ -829,6 +837,8 @@ class ScriptsBase(object):
help="File to write results summary to.")
parser.add_argument("-r", "--reviewer", default="",
help="The account name to be used for reviews.")
parser.add_argument("--tbr-reviewer", "--tbr", default="",
help="The account name to be used for TBR reviews.")
parser.add_argument("-s", "--step",
help="Specify the step where to start work. Default: 0.",
default=0, type=int)
......
......@@ -207,12 +207,14 @@ class GitRecipesMixin(object):
def GitUpload(self, reviewer="", author="", force=False, cq=False,
cq_dry_run=False, bypass_hooks=False, cc="", private=False,
**kwargs):
tbr_reviewer="", **kwargs):
args = ["cl upload --send-mail"]
if author:
args += ["--email", Quoted(author)]
if reviewer:
args += ["-r", Quoted(reviewer)]
if tbr_reviewer:
args += ["--tbrs", Quoted(tbr_reviewer)]
if force:
args.append("-f")
if cq:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment