Revision: 20497
Author:   [email protected]
Date:     Fri Apr  4 07:23:45 2014 UTC
Log:      Make auto-roll script also roll patched trunk revisions.

This will allow the auto-roll bot to roll the last trunk patches, e.g. "Version 3.4.5.1 ...".

BUG=
[email protected]

Review URL: https://codereview.chromium.org/223863003
http://code.google.com/p/v8/source/detail?r=20497

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

=======================================
--- /branches/bleeding_edge/tools/push-to-trunk/auto_roll.py Wed Apr 2 07:13:17 2014 UTC +++ /branches/bleeding_edge/tools/push-to-trunk/auto_roll.py Fri Apr 4 07:23:45 2014 UTC
@@ -47,7 +47,7 @@
   MESSAGE = "Detect commit ID of the last push to trunk."

   def RunStep(self):
-    push_hash = self.FindLastTrunkPush()
+    push_hash = self.FindLastTrunkPush(include_patches=True)
     self["last_push"] = self.GitSVNFindSVNRev(push_hash)


=======================================
--- /branches/bleeding_edge/tools/push-to-trunk/chromium_roll.py Fri Mar 21 12:15:25 2014 UTC +++ /branches/bleeding_edge/tools/push-to-trunk/chromium_roll.py Fri Apr 4 07:23:45 2014 UTC
@@ -30,7 +30,8 @@
   MESSAGE = "Detect commit ID of last push to trunk."

   def RunStep(self):
-    self["last_push"] = self._options.last_push or self.FindLastTrunkPush()
+    self["last_push"] = self._options.last_push or self.FindLastTrunkPush(
+        include_patches=True)
     self["trunk_revision"] = self.GitSVNFindSVNRev(self["last_push"])
     self["push_title"] = self.GitLog(n=1, format="%s",
                                      git_hash=self["last_push"])
=======================================
--- /branches/bleeding_edge/tools/push-to-trunk/common_includes.py Wed Apr 2 06:59:25 2014 UTC +++ /branches/bleeding_edge/tools/push-to-trunk/common_includes.py Fri Apr 4 07:23:45 2014 UTC
@@ -442,8 +442,12 @@
     except GitFailedException:
       self.WaitForResolvingConflicts(patch_file)

-  def FindLastTrunkPush(self, parent_hash=""):
- push_pattern = "^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based"
+  def FindLastTrunkPush(self, parent_hash="", include_patches=False):
+    push_pattern = "^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*"
+    if not include_patches:
+ # Non-patched versions only have three numbers followed by the "(based
+      # on...) comment."
+      push_pattern += " (based"
     branch = "" if parent_hash else "svn/trunk"
     return self.GitLog(n=1, format="%H", grep=push_pattern,
                        parent_hash=parent_hash, branch=branch)
=======================================
--- /branches/bleeding_edge/tools/push-to-trunk/test_scripts.py Thu Apr 3 13:01:22 2014 UTC +++ /branches/bleeding_edge/tools/push-to-trunk/test_scripts.py Fri Apr 4 07:23:45 2014 UTC
@@ -784,7 +784,7 @@
       Git("status -s -b -uno", "## some_branch\n"),
       Git("svn fetch", ""),
       Git(("log -1 --format=%H --grep="
-           "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\" "
+           "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\" "
            "svn/trunk"), "push_hash\n"),
       Git("svn find-rev push_hash", "123455\n"),
       Git("log -1 --format=%s push_hash",
@@ -944,7 +944,7 @@

     self.ExpectGit([
       Git(("log -1 --format=%H --grep="
-           "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\" "
+           "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\" "
            "svn/trunk"), "push_hash\n"),
       Git("svn find-rev push_hash", "123455\n"),
     ])
@@ -964,7 +964,7 @@

     self.ExpectGit([
       Git(("log -1 --format=%H --grep="
-           "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]* (based\" "
+           "\"^Version [[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*\" "
            "svn/trunk"), "push_hash\n"),
       Git("svn find-rev push_hash", "123456\n"),
     ])

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