Let revision script add commit dates.

BUG=
R=jkummerow@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20763 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
machenbach@chromium.org 2014-04-15 12:00:53 +00:00
parent 610fcfa916
commit 8cab750a81
2 changed files with 8 additions and 3 deletions

View File

@ -168,6 +168,8 @@ class RetrieveV8Releases(Step):
"branch": branch,
# The version for displaying in the form 3.26.3 or 3.26.3.12.
"version": version,
# The date of the commit.
"date": self.GitLog(n=1, format="%ci", git_hash=git_hash),
# Merged patches if available in the form 'r1234, r2345'.
"patches_merged": patches,
# Default for easier output formatting.

View File

@ -1191,6 +1191,7 @@ LOG=N
"Version 3.3.1.1 (merged 12)\n\nReview URL: fake.com\n"),
Git("log -1 --format=%s hash2", ""),
Git("svn find-rev hash2", "234"),
Git("log -1 --format=%ci hash2", "18:15"),
Git("checkout -f HEAD -- %s" % TEST_CONFIG[VERSION_FILE], "",
cb=ResetVersion(22, 5)),
Git("reset --hard svn/3.21", ""),
@ -1201,6 +1202,7 @@ LOG=N
Git("log -1 --format=%B hash3", ""),
Git("log -1 --format=%s hash3", ""),
Git("svn find-rev hash3", "123"),
Git("log -1 --format=%ci hash3", "03:15"),
Git("checkout -f HEAD -- %s" % TEST_CONFIG[VERSION_FILE], "",
cb=ResetVersion(22, 5)),
Git("reset --hard svn/trunk", ""),
@ -1211,6 +1213,7 @@ LOG=N
Git("log -1 --format=%B hash6", ""),
Git("log -1 --format=%s hash6", ""),
Git("svn find-rev hash6", "345"),
Git("log -1 --format=%ci hash6", ""),
Git("checkout -f HEAD -- %s" % TEST_CONFIG[VERSION_FILE], "",
cb=ResetVersion(22, 5)),
Git("status -s -uno", ""),
@ -1247,15 +1250,15 @@ LOG=N
expected_json = [
{"bleeding_edge": "", "patches_merged": "", "version": "3.22.3",
"chromium_revision": "4567", "branch": "trunk", "revision": "345",
"review_link": "",
"review_link": "", "date": "",
"revision_link": "https://code.google.com/p/v8/source/detail?r=345"},
{"patches_merged": "", "bleeding_edge": "", "version": "3.21.2",
"chromium_revision": "", "branch": "3.21", "revision": "123",
"review_link": "",
"review_link": "", "date": "03:15",
"revision_link": "https://code.google.com/p/v8/source/detail?r=123"},
{"patches_merged": "12", "bleeding_edge": "", "version": "3.3.1.1",
"chromium_revision": "", "branch": "3.3", "revision": "234",
"review_link": "fake.com",
"review_link": "fake.com", "date": "18:15",
"revision_link": "https://code.google.com/p/v8/source/detail?r=234"},
]
self.assertEquals(expected_json, json.loads(FileToText(json_output)))