Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: tools/push-to-trunk/auto_roll.py

Issue 141633003: Activate calling push-to-trunk in auto-roll script. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/push-to-trunk/common_includes.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/push-to-trunk/auto_roll.py
diff --git a/tools/push-to-trunk/auto_roll.py b/tools/push-to-trunk/auto_roll.py
index 94fd7b4c97eab30c1d96918752e2441cd59a3d07..ac2067c61ecc96111e07e002fdaefd9c29cf96be 100755
--- a/tools/push-to-trunk/auto_roll.py
+++ b/tools/push-to-trunk/auto_roll.py
@@ -34,6 +34,9 @@ import sys
import urllib
from common_includes import *
+import push_to_trunk
+from push_to_trunk import PushToTrunkOptions
+from push_to_trunk import RunPushToTrunk
SETTINGS_LOCATION = "SETTINGS_LOCATION"
@@ -49,6 +52,9 @@ class AutoRollOptions(CommonOptions):
super(AutoRollOptions, self).__init__(options)
self.requires_editor = False
self.status_password = options.status_password
+ self.r = options.r
+ self.c = options.c
+ self.push = getattr(options, 'push', False)
class Preparation(Step):
@@ -150,10 +156,16 @@ class PushToTrunk(Step):
# TODO(machenbach): Call push to trunk script.
# TODO(machenbach): Update the script before calling it.
- # self._side_effect_handler.Command(
- # "tools/push-to-trunk/push-to-trunk.py",
- # "-f -c %s -r %s" % (self._options.c, self._options.r))
- self.PushTreeStatus(self._state["tree_message"])
+ try:
+ if self._options.push:
+ self._side_effect_handler.Call(
+ RunPushToTrunk,
+ push_to_trunk.CONFIG,
+ PushToTrunkOptions.MakeForcedOptions(self._options.r,
+ self._options.c),
+ self._side_effect_handler)
+ finally:
+ self.PushTreeStatus(self._state["tree_message"])
else:
print("ToT (r%d) is ahead of the LKGR (r%d). Skipping push to trunk."
% (latest, lkgr))
@@ -179,6 +191,9 @@ def BuildOptions():
result.add_option("-c", "--chromium", dest="c",
help=("Specify the path to your Chromium src/ "
"directory to automate the V8 roll."))
+ result.add_option("-p", "--push",
+ help="Push to trunk if possible. Dry run if unspecified.",
+ default=False, action="store_true")
result.add_option("-r", "--reviewer", dest="r",
help=("Specify the account name to be used for reviews."))
result.add_option("-s", "--step", dest="s",
« no previous file with comments | « no previous file | tools/push-to-trunk/common_includes.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698