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

abarth at webkit.org abarth at webkit.org
Thu Apr 8 00:53:10 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 5497045bb70a9d10d9ed8bc8fcf478eb1710451b
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jan 4 09:30:11 2010 +0000

    2010-01-04  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Eric Seidel.
    
            Rename StatusBot to StatusServer
            https://bugs.webkit.org/show_bug.cgi?id=33139
    
            It's not a bot.  It's a server.
    
            * Scripts/bugzilla-tool:
            * Scripts/webkitpy/bugzilla.py:
            * Scripts/webkitpy/commands/early_warning_system.py:
            * Scripts/webkitpy/commands/queues.py:
            * Scripts/webkitpy/mock_bugzillatool.py:
            * Scripts/webkitpy/queueengine.py:
            * Scripts/webkitpy/statusbot.py: Removed.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52716 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index c7f80fe..6cf7796 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -2,6 +2,23 @@
 
         Reviewed by Eric Seidel.
 
+        Rename StatusBot to StatusServer
+        https://bugs.webkit.org/show_bug.cgi?id=33139
+
+        It's not a bot.  It's a server.
+
+        * Scripts/bugzilla-tool:
+        * Scripts/webkitpy/bugzilla.py:
+        * Scripts/webkitpy/commands/early_warning_system.py:
+        * Scripts/webkitpy/commands/queues.py:
+        * Scripts/webkitpy/mock_bugzillatool.py:
+        * Scripts/webkitpy/queueengine.py:
+        * Scripts/webkitpy/statusbot.py: Removed.
+
+2010-01-04  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Eric Seidel.
+
         [bzt] submit-pach should have a -o/--open option to open the bug after submit
         https://bugs.webkit.org/show_bug.cgi?id=33136
 
diff --git a/WebKitTools/Scripts/bugzilla-tool b/WebKitTools/Scripts/bugzilla-tool
index c8a52e9..adc66c6 100755
--- a/WebKitTools/Scripts/bugzilla-tool
+++ b/WebKitTools/Scripts/bugzilla-tool
@@ -60,7 +60,7 @@ class BugzillaTool(MultiCommandTool):
         self.executive = Executive()
         self.user = User()
         self._scm = None
-        self.status_bot = StatusBot()
+        self.status_server = StatusServer()
 
     def scm(self):
         # Lazily initialize SCM to not error-out before command line parsing (or when running non-scm commands).
@@ -95,7 +95,7 @@ class BugzillaTool(MultiCommandTool):
             self.scm().dryrun = True
             self.bugs.dryrun = True
         if options.status_host:
-            self.status_bot.set_host(options.status_host)
+            self.status_server.set_host(options.status_host)
 
     def should_execute_command(self, command):
         if command.requires_local_commits and not self.scm().supports_local_commits():
diff --git a/WebKitTools/Scripts/webkitpy/bugzilla.py b/WebKitTools/Scripts/webkitpy/bugzilla.py
index abf5fc1..9cb63b8 100644
--- a/WebKitTools/Scripts/webkitpy/bugzilla.py
+++ b/WebKitTools/Scripts/webkitpy/bugzilla.py
@@ -257,7 +257,7 @@ class Bugzilla(object):
     def _flag_permission_rejection_message(self, setter_email, flag_name):
         committer_list = "WebKitTools/Scripts/webkitpy/committers.py" # This could be computed from CommitterList.__file__
         contribution_guidlines_url = "http://webkit.org/coding/contributing.html" # Should come from some webkit_config.py
-        queue_administrator = "eseidel at chromium.org" # This could be queried from the status_bot.
+        queue_administrator = "eseidel at chromium.org" # This could be queried from the status_server.
         queue_name = "commit-queue" # This could be queried from the tool.
         rejection_message = "%s does not have %s permissions according to %s." % (setter_email, flag_name, self._view_source_link(committer_list))
         rejection_message += "\n\n- If you do not have %s rights please read %s for instructions on how to use bugzilla flags." % (flag_name, contribution_guidlines_url)
diff --git a/WebKitTools/Scripts/webkitpy/commands/early_warning_system.py b/WebKitTools/Scripts/webkitpy/commands/early_warning_system.py
index 0d69c49..a5084ad 100644
--- a/WebKitTools/Scripts/webkitpy/commands/early_warning_system.py
+++ b/WebKitTools/Scripts/webkitpy/commands/early_warning_system.py
@@ -71,7 +71,7 @@ class AbstractEarlyWarningSystem(AbstractReviewQueue):
         # FIXME: This won't be right for ports that don't use build-webkit!
         if not script_error.command_name() == "build-webkit":
             return
-        results_link = tool.status_bot.results_url_for_status(status_id)
+        results_link = tool.status_server.results_url_for_status(status_id)
         message = "Attachment %s did not build on %s:\nBuild output: %s" % (state["patch"]["id"], cls.port_name, results_link)
         tool.bugs.post_comment_to_bug(state["patch"]["bug_id"], message, cc=cls.watchers)
 
