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

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

Issue 196173018: Change auto-roll to auto-push for automatic trunk pushes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/auto_roll.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/push-to-trunk/auto_push.py
diff --git a/tools/push-to-trunk/auto_roll.py b/tools/push-to-trunk/auto_push.py
similarity index 79%
rename from tools/push-to-trunk/auto_roll.py
rename to tools/push-to-trunk/auto_push.py
index 6ae24d3879baae5e3acd0e6d4d8c065161543115..9a43c3f5b3d697c886331461ce094be9ed876493 100755
--- a/tools/push-to-trunk/auto_roll.py
+++ b/tools/push-to-trunk/auto_push.py
@@ -55,7 +55,7 @@ class Preparation(Step):
self.CommonPrepare()
-class CheckAutoRollSettings(Step):
+class CheckAutoPushSettings(Step):
MESSAGE = "Checking settings file."
def RunStep(self):
@@ -114,47 +114,25 @@ class CheckLastPush(Step):
class PushToTrunk(Step):
MESSAGE = "Pushing to trunk if specified."
- def PushTreeStatus(self, message):
- if not self._options.status_password:
- print "Skipping tree status update without password file."
- return
- params = {
- "message": message,
- "username": "v8-auto-roll@chromium.org",
- "password": FileToText(self._options.status_password).strip(),
- }
- params = urllib.urlencode(params)
- print "Pushing tree status: '%s'" % message
- self.ReadURL("https://v8-status.appspot.com/status", params,
- wait_plan=[5, 20])
-
def RunStep(self):
print "Pushing lkgr %s to trunk." % self["lkgr"]
- self.PushTreeStatus("Tree is closed (preparing to push)")
# TODO(machenbach): Update the script before calling it.
- try:
- if self._options.push:
- P = push_to_trunk.PushToTrunk
- self._side_effect_handler.Call(
- P(push_to_trunk.CONFIG, self._side_effect_handler).Run,
- ["--author", self._options.author,
- "--reviewer", self._options.reviewer,
- "--revision", self["lkgr"],
- "--force"])
- finally:
- self.PushTreeStatus(self["tree_message"])
-
-
-class AutoRoll(ScriptsBase):
+ if self._options.push:
+ P = push_to_trunk.PushToTrunk
+ self._side_effect_handler.Call(
+ P(push_to_trunk.CONFIG, self._side_effect_handler).Run,
+ ["--author", self._options.author,
+ "--reviewer", self._options.reviewer,
+ "--revision", self["lkgr"],
+ "--force"])
+
+
+class AutoPush(ScriptsBase):
def _PrepareOptions(self, parser):
- parser.add_argument("-c", "--chromium",
- help=("Deprecated."))
parser.add_argument("-p", "--push",
help="Push to trunk. Dry run if unspecified.",
default=False, action="store_true")
- parser.add_argument("--status-password",
- help="A file with the password to the status app.")
def _ProcessOptions(self, options):
if not options.author or not options.reviewer: # pragma: no cover
@@ -166,7 +144,7 @@ class AutoRoll(ScriptsBase):
def _Steps(self):
return [
Preparation,
- CheckAutoRollSettings,
+ CheckAutoPushSettings,
CheckTreeStatus,
FetchLKGR,
CheckLastPush,
@@ -175,4 +153,4 @@ class AutoRoll(ScriptsBase):
if __name__ == "__main__": # pragma: no cover
- sys.exit(AutoRoll(CONFIG).Run())
+ sys.exit(AutoPush(CONFIG).Run())
« no previous file with comments | « no previous file | tools/push-to-trunk/auto_roll.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698