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

abarth at webkit.org abarth at webkit.org
Wed Apr 7 23:59:16 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 80ae0a2386bfd1af9891f7d7d9dc6078369e106d
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Nov 29 00:20:45 2009 +0000

    2009-11-28  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Eric Seidel.
    
            [bzt] CC webkit-bot-watchers whenever the bots touch bugs
            https://bugs.webkit.org/show_bug.cgi?id=31952
    
            The mailing list is open for anyone to subscribe.
    
            * Scripts/modules/bugzilla.py:
            * Scripts/modules/commands/queues.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51463 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 55d7d23..9995641 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -2,6 +2,18 @@
 
         Reviewed by Eric Seidel.
 
+        [bzt] CC webkit-bot-watchers whenever the bots touch bugs
+        https://bugs.webkit.org/show_bug.cgi?id=31952
+
+        The mailing list is open for anyone to subscribe.
+
+        * Scripts/modules/bugzilla.py:
+        * Scripts/modules/commands/queues.py:
+
+2009-11-28  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Eric Seidel.
+
         [bzt] style-queue should report style errors to bugzilla
         https://bugs.webkit.org/show_bug.cgi?id=31945
 
diff --git a/WebKitTools/Scripts/modules/bugzilla.py b/WebKitTools/Scripts/modules/bugzilla.py
index b923cf8..937e1ec 100644
--- a/WebKitTools/Scripts/modules/bugzilla.py
+++ b/WebKitTools/Scripts/modules/bugzilla.py
@@ -507,8 +507,20 @@ class Bugzilla:
             # Bugzilla has two textareas named 'comment', one is somehow hidden.  We want the first.
             self.browser.set_value(comment_text, name='comment', nr=0)
         self.browser.submit()
-    
-    def post_comment_to_bug(self, bug_id, comment_text):
+
+    def add_cc_to_bug(self, bug_id, email_address):
+        self.authenticate()
+
+        log("Adding %s to the CC list for bug %s" % (email_address, bug_id))
+        if self.dryrun:
+            return
+
+        self.browser.open(self.bug_url_for_bug_id(bug_id))
+        self.browser.select_form(name="changeform")
+        self.browser["newcc"] = email_address
+        self.browser.submit()
+
+    def post_comment_to_bug(self, bug_id, comment_text, cc=None):
         self.authenticate()
 
         log("Adding comment to bug %s" % bug_id)
@@ -518,7 +530,9 @@ class Bugzilla:
 
         self.browser.open(self.bug_url_for_bug_id(bug_id))
         self.browser.select_form(name="changeform")
-        self.browser['comment'] = comment_text
+        self.browser["comment"] = comment_text
+        if cc:
+            self.browser["newcc"] = cc
         self.browser.submit()
 
     def close_bug_as_fixed(self, bug_id, comment_text=None):
diff --git a/WebKitTools/Scripts/modules/commands/queues.py b/WebKitTools/Scripts/modules/commands/queues.py
index 014cd08..f72dbac 100644
--- a/WebKitTools/Scripts/modules/commands/queues.py
+++ b/WebKitTools/Scripts/modules/commands/queues.py
@@ -55,6 +55,7 @@ from modules.webkitport import WebKitPort
 from modules.workqueue import WorkQueue, WorkQueueDelegate
 
 class AbstractQueue(Command, WorkQueueDelegate):
+    watchers = "webkit-bot-watchers at googlegroups.com"
     def __init__(self, options=[]):
         options += [
             make_option("--no-confirm", action="store_false", dest="confirm", default=True, help="Do not ask the user for confirmation before running the queue.  Dangerous!"),
@@ -62,6 +63,12 @@ class AbstractQueue(Command, WorkQueueDelegate):
         ]
         Command.__init__(self, "Run the %s" % self.name, options=options)
 
+    def _cc_watchers(self, bug_id):
+        try:
+            self.tool.bugs.add_cc_to_bug(bug_id, self.watchers)
+        except Exception, e:
+            log("Failed to CC watchers: %s." % e)
+
     def queue_log_path(self):
         return "%s.log" % self.name
 
@@ -135,6 +142,7 @@ class CommitQueue(AbstractQueue, LandingSequenceErrorHandler):
         return (True, "Landing patch %s from bug %s." % (patch["id"], patch["bug_id"]), patch)
 
     def process_work_item(self, patch):
+        self._cc_watchers(patch["bug_id"])
         self.run_bugzilla_tool(["land-attachment", "--force-clean", "--non-interactive", "--parent-command=commit-queue", "--quiet", patch["id"]])
 
     def handle_unexpected_error(self, patch, message):
@@ -213,7 +221,7 @@ class StyleQueue(AbstractTryQueue):
             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)
-            tool.bugs.post_comment_to_bug(patch["bug_id"], message)
+            tool.bugs.post_comment_to_bug(patch["bug_id"], message, cc=cls.watchers)
 
 
 class BuildQueue(AbstractTryQueue):

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list