diff --git a/WebKitTools/Scripts/webkitpy/commands/queues.py b/WebKitTools/Scripts/webkitpy/commands/queues.py
index e6f4f1b..a34ff1a 100644
--- a/WebKitTools/Scripts/webkitpy/commands/queues.py
+++ b/WebKitTools/Scripts/webkitpy/commands/queues.py
@@ -39,7 +39,7 @@ from webkitpy.grammar import pluralize
 from webkitpy.webkit_logging import error, log
 from webkitpy.multicommandtool import Command
 from webkitpy.patchcollection import PersistentPatchCollection, PersistentPatchCollectionDelegate
-from webkitpy.statusbot import StatusBot
+from webkitpy.statusserver import StatusServer
 from webkitpy.stepsequence import StepSequenceErrorHandler
 from webkitpy.queueengine import QueueEngine, QueueEngineDelegate
 
@@ -65,7 +65,7 @@ class AbstractQueue(Command, QueueEngineDelegate):
             log("Failed to CC watchers: %s." % e)
 
     def _update_status(self, message, patch=None, results_file=None):
-        self.tool.status_bot.update_status(self.name, message, patch, results_file)
+        self.tool.status_server.update_status(self.name, message, patch, results_file)
 
     def _did_pass(self, patch):
         self._update_status(self._pass_status, patch)
@@ -109,7 +109,7 @@ class AbstractQueue(Command, QueueEngineDelegate):
     def run_bugzilla_tool(self, args):
         bugzilla_tool_args = [self.tool.path()]
         # FIXME: This is a hack, we should have a more general way to pass global options.
-        bugzilla_tool_args += ["--status-host=%s" % self.tool.status_bot.statusbot_host]
+        bugzilla_tool_args += ["--status-host=%s" % self.tool.status_server.host]
         bugzilla_tool_args += map(str, args)
         self.tool.executive.run_and_throw_if_fail(bugzilla_tool_args)
 
@@ -123,7 +123,7 @@ class AbstractQueue(Command, QueueEngineDelegate):
 
     @classmethod
     def _update_status_for_script_error(cls, tool, state, script_error):
-        return tool.status_bot.update_status(cls.name, script_error.message, state["patch"], StringIO(script_error.output))
+        return tool.status_server.update_status(cls.name, script_error.message, state["patch"], StringIO(script_error.output))
 
 
 class CommitQueue(AbstractQueue, StepSequenceErrorHandler):
@@ -172,7 +172,7 @@ class CommitQueue(AbstractQueue, StepSequenceErrorHandler):
     def _error_message_for_bug(tool, status_id, script_error):
         if not script_error.output:
             return script_error.message_with_output()
-        results_link = tool.status_bot.results_url_for_status(status_id)
+        results_link = tool.status_server.results_url_for_status(status_id)
         return "%s\nFull output: %s" % (script_error.message_with_output(), results_link)
 
     @classmethod
