diff --git a/tools/release/common_includes.py b/tools/release/common_includes.py index 5c03236223..bd66a53932 100644 --- a/tools/release/common_includes.py +++ b/tools/release/common_includes.py @@ -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) diff --git a/tools/release/git_recipes.py b/tools/release/git_recipes.py index b4c9de6d6c..cca599bd4c 100644 --- a/tools/release/git_recipes.py +++ b/tools/release/git_recipes.py @@ -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) diff --git a/tools/release/test_scripts.py b/tools/release/test_scripts.py index 0cf1affca5..9021dc9cef 100644 --- a/tools/release/test_scripts.py +++ b/tools/release/test_scripts.py @@ -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.