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

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

Issue 233343002: Fix chromium ranges output in v8 releases 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 | « no previous file | tools/push-to-trunk/test_scripts.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 # This script retrieves the history of all V8 branches and trunk revisions and 6 # This script retrieves the history of all V8 branches and trunk revisions and
7 # their corresponding Chromium revisions. 7 # their corresponding Chromium revisions.
8 8
9 import argparse 9 import argparse
10 import csv 10 import csv
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 ran = "%s:%d" % (cr_from[0], int(cr_to[0]) - 1) 99 ran = "%s:%d" % (cr_from[0], int(cr_to[0]) - 1)
100 100
101 # Collect the ranges in lists per revision. 101 # Collect the ranges in lists per revision.
102 range_lists.setdefault(cr_from[1], []).append(ran) 102 range_lists.setdefault(cr_from[1], []).append(ran)
103 103
104 # Add the newest revision. 104 # Add the newest revision.
105 if cr_releases: 105 if cr_releases:
106 range_lists.setdefault(cr_releases[-1][1], []).append(cr_releases[-1][0]) 106 range_lists.setdefault(cr_releases[-1][1], []).append(cr_releases[-1][0])
107 107
108 # Stringify and comma-separate the range lists. 108 # Stringify and comma-separate the range lists.
109 return dict((rev, ",".join(ran)) for rev, ran in range_lists.iteritems()) 109 return dict((rev, ", ".join(ran)) for rev, ran in range_lists.iteritems())
110 110
111 111
112 def MatchSafe(match): 112 def MatchSafe(match):
113 if match: 113 if match:
114 return match.group(1) 114 return match.group(1)
115 else: 115 else:
116 return "" 116 return ""
117 117
118 118
119 class Preparation(Step): 119 class Preparation(Step):
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 # The SVN revision on the branch. 159 # The SVN revision on the branch.
160 "revision": self.GitSVNFindSVNRev(git_hash), 160 "revision": self.GitSVNFindSVNRev(git_hash),
161 # The SVN revision on bleeding edge (only for newer trunk pushes). 161 # The SVN revision on bleeding edge (only for newer trunk pushes).
162 "bleeding_edge": self.GetBleedingEdgeFromPush(title), 162 "bleeding_edge": self.GetBleedingEdgeFromPush(title),
163 # The branch name. 163 # The branch name.
164 "branch": branch, 164 "branch": branch,
165 # The version for displaying in the form 3.26.3 or 3.26.3.12. 165 # The version for displaying in the form 3.26.3 or 3.26.3.12.
166 "version": version, 166 "version": version,
167 # Merged patches if available in the form 'r1234, r2345'. 167 # Merged patches if available in the form 'r1234, r2345'.
168 "patches_merged": patches, 168 "patches_merged": patches,
169 # Default for easier output formatting.
170 "chromium_revision": "",
169 }, self["patch"] 171 }, self["patch"]
170 172
171 def GetReleasesFromBranch(self, branch): 173 def GetReleasesFromBranch(self, branch):
172 self.GitReset("svn/%s" % branch) 174 self.GitReset("svn/%s" % branch)
173 releases = [] 175 releases = []
174 try: 176 try:
175 for git_hash in self.GitLog(format="%H").splitlines(): 177 for git_hash in self.GitLog(format="%H").splitlines():
176 if self._config[VERSION_FILE] not in self.GitChangedFiles(git_hash): 178 if self._config[VERSION_FILE] not in self.GitChangedFiles(git_hash):
177 continue 179 continue
178 if self.ExceedsMax(releases): 180 if self.ExceedsMax(releases):
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 UpdateChromiumCheckout, 377 UpdateChromiumCheckout,
376 RetrieveChromiumV8Releases, 378 RetrieveChromiumV8Releases,
377 SwitchV8, 379 SwitchV8,
378 CleanUp, 380 CleanUp,
379 WriteOutput, 381 WriteOutput,
380 ] 382 ]
381 383
382 384
383 if __name__ == "__main__": # pragma: no cover 385 if __name__ == "__main__": # pragma: no cover
384 sys.exit(Releases(CONFIG).Run()) 386 sys.exit(Releases(CONFIG).Run())
OLDNEW
« no previous file with comments | « no previous file | tools/push-to-trunk/test_scripts.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698