From 8cab750a81553742391695828c7af6a9303f7003 Mon Sep 17 00:00:00 2001 From: "machenbach@chromium.org" Date: Tue, 15 Apr 2014 12:00:53 +0000 Subject: [PATCH] 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 --- tools/push-to-trunk/releases.py | 2 ++ tools/push-to-trunk/test_scripts.py | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/push-to-trunk/releases.py b/tools/push-to-trunk/releases.py index cb77337..578a9a1 100755 --- a/tools/push-to-trunk/releases.py +++ b/tools/push-to-trunk/releases.py @@ -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. diff --git a/tools/push-to-trunk/test_scripts.py b/tools/push-to-trunk/test_scripts.py index 28d67b8..108d151 100644 --- a/tools/push-to-trunk/test_scripts.py +++ b/tools/push-to-trunk/test_scripts.py @@ -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))) -- 2.7.4