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

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

Issue 500023003: Teach v8rel script to read git hashes from DEPS. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review Created 6 years, 4 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 | « tools/push-to-trunk/git_recipes.py ('k') | tools/push-to-trunk/test_scripts.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/push-to-trunk/releases.py
diff --git a/tools/push-to-trunk/releases.py b/tools/push-to-trunk/releases.py
index 586cbc1fde9732d1e7c004d9109e0003ec8bac1b..239189ee70f5183b2367e67e0370c4f20d5fd6ca 100755
--- a/tools/push-to-trunk/releases.py
+++ b/tools/push-to-trunk/releases.py
@@ -47,10 +47,10 @@ REVIEW_LINK_RE = re.compile(r"^Review URL: (.+)$", re.M)
# Expression with three versions (historical) for extracting the v8 revision
# from the chromium DEPS file.
-DEPS_RE = re.compile(r'^\s*(?:"v8_revision": "'
- '|\(Var\("googlecode_url"\) % "v8"\) \+ "\/trunk@'
- '|"http\:\/\/v8\.googlecode\.com\/svn\/trunk@)'
- '([0-9]+)".*$', re.M)
+DEPS_RE = re.compile(r"""^\s*(?:["']v8_revision["']: ["']"""
+ """|\(Var\("googlecode_url"\) % "v8"\) \+ "\/trunk@"""
+ """|"http\:\/\/v8\.googlecode\.com\/svn\/trunk@)"""
+ """([^"']+)["'].*$""", re.M)
# Expression to pick tag and revision for bleeding edge tags. To be used with
# output of 'svn log'.
@@ -374,6 +374,18 @@ class UpdateChromiumCheckout(Step):
self.GitCreateBranch(self.Config(BRANCHNAME))
+def ConvertToCommitNumber(step, revision):
+ # Simple check for git hashes.
+ if revision.isdigit() and len(revision) < 8:
+ return revision
+ try:
+ # TODO(machenbach): Add cwd to git calls.
+ os.chdir(os.path.join(step["chrome_path"], "v8"))
+ return step.GitConvertToSVNRevision(revision)
+ finally:
+ os.chdir(step["chrome_path"])
+
+
class RetrieveChromiumV8Releases(Step):
MESSAGE = "Retrieve V8 releases from Chromium DEPS."
REQUIRES = "chrome_path"
@@ -387,6 +399,14 @@ class RetrieveChromiumV8Releases(Step):
print "No releases detected. Skipping chromium history."
return True
+ # Update v8 checkout in chromium.
+ try:
+ # TODO(machenbach): Add cwd to git calls.
+ os.chdir(os.path.join(self["chrome_path"], "v8"))
+ self.GitFetchOrigin()
+ finally:
+ os.chdir(self["chrome_path"])
+
oldest_v8_rev = int(releases[-1]["revision"])
cr_releases = []
@@ -401,7 +421,7 @@ class RetrieveChromiumV8Releases(Step):
if match:
cr_rev = GetCommitPositionNumber(self, git_hash)
if cr_rev:
- v8_rev = match.group(1)
+ v8_rev = ConvertToCommitNumber(self, match.group(1))
cr_releases.append([cr_rev, v8_rev])
# Stop after reaching beyond the last v8 revision we want to update.
@@ -458,7 +478,7 @@ class RietrieveChromiumBranches(Step):
deps = FileToText(self.Config(DEPS_FILE))
match = DEPS_RE.search(deps)
if match:
- v8_rev = match.group(1)
+ v8_rev = ConvertToCommitNumber(self, match.group(1))
cr_branches.append([str(branch), v8_rev])
# Stop after reaching beyond the last v8 revision we want to update.
« no previous file with comments | « tools/push-to-trunk/git_recipes.py ('k') | tools/push-to-trunk/test_scripts.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698