@@ -194,7 +194,7 @@ class AbstractReviewQueue(AbstractQueue, PersistentPatchCollectionDelegate, Step
         return self.tool.bugs.queries.fetch_attachment_ids_from_review_queue()
 
     def status_server(self):
-        return self.tool.status_bot
+        return self.tool.status_server
 
     # AbstractQueue methods
 
diff --git a/WebKitTools/Scripts/webkitpy/mock_bugzillatool.py b/WebKitTools/Scripts/webkitpy/mock_bugzillatool.py
index e80ee4e..39dba7d 100644
--- a/WebKitTools/Scripts/webkitpy/mock_bugzillatool.py
+++ b/WebKitTools/Scripts/webkitpy/mock_bugzillatool.py
@@ -190,9 +190,9 @@ class MockUser(object):
         pass
 
 
-class MockStatusBot(object):
+class MockStatusServer(object):
     def __init__(self):
-        self.statusbot_host = "example.com"
+        self.host = "example.com"
 
     def patch_status(self, queue_name, patch_id):
         return None
@@ -208,7 +208,7 @@ class MockBugzillaTool():
         self.executive = Mock()
         self.user = MockUser()
         self._scm = MockSCM()
-        self.status_bot = MockStatusBot()
+        self.status_server = MockStatusServer()
 
     def scm(self):
         return self._scm
diff --git a/WebKitTools/Scripts/webkitpy/queueengine.py b/WebKitTools/Scripts/webkitpy/queueengine.py
index b234cc1..c83d641 100644
--- a/WebKitTools/Scripts/webkitpy/queueengine.py
+++ b/WebKitTools/Scripts/webkitpy/queueengine.py
@@ -36,7 +36,7 @@ from datetime import datetime, timedelta
 
 from webkitpy.executive import ScriptError
 from webkitpy.webkit_logging import log, OutputTee
-from webkitpy.statusbot import StatusBot
+from webkitpy.statusserver import StatusServer
 
 class QueueEngineDelegate:
     def queue_log_path(self):
diff --git a/WebKitTools/Scripts/webkitpy/statusbot.py b/WebKitTools/Scripts/webkitpy/statusbot.py
deleted file mode 100644
index 00177a5..0000000
--- a/WebKitTools/Scripts/webkitpy/statusbot.py
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright (C) 2009 Google Inc. All rights reserved.
-# 
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-# 
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-# 
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# WebKit's Python module for interacting with the Commit Queue status page.
-
-from webkitpy.webkit_logging import log
-from webkitpy.webkit_mechanize import Browser
-
-# WebKit includes a built copy of BeautifulSoup in Scripts/webkitpy
-# so this import should always succeed.
-from .BeautifulSoup import BeautifulSoup
-
-import urllib2
-
-
-class StatusBot:
-    default_host = "webkit-commit-queue.appspot.com"
-
-    def __init__(self, host=default_host):
-        self.set_host(host)
-        self.browser = Browser()
-
-    def set_host(self, host):
-        self.statusbot_host = host
-        self.statusbot_server_url = "http://%s" % self.statusbot_host
-
-    def results_url_for_status(self, status_id):
-        return "%s/results/%s" % (self.statusbot_server_url, status_id)
-
-    def update_status(self, queue_name, status, patch=None, results_file=None):
-        # During unit testing, statusbot_host is None
-        if not self.statusbot_host:
-            return
-
-        log(status)
-        update_status_url = "%s/update-status" % self.statusbot_server_url
-        self.browser.open(update_status_url)
-        self.browser.select_form(name="update_status")
-        self.browser['queue_name'] = queue_name
-        if patch:
-            if patch.get('bug_id'):
-                self.browser['bug_id'] = str(patch['bug_id'])
-            if patch.get('id'):
-                self.browser['patch_id'] = str(patch['id'])
-        self.browser['status'] = status
-        if results_file:
-            self.browser.add_file(results_file, "text/plain", "results.txt", 'results_file')
-        response = self.browser.submit()
-        return response.read() # This is the id of the newly created status object.
-
-    def patch_status(self, queue_name, patch_id):
-        update_status_url = "%s/patch-status/%s/%s" % (self.statusbot_server_url, queue_name, patch_id)
-        try:
-            return urllib2.urlopen(update_status_url).read()
-        except urllib2.HTTPError, e:
-            if e.code == 404:
-                return None
-            raise e
diff --git a/WebKitTools/Scripts/webkitpy/statusserver.py b/WebKitTools/Scripts/webkitpy/statusserver.py
new file mode 100644
index 0000000..8f88364
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/statusserver.py
@@ -0,0 +1,83 @@
+# Copyright (C) 2009 Google Inc. All rights reserved.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# 
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+#     * Neither the name of Google Inc. nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+# 
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# WebKit's Python module for interacting with the Commit Queue status page.
+
+from webkitpy.webkit_logging import log
+from webkitpy.webkit_mechanize import Browser
+
+# WebKit includes a built copy of BeautifulSoup in Scripts/webkitpy
+# so this import should always succeed.
+from .BeautifulSoup import BeautifulSoup
+
+import urllib2
+
+
+class StatusServer:
+    default_host = "webkit-commit-queue.appspot.com"
+
+    def __init__(self, host=default_host):
+        self.set_host(host)
+        self.browser = Browser()
+
+    def set_host(self, host):
+        self.host = host
+        self.url = "http://%s" % self.host
+
+    def results_url_for_status(self, status_id):
+        return "%s/results/%s" % (self.url, status_id)
+
+    def update_status(self, queue_name, status, patch=None, results_file=None):
+        # During unit testing, host is None
+        if not self.host:
+            return
+
+        log(status)
+        update_status_url = "%s/update-status" % self.url
+        self.browser.open(update_status_url)
+        self.browser.select_form(name="update_status")
+        self.browser['queue_name'] = queue_name
+        if patch:
+            if patch.get('bug_id'):
+                self.browser['bug_id'] = str(patch['bug_id'])
+            if patch.get('id'):
+                self.browser['patch_id'] = str(patch['id'])
+        self.browser['status'] = status
+        if results_file:
+            self.browser.add_file(results_file, "text/plain", "results.txt", 'results_file')
+        response = self.browser.submit()
+        return response.read() # This is the id of the newly created status object.
+
+    def patch_status(self, queue_name, patch_id):
+        update_status_url = "%s/patch-status/%s/%s" % (self.url, queue_name, patch_id)
+        try:
+            return urllib2.urlopen(update_status_url).read()
+        except urllib2.HTTPError, e:
+            if e.code == 404:
+                return None
+            raise e

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list