Revision: 18778
Author: [email protected]
Date: Thu Jan 23 13:44:52 2014 UTC
Log: Show v8 bleeding edge revision in trunk and Chromium commit
message.
This allows to map from a V8 Chromium roll to the bleeding_edge revision
used for the roll.
This CL also improves some test code:
- Don't loose assertion exceptions in mocked git on retry.
- Remove an unused method
BUG=337167
LOG=n
[email protected]
Review URL: https://codereview.chromium.org/139993006
http://code.google.com/p/v8/source/detail?r=18778
Modified:
/branches/bleeding_edge/tools/push-to-trunk/push_to_trunk.py
/branches/bleeding_edge/tools/push-to-trunk/test_scripts.py
=======================================
--- /branches/bleeding_edge/tools/push-to-trunk/push_to_trunk.py Thu Jan 23
10:55:40 2014 UTC
+++ /branches/bleeding_edge/tools/push-to-trunk/push_to_trunk.py Thu Jan 23
13:44:52 2014 UTC
@@ -292,6 +292,15 @@
# Remove date and trailing white space.
text = re.sub(r"^%s: " % self._state["date"], "", text.rstrip())
+ # Retrieve svn revision for showing the used bleeding edge revision in
the
+ # commit message.
+ args = "svn find-rev %s" % self._state["prepare_commit_hash"]
+ svn_revision = self.Git(args).strip()
+ self.Persist("svn_revision", svn_revision)
+ text = MSub(r"^(Version \d+\.\d+\.\d+)$",
+ "\\1 (based on bleeding_edge revision r%s)" % svn_revision,
+ text)
+
# Remove indentation and merge paragraphs into single long lines,
keeping
# empty lines between them.
def SplitMapJoin(split_text, fun, join_text):
@@ -477,7 +486,10 @@
print "Please enter the email address of a reviewer for the roll
CL: ",
self.DieNoManualMode("A reviewer must be specified in forced mode.")
rev = self.ReadLine()
- args = "commit -am \"Update V8 to version %s.\n\nTBR=%s\"" % (ver, rev)
+ self.RestoreIfUnset("svn_revision")
+ args = ("commit -am \"Update V8 to version %s "
+ "(based on bleeding_edge revision r%s).\n\nTBR=%s\""
+ % (ver, self._state["svn_revision"], rev))
if self.Git(args) is None:
self.Die("'git commit' failed.")
force_flag = " -f" if self._options.force_upload else ""
=======================================
--- /branches/bleeding_edge/tools/push-to-trunk/test_scripts.py Fri Jan 17
11:29:43 2014 UTC
+++ /branches/bleeding_edge/tools/push-to-trunk/test_scripts.py Thu Jan 23
13:44:52 2014 UTC
@@ -28,6 +28,7 @@
import os
import tempfile
+import traceback
import unittest
import common_includes
@@ -247,7 +248,11 @@
# The expectation list contains a mandatory return value and an
optional
# callback for checking the context at the time of the call.
if len(expected_call) == len(args) + 2:
- expected_call[len(args) + 1]()
+ try:
+ expected_call[len(args) + 1]()
+ except:
+ tb = traceback.format_exc()
+ raise NoRetryException("Caught exception from callback: %s" % tb)
return_value = expected_call[len(args)]
# If the return value is an exception, raise it instead of returning.
@@ -563,6 +568,7 @@
self.ExpectGit([
["diff svn/trunk hash1", "patch content"],
+ ["svn find-rev hash1", "123455\n"],
])
self.MakeStep().Persist("prepare_commit_hash", "hash1")
@@ -581,7 +587,7 @@
Chromium issue 12345
Performance and stability improvements on all platforms.\n"""
- commit_msg = """Version 3.22.5
+ commit_msg = """Version 3.22.5 (based on bleeding_edge revision
r123455)
Log text 1. Chromium issue 12345
@@ -595,7 +601,7 @@
12345).
Performance and stability improvements on all platforms.\n"""
- commit_msg = """Version 3.22.5
+ commit_msg = """Version 3.22.5 (based on bleeding_edge revision
r123455)
Long commit message that fills more than 80 characters (Chromium issue
12345).
@@ -631,13 +637,14 @@
version = FileToText(TEST_CONFIG[VERSION_FILE])
self.assertTrue(re.search(r"#define BUILD_NUMBER\s+6", version))
- def CheckUpload():
- cl = FileToText(TEST_CONFIG[CHANGELOG_FILE])
-
def CheckSVNCommit():
commit = FileToText(TEST_CONFIG[COMMITMSG_FILE])
- self.assertTrue(re.search(r"Version 3.22.5", commit))
- self.assertTrue(re.search(r"Log text 1 \(issue 321\).", commit))
+ self.assertEquals(
+"""Version 3.22.5 (based on bleeding_edge revision r123455)
+
+Log text 1 (issue 321).
+
+Performance and stability improvements on all platforms.""", commit)
version = FileToText(TEST_CONFIG[VERSION_FILE])
self.assertTrue(re.search(r"#define MINOR_VERSION\s+22", version))
self.assertTrue(re.search(r"#define BUILD_NUMBER\s+5", version))
@@ -676,6 +683,7 @@
"Now working on version 3.22.6.\""),
"hash1\n"],
["diff svn/trunk hash1", "patch content\n"],
+ ["svn find-rev hash1", "123455\n"],
["checkout -b %s svn/trunk" % TEST_CONFIG[TRUNKBRANCH], ""],
["apply --index --reject \"%s\"" % TEST_CONFIG[PATCH_FILE], ""],
["add \"%s\"" % TEST_CONFIG[VERSION_FILE], ""],
@@ -686,7 +694,8 @@
["checkout master", ""],
["pull", ""],
["checkout -b v8-roll-123456", ""],
- [("commit -am \"Update V8 to version 3.22.5.\n\n"
+ [("commit -am \"Update V8 to version 3.22.5 "
+ "(based on bleeding_edge revision r123455).\n\n"
"[email protected]\""),
""],
["cl upload --send-mail%s" % force_flag, ""],
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.