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
parent 68b309ed
...@@ -557,7 +557,8 @@ class UploadStep(Step): ...@@ -557,7 +557,8 @@ class UploadStep(Step):
print "Please enter the email address of a V8 reviewer for your patch: ", print "Please enter the email address of a V8 reviewer for your patch: ",
self.DieNoManualMode("A reviewer must be specified in forced mode.") self.DieNoManualMode("A reviewer must be specified in forced mode.")
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)
class DetermineV8Sheriff(Step): class DetermineV8Sheriff(Step):
...@@ -680,6 +681,7 @@ class ScriptsBase(object): ...@@ -680,6 +681,7 @@ class ScriptsBase(object):
# Defaults for options, common to all scripts. # Defaults for options, common to all scripts.
options.manual = getattr(options, "manual", True) options.manual = getattr(options, "manual", True)
options.force = getattr(options, "force", False) options.force = getattr(options, "force", False)
options.bypass_upload_hooks = False
# Derived options. # Derived options.
options.requires_editor = not options.force options.requires_editor = not options.force
......
...@@ -309,6 +309,7 @@ class MergeToBranch(ScriptsBase): ...@@ -309,6 +309,7 @@ class MergeToBranch(ScriptsBase):
if not options.message: if not options.message:
print "You must specify a merge comment if no patches are specified" print "You must specify a merge comment if no patches are specified"
return False return False
options.bypass_upload_hooks = True
return True return True
def _Steps(self): def _Steps(self):
......
...@@ -1142,7 +1142,8 @@ LOG=N ...@@ -1142,7 +1142,8 @@ LOG=N
RL("Y"), # Automatically increment patch level? RL("Y"), # Automatically increment patch level?
Cmd("git commit -aF \"%s\"" % TEST_CONFIG[COMMITMSG_FILE], ""), Cmd("git commit -aF \"%s\"" % TEST_CONFIG[COMMITMSG_FILE], ""),
RL("reviewer@chromium.org"), # V8 reviewer. 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], ""), Cmd("git checkout -f %s" % TEST_CONFIG[BRANCHNAME], ""),
RL("LGTM"), # Enter LGTM for V8 CL. RL("LGTM"), # Enter LGTM for V8 CL.
Cmd("git cl presubmit", "Presubmit successfull\n"), Cmd("git cl presubmit", "Presubmit successfull\n"),
......
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