[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
eric at webkit.org
eric at webkit.org
Wed Dec 22 13:57:16 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 95e9df3a3c45ec401c83c150f3751423badc7ea7
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Sep 30 09:26:10 2010 +0000
2010-09-30 Eric Seidel <eric at webkit.org>
Reviewed by Adam Barth.
webkit-patch upload warns that I'm using Xcode when I'm not
https://bugs.webkit.org/show_bug.cgi?id=46869
String.find returns -1 when not found, so switched to "in".
* Scripts/webkitpy/common/system/user.py:
* Scripts/webkitpy/common/system/user_unittest.py:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68768 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 83c9885..98e2211 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -2,6 +2,18 @@
Reviewed by Adam Barth.
+ webkit-patch upload warns that I'm using Xcode when I'm not
+ https://bugs.webkit.org/show_bug.cgi?id=46869
+
+ String.find returns -1 when not found, so switched to "in".
+
+ * Scripts/webkitpy/common/system/user.py:
+ * Scripts/webkitpy/common/system/user_unittest.py:
+
+2010-09-30 Eric Seidel <eric at webkit.org>
+
+ Reviewed by Adam Barth.
+
webkit-patch failure-reason dies if non-trunk commits are in the blame range
https://bugs.webkit.org/show_bug.cgi?id=46866
diff --git a/WebKitTools/Scripts/webkitpy/common/system/user.py b/WebKitTools/Scripts/webkitpy/common/system/user.py
index 240b67b..8917137 100644
--- a/WebKitTools/Scripts/webkitpy/common/system/user.py
+++ b/WebKitTools/Scripts/webkitpy/common/system/user.py
@@ -96,6 +96,10 @@ class User(object):
# Note: Not thread safe: http://bugs.python.org/issue2320
subprocess.call(args + files)
+ def _warn_if_application_is_xcode(self, edit_application):
+ if "Xcode" in edit_application:
+ print "Instead of using Xcode.app, consider using EDITOR=\"xed --wait\"."
+
def edit_changelog(self, files):
edit_application = os.environ.get("CHANGE_LOG_EDIT_APPLICATION")
if edit_application and sys.platform == "darwin":
@@ -103,8 +107,7 @@ class User(object):
args = shlex.split(edit_application)
print "Using editor in the CHANGE_LOG_EDIT_APPLICATION environment variable."
print "Please quit the editor application when done editing."
- if edit_application.find("Xcode.app"):
- print "Instead of using Xcode.app, consider using EDITOR=\"xed --wait\"."
+ self._warn_if_application_is_xcode(edit_application)
subprocess.call(["open", "-W", "-n", "-a"] + args + files)
return
self.edit(files)
diff --git a/WebKitTools/Scripts/webkitpy/common/system/user_unittest.py b/WebKitTools/Scripts/webkitpy/common/system/user_unittest.py
index ae1bad5..7ec9b34 100644
--- a/WebKitTools/Scripts/webkitpy/common/system/user_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/common/system/user_unittest.py
@@ -97,5 +97,13 @@ class UserTest(unittest.TestCase):
raw_input=mock_raw_input)
self.assertEquals(expected[1], result)
-if __name__ == '__main__':
- unittest.main()
+ def test_warn_if_application_is_xcode(self):
+ output = OutputCapture()
+ user = User()
+ output.assert_outputs(self, user._warn_if_application_is_xcode, ["TextMate"])
+ output.assert_outputs(self, user._warn_if_application_is_xcode, ["/Applications/TextMate.app"])
+ output.assert_outputs(self, user._warn_if_application_is_xcode, ["XCode"]) # case sensitive matching
+
+ xcode_warning = "Instead of using Xcode.app, consider using EDITOR=\"xed --wait\".\n"
+ output.assert_outputs(self, user._warn_if_application_is_xcode, ["Xcode"], expected_stdout=xcode_warning)
+ output.assert_outputs(self, user._warn_if_application_is_xcode, ["/Developer/Applications/Xcode.app"], expected_stdout=xcode_warning)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list