[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

eric at webkit.org eric at webkit.org
Thu Apr 8 00:03:51 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 39598035b08dc0c67b950096b794a4ae49c56d0e
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Dec 1 00:07:41 2009 +0000

    2009-11-30  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Eric Seidel.
    
            [bzt] Generate pass messages for style-queue
            https://bugs.webkit.org/show_bug.cgi?id=31995
    
            With this change, the style-queue posts "pass" messages to bugs as
            well.  Also, added more information to the state store w.r.t. passing
            and failing.
    
            * Scripts/modules/commands/queues.py:
            * Scripts/modules/patchcollection.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51518 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 26d45ca..c513c2c 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,17 @@
+2009-11-30  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Eric Seidel.
+
+        [bzt] Generate pass messages for style-queue
+        https://bugs.webkit.org/show_bug.cgi?id=31995
+
+        With this change, the style-queue posts "pass" messages to bugs as
+        well.  Also, added more information to the state store w.r.t. passing
+        and failing.
+
+        * Scripts/modules/commands/queues.py:
+        * Scripts/modules/patchcollection.py:
+
 2009-11-30  Gustavo Noronha Silva  <gustavo.noronha at collabora.co.uk>
 
         Reviewed by Simon Fraser.
diff --git a/WebKitTools/Scripts/modules/commands/queues.py b/WebKitTools/Scripts/modules/commands/queues.py
index 56077c3..df56ef6 100644
--- a/WebKitTools/Scripts/modules/commands/queues.py
+++ b/WebKitTools/Scripts/modules/commands/queues.py
@@ -190,7 +190,6 @@ class AbstractTryQueue(AbstractQueue, PersistentPatchCollectionDelegate, Landing
 
     def handle_unexpected_error(self, patch, message):
         log(message)
-        self._patches.done(patch)
 
     # LandingSequenceErrorHandler methods
 
@@ -209,8 +208,14 @@ class StyleQueue(AbstractTryQueue):
         return (True, "Checking style for patch %s on bug %s." % (patch["id"], patch["bug_id"]), patch)
 
     def process_work_item(self, patch):
-        self.run_bugzilla_tool(["check-style", "--force-clean", "--non-interactive", "--parent-command=style-queue", patch["id"]])
-        self._patches.done(patch)
+        try:
+            self.run_bugzilla_tool(["check-style", "--force-clean", "--non-interactive", "--parent-command=style-queue", patch["id"]])
+            message = "%s ran check-webkit-style on attachment %s without any errors." % (self.name, patch["id"])
+            self.tool.bugs.post_comment_to_bug(patch["bug_id"], message, cc=self.watchers)
+            self._patches.did_pass(patch)
+        except ScriptError, e:
+            self._patches.did_fail(patch)
+            raise e
 
     @classmethod
     def handle_script_error(cls, tool, patch, script_error):
@@ -220,9 +225,7 @@ class StyleQueue(AbstractTryQueue):
         # FIXME: We shouldn't need to use a regexp here.  ScriptError should
         #        have a better API.
         if re.search("check-webkit-style", command):
-            message = "Attachment %s did not pass %s:\n\n%s" % (patch["id"], cls.name, script_error.message_with_output(output_limit=None))
-            # Local-only logging helpful for development:
-            # log("** BEGIN BUG POST **\n%s** END BUG POST **" % message)
+            message = "Attachment %s did not pass %s:\n\n%s" % (patch["id"], cls.name, script_error.message_with_output(output_limit=5*1024))
             tool.bugs.post_comment_to_bug(patch["bug_id"], message, cc=cls.watchers)
 
 
@@ -246,4 +249,4 @@ class BuildQueue(AbstractTryQueue):
 
     def process_work_item(self, patch):
         self.run_bugzilla_tool(["build-attachment", self.port.flag(), "--force-clean", "--quiet", "--non-interactive", "--parent-command=build-queue", "--no-update", patch["id"]])
-        self._patches.done(patch)
+        self._patches.did_pass(patch)
diff --git a/WebKitTools/Scripts/modules/patchcollection.py b/WebKitTools/Scripts/modules/patchcollection.py
index 1a774ba..ceed581 100644
--- a/WebKitTools/Scripts/modules/patchcollection.py
+++ b/WebKitTools/Scripts/modules/patchcollection.py
@@ -71,8 +71,9 @@ class PersistentPatchCollectionDelegate:
 
 
 class PersistentPatchCollection:
-    _initial_status = "Attempted"
-    _terminal_status = "Done"
+    _initial_status = "Pending"
+    _pass_status = "Pass"
+    _fail_status = "Fail"
     def __init__(self, delegate):
         self._delegate = delegate
         self._name = self._delegate.collection_name()
@@ -95,5 +96,8 @@ class PersistentPatchCollection:
             if not status:
                 return patch_id
 
-    def done(self, patch):
-        self._status.update_status(self._name, self._terminal_status, patch)
+    def did_pass(self, patch):
+        self._status.update_status(self._name, self._pass_status, patch)
+
+    def did_fail(self, patch):
+        self._status.update_status(self._name, self._fail_status, patch)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list