Changeset 143903 in webkit
- Timestamp:
- Feb 25, 2013 4:26:14 AM (11 years ago)
- Location:
- trunk/Tools
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r143898 r143903 1 2013-02-25 Ryosuke Niwa <rniwa@webkit.org> 2 3 run-perf-tests reports wrong commit time 4 https://bugs.webkit.org/show_bug.cgi?id=110746 5 6 Reviewed by Andreas Kling. 7 8 The bug was caused by running "svn info" on a subdirectory, which returns a timestamp 9 of when the subdirectory was last modified. 10 11 Run "svn info -r <revision> <repository root>" instead. Specifying revision number is 12 insufficient since running "svn log -r <revision>" on a partial checkout only returns 13 an empty result if the revision didn't modify the subdirectory. 14 15 For git, there is no partial checkout, so we just need to pass in "-r" option to keep 16 the interface compatible with svn. 17 18 * Scripts/webkitpy/common/checkout/scm/git.py: 19 (Git.timestamp_of_latest_commit): 20 * Scripts/webkitpy/common/checkout/scm/scm.py: 21 (SCM.timestamp_of_latest_commit): 22 * Scripts/webkitpy/common/checkout/scm/scm_mock.py: 23 (MockSCM.timestamp_of_latest_commit): 24 * Scripts/webkitpy/common/checkout/scm/scm_unittest.py: 25 (test_timestamp_of_latest_commit): 26 * Scripts/webkitpy/common/checkout/scm/svn.py: 27 (SVN.timestamp_of_latest_commit): 28 * Scripts/webkitpy/performance_tests/perftestsrunner.py: 29 (PerfTestsRunner._generate_results_dict): 30 1 31 2013-02-25 Jochen Eisinger <jochen@chromium.org> 2 32 -
trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py
r143833 r143903 255 255 return str(match.group('svn_revision')) 256 256 257 def timestamp_of_latest_commit(self, path ):258 git_log = self._run_git(['log', '-1', '- -date=iso', self.find_checkout_root(path)])257 def timestamp_of_latest_commit(self, path, revision): 258 git_log = self._run_git(['log', '-1', '-r', revision, '--date=iso', self.find_checkout_root(path)]) 259 259 match = re.search("^Date:\s*(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-])(\d{2})(\d{2})$", git_log, re.MULTILINE) 260 260 if not match: -
trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py
r143833 r143903 170 170 self._subclass_must_implement() 171 171 172 def timestamp_of_latest_commit(self, path ):172 def timestamp_of_latest_commit(self, path, revision): 173 173 self._subclass_must_implement() 174 174 -
trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_mock.py
r143833 r143903 85 85 return '5678' 86 86 87 def timestamp_of_latest_commit(self, path ):87 def timestamp_of_latest_commit(self, path, revision): 88 88 return '2013-02-01 08:48:05 +0000' 89 89 -
trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py
r143833 r143903 1583 1583 scm.find_checkout_root = lambda path: '' 1584 1584 scm._run_git = lambda args: 'Date: 2013-02-08 08:05:49 +0000' 1585 self.assertEqual(scm.timestamp_of_latest_commit('some-path' ), '2013-02-08T08:05:49Z')1585 self.assertEqual(scm.timestamp_of_latest_commit('some-path', '12345'), '2013-02-08T08:05:49Z') 1586 1586 1587 1587 scm._run_git = lambda args: 'Date: 2013-02-08 01:02:03 +0130' 1588 self.assertEqual(scm.timestamp_of_latest_commit('some-path' ), '2013-02-07T23:32:03Z')1588 self.assertEqual(scm.timestamp_of_latest_commit('some-path', '12345'), '2013-02-07T23:32:03Z') 1589 1589 1590 1590 scm._run_git = lambda args: 'Date: 2013-02-08 01:55:21 -0800' 1591 self.assertEqual(scm.timestamp_of_latest_commit('some-path' ), '2013-02-08T09:55:21Z')1591 self.assertEqual(scm.timestamp_of_latest_commit('some-path', '12345'), '2013-02-08T09:55:21Z') -
trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py
r143839 r143903 247 247 return self.value_from_svn_info(path, 'Revision') 248 248 249 def timestamp_of_latest_commit(self, path ):249 def timestamp_of_latest_commit(self, path, revision): 250 250 # We use --xml to get timestamps like 2013-02-08T08:18:04.964409Z 251 info_output = Executive().run_command([self.executable_name, 'info', '--xml'], cwd=path).rstrip() 251 repository_root = self.value_from_svn_info(self.checkout_root, 'Repository Root') 252 info_output = Executive().run_command([self.executable_name, 'log', '-r', revision, '--xml', repository_root], cwd=path).rstrip() 252 253 match = re.search(r"^<date>(?P<value>.+)</date>\r?$", info_output, re.MULTILINE) 253 254 return match.group('value') -
trunk/Tools/Scripts/webkitpy/performance_tests/perftestsrunner.py
r143833 r143903 246 246 revision = scm.svn_revision(path) 247 247 contents[name.lower() + '-revision'] = revision 248 revisions_for_perf_webkit[name] = {'revision': str(revision), 'timestamp': scm.timestamp_of_latest_commit(path )}248 revisions_for_perf_webkit[name] = {'revision': str(revision), 'timestamp': scm.timestamp_of_latest_commit(path, revision)} 249 249 250 250 # FIXME: Add --branch or auto-detect the branch we're in
Note: See TracChangeset
for help on using the changeset viewer.