Changeset 214067 in webkit
- Timestamp:
- Mar 16, 2017 1:55:20 PM (7 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r214061 r214067 1 2017-03-16 Kocsen Chung <kocsen_chung@apple.com> 2 3 Fix quotes around --pretty format git flag. 4 https://bugs.webkit.org/show_bug.cgi?id=169712 5 6 Reviewed by Ryosuke Niwa. 7 8 Remove double quotes from command list element '--pretty="format:%ct"' since it will cause 9 subprocess to not work as expected. 10 Additionally, take advantage of `git -C` flag. 11 12 * Scripts/webkitpy/common/checkout/scm/git.py: 13 (Git.native_revision): 14 Take advantage of `git -C` flag. 15 (Git.timestamp_of_native_revision): 16 Take advantage of `git -C` flag and remove double quotes from git formatter. 17 We know this works from `committer_email_for_revision()` function. 18 1 19 2017-03-16 Alex Christensen <achristensen@webkit.org> 2 20 -
trunk/Tools/Scripts/webkitpy/common/checkout/scm/git.py
r213625 r214067 290 290 291 291 def native_revision(self, path): 292 return self._run_git([' log', '-1', '--pretty=format:%H', self.find_checkout_root(path)])292 return self._run_git(['-C', self.find_checkout_root(path), 'log', '-1', '--pretty=format:%H']) 293 293 294 294 def svn_url(self): … … 316 316 317 317 def timestamp_of_native_revision(self, path, sha): 318 unix_timestamp = self._run_git([' log', '-1', sha, '--pretty="format:%ct"', self.find_checkout_root(path)]).rstrip()318 unix_timestamp = self._run_git(['-C', self.find_checkout_root(path), 'log', '-1', sha, '--pretty=format:%ct']).rstrip() 319 319 commit_timestamp = datetime.datetime.utcfromtimestamp(float(unix_timestamp)) 320 320 return commit_timestamp.strftime('%Y-%m-%dT%H:%M:%SZ')
Note: See TracChangeset
for help on using the changeset viewer.