Make merge script bypass hooks on upload.
authormachenbach@chromium.org <machenbach@chromium.org>
Wed, 10 Sep 2014 07:51:13 +0000 (07:51 +0000)
committermachenbach@chromium.org <machenbach@chromium.org>
Wed, 10 Sep 2014 07:51:13 +0000 (07:51 +0000)
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
tools/push-to-trunk/merge_to_branch.py
tools/push-to-trunk/test_scripts.py

index 571cb18..5f2eff4 100644 (file)
@@ -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
index bd9531f..f6e0bb0 100755 (executable)
@@ -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):
index 0837326..e1f483b 100644 (file)
@@ -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"),