From d579836b9a6519c59c622bf9d8105728d710bf92 Mon Sep 17 00:00:00 2001 From: "machenbach@chromium.org" Date: Wed, 10 Sep 2014 07:51:13 +0000 Subject: [PATCH] Make merge script bypass hooks on upload. TEST=script_test.py R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/558053002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23823 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- tools/push-to-trunk/common_includes.py | 4 +++- tools/push-to-trunk/merge_to_branch.py | 1 + tools/push-to-trunk/test_scripts.py | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/push-to-trunk/common_includes.py b/tools/push-to-trunk/common_includes.py index 571cb181bb..5f2eff4553 100644 --- a/tools/push-to-trunk/common_includes.py +++ b/tools/push-to-trunk/common_includes.py @@ -557,7 +557,8 @@ class UploadStep(Step): 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) + self.GitUpload(reviewer, self._options.author, self._options.force_upload, + bypass_hooks=self._options.bypass_upload_hooks) class DetermineV8Sheriff(Step): @@ -680,6 +681,7 @@ class ScriptsBase(object): # Defaults for options, common to all scripts. options.manual = getattr(options, "manual", True) options.force = getattr(options, "force", False) + options.bypass_upload_hooks = False # Derived options. options.requires_editor = not options.force diff --git a/tools/push-to-trunk/merge_to_branch.py b/tools/push-to-trunk/merge_to_branch.py index bd9531fb93..f6e0bb0350 100755 --- a/tools/push-to-trunk/merge_to_branch.py +++ b/tools/push-to-trunk/merge_to_branch.py @@ -309,6 +309,7 @@ class MergeToBranch(ScriptsBase): if not options.message: print "You must specify a merge comment if no patches are specified" return False + options.bypass_upload_hooks = True return True def _Steps(self): diff --git a/tools/push-to-trunk/test_scripts.py b/tools/push-to-trunk/test_scripts.py index 0837326c31..e1f483b518 100644 --- a/tools/push-to-trunk/test_scripts.py +++ b/tools/push-to-trunk/test_scripts.py @@ -1142,7 +1142,8 @@ LOG=N RL("Y"), # Automatically increment patch level? 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\"", ""), + Cmd("git cl upload --send-mail -r \"reviewer@chromium.org\" " + "--bypass-hooks", ""), Cmd("git checkout -f %s" % TEST_CONFIG[BRANCHNAME], ""), RL("LGTM"), # Enter LGTM for V8 CL. Cmd("git cl presubmit", "Presubmit successfull\n"),