Fix chromium ranges output in v8 releases script.

Add space after commas for auto line break in spreadsheets.
Add default empty strings to avoid undefined values in spreadsheets.

BUG=
R=jarin@chromium.org

Review URL: https://codereview.chromium.org/233343002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20671 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
machenbach@chromium.org 2014-04-11 07:40:48 +00:00
parent a640707213
commit f1c2b7007d
2 changed files with 6 additions and 4 deletions

View File

@ -106,7 +106,7 @@ def BuildRevisionRanges(cr_releases):
range_lists.setdefault(cr_releases[-1][1], []).append(cr_releases[-1][0])
# Stringify and comma-separate the range lists.
return dict((rev, ",".join(ran)) for rev, ran in range_lists.iteritems())
return dict((rev, ", ".join(ran)) for rev, ran in range_lists.iteritems())
def MatchSafe(match):
@ -166,6 +166,8 @@ class RetrieveV8Releases(Step):
"version": version,
# Merged patches if available in the form 'r1234, r2345'.
"patches_merged": patches,
# Default for easier output formatting.
"chromium_revision": "",
}, self["patch"]
def GetReleasesFromBranch(self, branch):

View File

@ -105,7 +105,7 @@ class ToplevelTest(unittest.TestCase):
self.assertEquals({"10": "100", "9": "99:99", "3": "91:98"},
B([["100", "10"], ["99", "9"], ["91", "3"]]))
self.assertEquals({"13": "101", "12": "100:100", "9": "94:97",
"3": "91:93,98:99"},
"3": "91:93, 98:99"},
B([["101", "13"], ["100", "12"], ["98", "3"],
["94", "9"], ["91", "3"]]))
@ -1245,9 +1245,9 @@ LOG=N
{"bleeding_edge": "", "patches_merged": "", "version": "3.22.3",
"chromium_revision": "4567", "branch": "trunk", "revision": "345"},
{"patches_merged": "", "bleeding_edge": "", "version": "3.21.2",
"branch": "3.21", "revision": "123"},
"chromium_revision": "", "branch": "3.21", "revision": "123"},
{"patches_merged": "12", "bleeding_edge": "", "version": "3.3.1.1",
"branch": "3.3", "revision": "234"}
"chromium_revision": "", "branch": "3.3", "revision": "234"}
]
self.assertEquals(expected_json, json.loads(FileToText(json_output)))