Commit 67255619 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

[release] Let merge tools use gerrit by default

BUG=chromium:685318
NOTRY=true
TBR=hablich@chromium.org

Change-Id: Ic5a6d721372ff93d1c2254bad0e8c1d9c0b0af94
Reviewed-on: https://chromium-review.googlesource.com/446344Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Reviewed-by: 's avatarAaron Gable <agable@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43440}
parent 2c7508f1
......@@ -767,7 +767,7 @@ class UploadStep(Step):
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, use_gerrit=not self._options.rietveld)
def MakeStep(step_class=Step, number=0, state=None, config=None,
......@@ -820,6 +820,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("--rietveld", default=False, action="store_true",
help="Whether to use rietveld instead of gerrit.")
parser.add_argument("-s", "--step",
help="Specify the step where to start work. Default: 0.",
default=0, type=int)
......
......@@ -206,7 +206,7 @@ class GitRecipesMixin(object):
self.Git(MakeArgs(args), **kwargs)
def GitUpload(self, reviewer="", author="", force=False, cq=False,
bypass_hooks=False, cc="", **kwargs):
bypass_hooks=False, cc="", use_gerrit=False, **kwargs):
args = ["cl upload --send-mail"]
if author:
args += ["--email", Quoted(author)]
......@@ -220,6 +220,8 @@ class GitRecipesMixin(object):
args.append("--bypass-hooks")
if cc:
args += ["--cc", Quoted(cc)]
if use_gerrit:
args += ["--gerrit"]
# TODO(machenbach): Check output in forced mode. Verify that all required
# base files were uploaded, if not retry.
self.Git(MakeArgs(args), pipe=False, **kwargs)
......
......@@ -1271,7 +1271,7 @@ LOG=N
Cmd("git commit -aF \"%s\"" % TEST_CONFIG["COMMITMSG_FILE"], ""),
RL("reviewer@chromium.org"), # V8 reviewer.
Cmd("git cl upload --send-mail -r \"reviewer@chromium.org\" "
"--bypass-hooks --cc \"ulan@chromium.org\"", ""),
"--bypass-hooks --cc \"ulan@chromium.org\" --gerrit", ""),
Cmd("git checkout -f %s" % TEST_CONFIG["BRANCHNAME"], ""),
RL("LGTM"), # Enter LGTM for V8 CL.
Cmd("git cl presubmit", "Presubmit successfull\n"),
......@@ -1653,7 +1653,7 @@ NOTREECHECKS=true
Cmd("git commit -aF \"%s\"" % TEST_CONFIG["COMMITMSG_FILE"], ""),
RL("reviewer@chromium.org"), # V8 reviewer.
Cmd("git cl upload --send-mail -r \"reviewer@chromium.org\" "
"--bypass-hooks --cc \"ulan@chromium.org\"", ""),
"--bypass-hooks --cc \"ulan@chromium.org\" --gerrit", ""),
Cmd("git cl comments -a \"%s\"" % info_msg, ""),
Cmd("git checkout -f %s" % TEST_CONFIG["BRANCHNAME"], ""),
RL("LGTM"), # Enter LGTM for V8 CL.
......
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