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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/tool/steps/confirmdiff.py

Issue 1837103002: Make "webkit-patch pretty-diff" work under Cygwin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove comment Created 4 years, 9 months 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/tool/steps/confirmdiff.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/tool/steps/confirmdiff.py b/third_party/WebKit/Tools/Scripts/webkitpy/tool/steps/confirmdiff.py
index 8472da6cc1a501997092c6218aec27605511b130..5208ab47dbde28f36ce1280a6d73e59227f40474 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/tool/steps/confirmdiff.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/tool/steps/confirmdiff.py
@@ -52,8 +52,8 @@ class ConfirmDiff(AbstractStep):
try:
pretty_patch = PrettyPatch(self._tool.executive)
pretty_diff_file = pretty_patch.pretty_diff_file(self.diff())
- url = "file://%s" % urllib.quote(pretty_diff_file.name)
- self._tool.user.open_url(url)
+ self._open_pretty_diff(pretty_diff_file.name)
+
# We return the pretty_diff_file here because we need to keep the
# file alive until the user has had a chance to confirm the diff.
return pretty_diff_file
@@ -62,6 +62,14 @@ class ConfirmDiff(AbstractStep):
except OSError, e:
_log.warning("PrettyPatch unavailable.")
+ def _open_pretty_diff(self, file_path):
+ if self._tool.platform.is_cygwin():
+ assert file_path.endswith('.html')
+ self._tool.executive.run_command(['cygstart', file_path])
+ return
+ url = "file://%s" % urllib.quote(file_path)
+ self._tool.user.open_url(url)
+
def diff(self):
changed_files = self._tool.scm().changed_files(self._options.git_commit)
return self._tool.scm().create_patch(self._options.git_commit,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698