Revision: 23379
Author:   [email protected]
Date:     Mon Aug 25 20:04:23 2014 UTC
Log:      Teach chromium_roll script to roll v8 git hashes.

TEST=script_test.py
[email protected]

Review URL: https://codereview.chromium.org/504793002
https://code.google.com/p/v8/source/detail?r=23379

Modified:
 /branches/bleeding_edge/tools/push-to-trunk/chromium_roll.py
 /branches/bleeding_edge/tools/push-to-trunk/test_scripts.py

=======================================
--- /branches/bleeding_edge/tools/push-to-trunk/chromium_roll.py Wed Jun 25 08:17:45 2014 UTC +++ /branches/bleeding_edge/tools/push-to-trunk/chromium_roll.py Mon Aug 25 20:04:23 2014 UTC
@@ -84,11 +84,9 @@
     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
=======================================
--- /branches/bleeding_edge/tools/push-to-trunk/test_scripts.py Mon Aug 25 13:39:43 2014 UTC +++ /branches/bleeding_edge/tools/push-to-trunk/test_scripts.py Mon Aug 25 20:04:23 2014 UTC
@@ -369,6 +369,7 @@

   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 @@
       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 @@
       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.

Reply via email to