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

Side by Side Diff: tools/push-to-trunk/chromium_roll.py

Issue 529423002: Add dry-run feature to auto roll scripts. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/push-to-trunk/auto_roll.py ('k') | tools/push-to-trunk/common_includes.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 the V8 project authors. All rights reserved. 2 # Copyright 2014 the V8 project authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import argparse 6 import argparse
7 import os 7 import os
8 import sys 8 import sys
9 9
10 from common_includes import * 10 from common_includes import *
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 "roll-dep", "v8 %s" % self["trunk_revision"]) is None: 80 "roll-dep", "v8 %s" % self["trunk_revision"]) is None:
81 self.Die("Failed to create deps for %s" % self["trunk_revision"]) 81 self.Die("Failed to create deps for %s" % self["trunk_revision"])
82 82
83 commit_title = "Update V8 to %s." % self["push_title"].lower() 83 commit_title = "Update V8 to %s." % self["push_title"].lower()
84 sheriff = "" 84 sheriff = ""
85 if self["sheriff"]: 85 if self["sheriff"]:
86 sheriff = ("\n\nPlease reply to the V8 sheriff %s in case of problems." 86 sheriff = ("\n\nPlease reply to the V8 sheriff %s in case of problems."
87 % self["sheriff"]) 87 % self["sheriff"])
88 self.GitCommit("%s%s\n\nTBR=%s" % 88 self.GitCommit("%s%s\n\nTBR=%s" %
89 (commit_title, sheriff, self._options.reviewer)) 89 (commit_title, sheriff, self._options.reviewer))
90 self.GitUpload(author=self._options.author, 90 if not self._options.dry_run:
91 force=True, 91 self.GitUpload(author=self._options.author,
92 cq=self._options.use_commit_queue) 92 force=True,
93 print "CL uploaded." 93 cq=self._options.use_commit_queue)
94 print "CL uploaded."
95 else:
96 self.GitCheckout("master")
97 self.GitDeleteBranch("v8-roll-%s" % self["trunk_revision"])
98 print "Dry run - don't upload."
94 99
95 100
96 class SwitchV8(Step): 101 class SwitchV8(Step):
97 MESSAGE = "Returning to V8 checkout." 102 MESSAGE = "Returning to V8 checkout."
98 103
99 def RunStep(self): 104 def RunStep(self):
100 os.chdir(self["v8_path"]) 105 os.chdir(self["v8_path"])
101 106
102 107
103 class CleanUp(Step): 108 class CleanUp(Step):
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 SwitchChromium, 146 SwitchChromium,
142 UpdateChromiumCheckout, 147 UpdateChromiumCheckout,
143 UploadCL, 148 UploadCL,
144 SwitchV8, 149 SwitchV8,
145 CleanUp, 150 CleanUp,
146 ] 151 ]
147 152
148 153
149 if __name__ == "__main__": # pragma: no cover 154 if __name__ == "__main__": # pragma: no cover
150 sys.exit(ChromiumRoll(CONFIG).Run()) 155 sys.exit(ChromiumRoll(CONFIG).Run())
OLDNEW
« no previous file with comments | « tools/push-to-trunk/auto_roll.py ('k') | tools/push-to-trunk/common_includes.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698