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

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

Issue 225283007: Automatically determine current V8 sheriff in chromium-roll script. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 def RunStep(self): 83 def RunStep(self):
84 os.chdir(self["chrome_path"]) 84 os.chdir(self["chrome_path"])
85 85
86 # Patch DEPS file. 86 # Patch DEPS file.
87 deps = FileToText(self.Config(DEPS_FILE)) 87 deps = FileToText(self.Config(DEPS_FILE))
88 deps = re.sub("(?<=\"v8_revision\": \")([0-9]+)(?=\")", 88 deps = re.sub("(?<=\"v8_revision\": \")([0-9]+)(?=\")",
89 self["trunk_revision"], 89 self["trunk_revision"],
90 deps) 90 deps)
91 TextToFile(deps, self.Config(DEPS_FILE)) 91 TextToFile(deps, self.Config(DEPS_FILE))
92 92
93 if self._options.reviewer: 93 if self._options.reviewer and not self._options.manual:
94 print "Using account %s for review." % self._options.reviewer 94 print "Using account %s for review." % self._options.reviewer
95 rev = self._options.reviewer 95 rev = self._options.reviewer
96 else: 96 else:
97 print "Please enter the email address of a reviewer for the roll CL: ", 97 print "Please enter the email address of a reviewer for the roll CL: ",
98 self.DieNoManualMode("A reviewer must be specified in forced mode.") 98 self.DieNoManualMode("A reviewer must be specified in forced mode.")
99 rev = self.ReadLine() 99 rev = self.ReadLine()
100 100
101 commit_title = "Update V8 to %s." % self["push_title"].lower() 101 commit_title = "Update V8 to %s." % self["push_title"].lower()
102 self.GitCommit("%s\n\nTBR=%s" % (commit_title, rev)) 102 sheriff = ""
103 if self["sheriff"]:
104 sheriff = ("\n\nPlease reply to the V8 sheriff %s in case of problems."
105 % self["sheriff"])
106 self.GitCommit("%s%s\n\nTBR=%s" % (commit_title, sheriff, rev))
103 self.GitUpload(author=self._options.author, 107 self.GitUpload(author=self._options.author,
104 force=self._options.force_upload) 108 force=self._options.force_upload)
105 print "CL uploaded." 109 print "CL uploaded."
106 110
107 111
108 class SwitchV8(Step): 112 class SwitchV8(Step):
109 MESSAGE = "Returning to V8 checkout." 113 MESSAGE = "Returning to V8 checkout."
110 REQUIRES = "chrome_path" 114 REQUIRES = "chrome_path"
111 115
112 def RunStep(self): 116 def RunStep(self):
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 return False 156 return False
153 157
154 options.tbr_commit = not options.manual 158 options.tbr_commit = not options.manual
155 return True 159 return True
156 160
157 def _Steps(self): 161 def _Steps(self):
158 return [ 162 return [
159 Preparation, 163 Preparation,
160 DetectLastPush, 164 DetectLastPush,
161 CheckChromium, 165 CheckChromium,
166 DetermineV8Sheriff,
162 SwitchChromium, 167 SwitchChromium,
163 UpdateChromiumCheckout, 168 UpdateChromiumCheckout,
164 UploadCL, 169 UploadCL,
165 SwitchV8, 170 SwitchV8,
166 CleanUp, 171 CleanUp,
167 ] 172 ]
168 173
169 174
170 if __name__ == "__main__": # pragma: no cover 175 if __name__ == "__main__": # pragma: no cover
171 sys.exit(ChromiumRoll(CONFIG).Run()) 176 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