Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(867)

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/chromium_commit.py

Issue 2518313003: Refactor WPT Export to ensure only one PR in flight at a time (Closed)
Patch Set: Address CL feedback Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/w3c/chromium_wpt.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/w3c/chromium_commit.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/chromium_commit.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/chromium_commit.py
index 090cf9ed80b742a76e8763aa46a04ebba1c7562b..f87cb43cd21552d27d9a21fb4265e8c312794431 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/chromium_commit.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/chromium_commit.py
@@ -2,6 +2,9 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+from webkitpy.common.memoized import memoized
+from webkitpy.common.webkit_finder import WebKitFinder
+
class ChromiumCommit(object):
@@ -51,3 +54,23 @@ class ChromiumCommit(object):
return self.host.executive.run_command([
'git', 'show', '--format=%b', '--no-patch', self.sha
])
+
+ def message(self):
+ """Returns a string with a commit's subject and body."""
+ return self.host.executive.run_command([
+ 'git', 'show', '--format=%B', '--no-patch', self.sha
+ ])
+
+ def format_patch(self):
+ """Makes a patch with just changes in files in the WPT for a given commit."""
+ # TODO(jeffcarp): exclude expectations files
+ # TODO(jeffcarp): exclude manifest files
+ return self.host.executive.run_command([
+ 'git', 'format-patch', '-1', '--stdout',
+ self.sha, self.absolute_chromium_wpt_dir()
+ ])
+
+ @memoized
+ def absolute_chromium_wpt_dir(self):
+ finder = WebKitFinder(self.host.filesystem)
+ return finder.path_from_webkit_base('LayoutTests', 'imported', 'wpt')
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/w3c/chromium_wpt.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698