Reviewers: tandrii(chromium), Hablich,

Message:
PTAL


https://codereview.chromium.org/1067793002/diff/1/tools/release/releases.py
File tools/release/releases.py (right):

https://codereview.chromium.org/1067793002/diff/1/tools/release/releases.py#newcode404
tools/release/releases.py:404: # TODO(machenbach): Unify common code
with method above.
Sorry for the code dup... need to work on this TODO.

Description:
[release-tools] Fix v8rel in branch period.

In case the v8 revision in chromium was set to an older
revision that's not in the list of recent v8 releases, the
script will bail out too early. This changes iterates over
10 more revisions, which should cover all exceeding revisions
in branch period.

BUG=

Please review this at https://codereview.chromium.org/1067793002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+18, -2 lines):
  M tools/release/releases.py


Index: tools/release/releases.py
diff --git a/tools/release/releases.py b/tools/release/releases.py
index 9ff6e9b8f65b3a00d15a6024daa4990a95c655d1..2f152b6b2728dd3b941a6c96c539ba4ab833ce79 100755
--- a/tools/release/releases.py
+++ b/tools/release/releases.py
@@ -359,6 +359,7 @@ class RetrieveChromiumV8Releases(Step):
     releases_dict = dict((r["revision_git"], r) for r in self["releases"])

     cr_releases = []
+    count_past_last_v8 = 0
     try:
       for git_hash in self.GitLog(
           format="%H", grep="V8", cwd=cwd).splitlines():
@@ -374,10 +375,17 @@ class RetrieveChromiumV8Releases(Step):
             v8_hsh = match.group(1)
             cr_releases.append([cr_rev, v8_hsh])

+          if count_past_last_v8:
+            count_past_last_v8 += 1  # pragma: no cover
+
+          if count_past_last_v8 > 10:
+            break  # pragma: no cover
+
# Stop as soon as we find a v8 revision that we didn't fetch in the # v8-revision-retrieval part above (i.e. a revision that's too old).
+          # Just iterate a few more times in case there were reverts.
           if v8_hsh not in releases_dict:
-            break  # pragma: no cover
+            count_past_last_v8 += 1  # pragma: no cover

     # Allow Ctrl-C interrupt.
     except (KeyboardInterrupt, SystemExit):  # pragma: no cover
@@ -414,6 +422,7 @@ class RietrieveChromiumBranches(Step):
     branches = sorted(branches, reverse=True)

     cr_branches = []
+    count_past_last_v8 = 0
     try:
       for branch in branches:
         if not self.GitCheckoutFileSafe("DEPS",
@@ -426,10 +435,17 @@ class RietrieveChromiumBranches(Step):
           v8_hsh = match.group(1)
           cr_branches.append([str(branch), v8_hsh])

+          if count_past_last_v8:
+            count_past_last_v8 += 1  # pragma: no cover
+
+          if count_past_last_v8 > 10:
+            break  # pragma: no cover
+
# Stop as soon as we find a v8 revision that we didn't fetch in the # v8-revision-retrieval part above (i.e. a revision that's too old).
+          # Just iterate a few more times in case there were reverts.
           if v8_hsh not in releases_dict:
-            break  # pragma: no cover
+            count_past_last_v8 += 1  # pragma: no cover

     # Allow Ctrl-C interrupt.
     except (KeyboardInterrupt, SystemExit):  # pragma: no cover


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