[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
eric at webkit.org
eric at webkit.org
Fri Jan 21 15:18:03 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit 06dabefb8d9bef13d041e0ba9577ef05e9a0b69a
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jan 10 22:37:58 2011 +0000
2011-01-10 Eric Seidel <eric at webkit.org>
Reviewed by Ojan Vafai.
style-queue messages are way too long for big patches
https://bugs.webkit.org/show_bug.cgi?id=52161
We definitely could build much fancier list-to-string-with-limit functions
but this should be sufficient for our needs at the moment.
* Scripts/webkitpy/common/system/executive.py:
* Scripts/webkitpy/common/system/executive_unittest.py:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75438 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index d0d6916..46170bb 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,16 @@
+2011-01-10 Eric Seidel <eric at webkit.org>
+
+ Reviewed by Ojan Vafai.
+
+ style-queue messages are way too long for big patches
+ https://bugs.webkit.org/show_bug.cgi?id=52161
+
+ We definitely could build much fancier list-to-string-with-limit functions
+ but this should be sufficient for our needs at the moment.
+
+ * Scripts/webkitpy/common/system/executive.py:
+ * Scripts/webkitpy/common/system/executive_unittest.py:
+
2011-01-10 Tony Chang <tony at chromium.org>
Unreviewed, rolling out r75398.
diff --git a/Tools/Scripts/webkitpy/common/system/executive.py b/Tools/Scripts/webkitpy/common/system/executive.py
index 85a683a..bad0fa0 100644
--- a/Tools/Scripts/webkitpy/common/system/executive.py
+++ b/Tools/Scripts/webkitpy/common/system/executive.py
@@ -53,6 +53,14 @@ _log = logging.getLogger("webkitpy.common.system")
class ScriptError(Exception):
+ # This is a custom List.__str__ implementation to allow size limiting.
+ def _string_from_args(self, args, limit=100):
+ args_string = unicode(args)
+ # We could make this much fancier, but for now this is OK.
+ if len(args_string) > limit:
+ return args_string[:limit - 3] + "..."
+ return args_string
+
def __init__(self,
message=None,
script_args=None,
@@ -60,7 +68,7 @@ class ScriptError(Exception):
output=None,
cwd=None):
if not message:
- message = 'Failed to run "%s"' % script_args
+ message = 'Failed to run "%s"' % self._string_from_args(script_args)
if exit_code:
message += " exit_code: %d" % exit_code
if cwd:
diff --git a/Tools/Scripts/webkitpy/common/system/executive_unittest.py b/Tools/Scripts/webkitpy/common/system/executive_unittest.py
index b8fd82e..378eee7 100644
--- a/Tools/Scripts/webkitpy/common/system/executive_unittest.py
+++ b/Tools/Scripts/webkitpy/common/system/executive_unittest.py
@@ -37,6 +37,14 @@ from webkitpy.common.system.executive import Executive, run_command, ScriptError
from webkitpy.test import cat, echo
+class ScriptErrorTest(unittest.TestCase):
+ def test_string_from_args(self):
+ error = ScriptError()
+ self.assertEquals(error._string_from_args(None), 'None')
+ self.assertEquals(error._string_from_args([]), '[]')
+ self.assertEquals(error._string_from_args(map(str, range(30))), "['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17'...")
+
+
def never_ending_command():
"""Arguments for a command that will never end (useful for testing process
killing). It should be a process that is unlikely to already be running
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list