Reviewers: jarin, hinoka,
Message:
PTAL
Description:
Teach chromium_roll script to roll v8 git hashes.
TEST=script_test.py
Please review this at https://codereview.chromium.org/504793002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+8, -5 lines):
M tools/push-to-trunk/chromium_roll.py
M tools/push-to-trunk/test_scripts.py
Index: tools/push-to-trunk/chromium_roll.py
diff --git a/tools/push-to-trunk/chromium_roll.py
b/tools/push-to-trunk/chromium_roll.py
index
0138ff8e72f8bb898ffafd0ab46bb4e1b3d360c2..c5687d1bc29caeff9865e5fa5fcea38995e12a9d
100755
--- a/tools/push-to-trunk/chromium_roll.py
+++ b/tools/push-to-trunk/chromium_roll.py
@@ -84,11 +84,9 @@ class UploadCL(Step):
os.chdir(self["chrome_path"])
# Patch DEPS file.
- deps = FileToText(self.Config(DEPS_FILE))
- deps = re.sub("(?<=\"v8_revision\": \")([0-9]+)(?=\")",
- self["trunk_revision"],
- deps)
- TextToFile(deps, self.Config(DEPS_FILE))
+ if self._side_effect_handler.Command(
+ "roll-dep", "v8 %s" % self["trunk_revision"]) is None:
+ self.Die("Failed to create deps for %s" % self["trunk_revision"])
if self._options.reviewer and not self._options.manual:
print "Using account %s for review." % self._options.reviewer
Index: tools/push-to-trunk/test_scripts.py
diff --git a/tools/push-to-trunk/test_scripts.py
b/tools/push-to-trunk/test_scripts.py
index
7a40985201fcaab2ab090e81a872ca31bd9a789d..602e578ed8ba97215a6bcccc72268060f8f3b2ab
100644
--- a/tools/push-to-trunk/test_scripts.py
+++ b/tools/push-to-trunk/test_scripts.py
@@ -369,6 +369,7 @@ class ScriptTest(unittest.TestCase):
MOCKS = {
"git": GitMock,
+ "roll-dep": GitMock, # TODO(machenbach): Yet another hack. Unify all
mocks.
# TODO(machenbach): Little hack to reuse the git mock for the one svn
call
# in merge-to-branch. The command should be made explicit in the test
# expectations.
@@ -834,6 +835,9 @@ def get_list():
os.makedirs(TEST_CONFIG[CHROMIUM])
TextToFile("Some line\n \"v8_revision\": \"123444\",\n some line",
TEST_CONFIG[DEPS_FILE])
+ def WriteDeps():
+ TextToFile("Some line\n \"v8_revision\": \"123455\",\n some line",
+ TEST_CONFIG[DEPS_FILE])
os.environ["EDITOR"] = "vi"
force_flag = " -f" if not manual else ""
@@ -851,6 +855,7 @@ def get_list():
Git("checkout -f master", ""),
Git("pull", ""),
Git("checkout -b v8-roll-123455", ""),
+ Git("v8 123455", "rolled", cb=WriteDeps),
Git(("commit -am \"Update V8 to version 3.22.5 "
"(based on bleeding_edge revision r123454).\n\n"
"Please reply to the V8 sheriff [email protected] in "
--
--
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/d/optout.