Commit 8840d622 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

[release] Make gerrit the default for all release tools

This switches also the V8->Chromium rolls to Gerrit.

NOTRY=true
TBR=hablich@chromium.org

Bug: chromium:685318
Change-Id: Idc168f790541f09bd2f2d7c2f72806ac9e966843
Reviewed-on: https://chromium-review.googlesource.com/558913Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46388}
parent 99459edf
...@@ -767,7 +767,7 @@ class UploadStep(Step): ...@@ -767,7 +767,7 @@ class UploadStep(Step):
reviewer = self.ReadLine() reviewer = self.ReadLine()
self.GitUpload(reviewer, self._options.author, self._options.force_upload, self.GitUpload(reviewer, self._options.author, self._options.force_upload,
bypass_hooks=self._options.bypass_upload_hooks, bypass_hooks=self._options.bypass_upload_hooks,
cc=self._options.cc, use_gerrit=not self._options.rietveld) cc=self._options.cc)
def MakeStep(step_class=Step, number=0, state=None, config=None, def MakeStep(step_class=Step, number=0, state=None, config=None,
...@@ -813,15 +813,13 @@ class ScriptsBase(object): ...@@ -813,15 +813,13 @@ class ScriptsBase(object):
def MakeOptions(self, args=None): def MakeOptions(self, args=None):
parser = argparse.ArgumentParser(description=self._Description()) parser = argparse.ArgumentParser(description=self._Description())
parser.add_argument("-a", "--author", default="", parser.add_argument("-a", "--author", default="",
help="The author email used for rietveld.") help="The author email used for code review.")
parser.add_argument("--dry-run", default=False, action="store_true", parser.add_argument("--dry-run", default=False, action="store_true",
help="Perform only read-only actions.") help="Perform only read-only actions.")
parser.add_argument("--json-output", parser.add_argument("--json-output",
help="File to write results summary to.") help="File to write results summary to.")
parser.add_argument("-r", "--reviewer", default="", parser.add_argument("-r", "--reviewer", default="",
help="The account name to be used for reviews.") 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", parser.add_argument("-s", "--step",
help="Specify the step where to start work. Default: 0.", help="Specify the step where to start work. Default: 0.",
default=0, type=int) default=0, type=int)
......
...@@ -206,7 +206,7 @@ class GitRecipesMixin(object): ...@@ -206,7 +206,7 @@ class GitRecipesMixin(object):
self.Git(MakeArgs(args), **kwargs) self.Git(MakeArgs(args), **kwargs)
def GitUpload(self, reviewer="", author="", force=False, cq=False, def GitUpload(self, reviewer="", author="", force=False, cq=False,
bypass_hooks=False, cc="", use_gerrit=False, **kwargs): bypass_hooks=False, cc="", **kwargs):
args = ["cl upload --send-mail"] args = ["cl upload --send-mail"]
if author: if author:
args += ["--email", Quoted(author)] args += ["--email", Quoted(author)]
...@@ -220,8 +220,9 @@ class GitRecipesMixin(object): ...@@ -220,8 +220,9 @@ class GitRecipesMixin(object):
args.append("--bypass-hooks") args.append("--bypass-hooks")
if cc: if cc:
args += ["--cc", Quoted(cc)] args += ["--cc", Quoted(cc)]
if use_gerrit: # TODO(machenbach): Deprecate passing this flag as soon as Chromium has
args += ["--gerrit"] # switched to gerrit by default.
args += ["--gerrit"]
# TODO(machenbach): Check output in forced mode. Verify that all required # TODO(machenbach): Check output in forced mode. Verify that all required
# base files were uploaded, if not retry. # base files were uploaded, if not retry.
self.Git(MakeArgs(args), pipe=False, **kwargs) self.Git(MakeArgs(args), pipe=False, **kwargs)
......
...@@ -972,7 +972,7 @@ TBR=reviewer@chromium.org""" ...@@ -972,7 +972,7 @@ TBR=reviewer@chromium.org"""
Cmd("git commit -aF \"%s\"" % TEST_CONFIG["COMMITMSG_FILE"], "", Cmd("git commit -aF \"%s\"" % TEST_CONFIG["COMMITMSG_FILE"], "",
cb=CheckVersionCommit), cb=CheckVersionCommit),
Cmd("git cl upload --send-mail --email \"author@chromium.org\" " Cmd("git cl upload --send-mail --email \"author@chromium.org\" "
"-f --bypass-hooks", ""), "-f --bypass-hooks --gerrit", ""),
Cmd("git cl land --bypass-hooks -f", ""), Cmd("git cl land --bypass-hooks -f", ""),
Cmd("git fetch", ""), Cmd("git fetch", ""),
Cmd("git log -1 --format=%H --grep=" Cmd("git log -1 --format=%H --grep="
...@@ -1123,7 +1123,7 @@ deps = { ...@@ -1123,7 +1123,7 @@ deps = {
self.ROLL_COMMIT_MSG), self.ROLL_COMMIT_MSG),
"", cwd=chrome_dir), "", cwd=chrome_dir),
Cmd("git cl upload --send-mail --email \"author@chromium.org\" -f " Cmd("git cl upload --send-mail --email \"author@chromium.org\" -f "
"--use-commit-queue --bypass-hooks", "", cwd=chrome_dir), "--use-commit-queue --bypass-hooks --gerrit", "", cwd=chrome_dir),
Cmd("git checkout -f master", "", cwd=chrome_dir), Cmd("git checkout -f master", "", cwd=chrome_dir),
Cmd("git branch -D work-branch", "", cwd=chrome_dir), Cmd("git branch -D work-branch", "", cwd=chrome_dir),
] ]
......
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