Reviewers: Benedikt Meurer,

Message:
PTAL

Description:
Make merge script bypass hooks on upload.

TEST=script_test.py

Please review this at https://codereview.chromium.org/558053002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+6, -2 lines):
  M tools/push-to-trunk/common_includes.py
  M tools/push-to-trunk/merge_to_branch.py
  M tools/push-to-trunk/test_scripts.py


Index: tools/push-to-trunk/common_includes.py
diff --git a/tools/push-to-trunk/common_includes.py b/tools/push-to-trunk/common_includes.py index 571cb181bbee9f8cb1955df27f4460862e89d791..5f2eff4553e9e99fd8231f4d59740aece89bdd8b 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
Index: tools/push-to-trunk/merge_to_branch.py
diff --git a/tools/push-to-trunk/merge_to_branch.py b/tools/push-to-trunk/merge_to_branch.py index bd9531fb93ad0f1094684d7d7e704e0434afa454..f6e0bb0350d83e50e04287f02e75cdf131863e3b 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):
Index: tools/push-to-trunk/test_scripts.py
diff --git a/tools/push-to-trunk/test_scripts.py b/tools/push-to-trunk/test_scripts.py index 0837326c3191839559fe480e3cd3fb903ebadf5e..e1f483b518cc098f3a59f4102cc79748d1f4514f 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("[email protected]"),  # V8 reviewer.
-      Cmd("git cl upload --send-mail -r \"[email protected]\"", ""),
+      Cmd("git cl upload --send-mail -r \"[email protected]\" "
+          "--bypass-hooks", ""),
       Cmd("git checkout -f %s" % TEST_CONFIG[BRANCHNAME], ""),
       RL("LGTM"),  # Enter LGTM for V8 CL.
       Cmd("git cl presubmit", "Presubmit successfull\n"),


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to