Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 | 6 # This script retrieves the history of all V8 branches and |
| 7 # their corresponding Chromium revisions. | 7 # their corresponding Chromium revisions. |
| 8 | 8 |
| 9 # Requires a chromium checkout with branch heads: | 9 # Requires a chromium checkout with branch heads: |
| 10 # gclient sync --with_branch_heads | 10 # gclient sync --with_branch_heads |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 453 for current_version in current_os["versions"]: | 453 for current_version in current_os["versions"]: |
| 454 if current_version["channel"] != "canary": | 454 if current_version["channel"] != "canary": |
| 455 continue | 455 continue |
| 456 | 456 |
| 457 current_candidate = self._CreateCandidate(current_version) | 457 current_candidate = self._CreateCandidate(current_version) |
| 458 canaries.append(current_candidate) | 458 canaries.append(current_candidate) |
| 459 | 459 |
| 460 chrome_releases = {"canaries": canaries} | 460 chrome_releases = {"canaries": canaries} |
| 461 self["chrome_releases"] = chrome_releases | 461 self["chrome_releases"] = chrome_releases |
| 462 | 462 |
| 463 def _GetGitHashForV8Version(self, v8_version): | 463 def _ConvertToRealV8Version(self, v8_version): |
| 464 if v8_version.split(".")[3]== "0": | 464 if v8_version.split(".")[3]== "0": |
|
Michael Achenbach
2015/04/17 13:23:09
nit: space before ==
Michael Hablich
2015/04/20 12:29:34
Acknowledged.
Michael Achenbach
2015/04/28 20:48:49
Acknowledged but not resolved?
| |
| 465 return self.GitGetHashOfTag(v8_version[:-2]) | 465 return v8_version[:-2] |
| 466 | 466 return v8_version |
| 467 return self.GitGetHashOfTag(v8_version) | |
| 468 | 467 |
| 469 def _CreateCandidate(self, current_version): | 468 def _CreateCandidate(self, current_version): |
| 470 params = None | 469 params = None |
| 471 url_to_call = (OMAHA_PROXY_URL + "v8.json?version=" | 470 url_to_call = (OMAHA_PROXY_URL + "v8.json?version=" |
| 472 + current_version["previous_version"]) | 471 + current_version["previous_version"]) |
| 473 result_raw = self.ReadURL( | 472 result_raw = self.ReadURL( |
| 474 url_to_call, | 473 url_to_call, |
| 475 params, | 474 params, |
| 476 wait_plan=[5, 20] | 475 wait_plan=[5, 20] |
| 477 ) | 476 ) |
| 478 previous_v8_version = json.loads(result_raw)["v8_version"] | 477 previous_v8_version = ( |
| 479 v8_previous_version_hash = self._GetGitHashForV8Version(previous_v8_version) | 478 self._ConvertToRealV8Version(json.loads(result_raw)["v8_version"])) |
| 479 v8_previous_version_hash = self.GitGetHashOfTag(previous_v8_version) | |
| 480 | 480 |
| 481 current_v8_version = current_version["v8_version"] | 481 current_v8_version = ( |
| 482 v8_version_hash = self._GetGitHashForV8Version(current_v8_version) | 482 self._ConvertToRealV8Version(current_version["v8_version"])) |
| 483 v8_version_hash = self.GitGetHashOfTag(current_v8_version) | |
| 483 | 484 |
| 484 current_candidate = { | 485 current_candidate = { |
| 485 "chrome_version": current_version["version"], | 486 "chrome_version": current_version["version"], |
| 486 "os": current_version["os"], | 487 "os": current_version["os"], |
| 487 "release_date": current_version["current_reldate"], | 488 "release_date": current_version["current_reldate"], |
| 488 "v8_version": current_v8_version, | 489 "v8_version": current_v8_version, |
| 489 "v8_version_hash": v8_version_hash, | 490 "v8_version_hash": v8_version_hash, |
| 490 "v8_previous_version": previous_v8_version, | 491 "v8_previous_version": previous_v8_version, |
| 491 "v8_previous_version_hash": v8_previous_version_hash, | 492 "v8_previous_version_hash": v8_previous_version_hash, |
| 492 } | 493 } |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 560 RetrieveChromiumV8Releases, | 561 RetrieveChromiumV8Releases, |
| 561 RetrieveChromiumBranches, | 562 RetrieveChromiumBranches, |
| 562 RetrieveInformationOnChromeReleases, | 563 RetrieveInformationOnChromeReleases, |
| 563 CleanUp, | 564 CleanUp, |
| 564 WriteOutput, | 565 WriteOutput, |
| 565 ] | 566 ] |
| 566 | 567 |
| 567 | 568 |
| 568 if __name__ == "__main__": # pragma: no cover | 569 if __name__ == "__main__": # pragma: no cover |
| 569 sys.exit(Releases().Run()) | 570 sys.exit(Releases().Run()) |
| OLD | NEW |