[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:09 UTC 2010


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

    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
    
            Python makes this very easy.
    
            * Scripts/webkitpy/mock_bugzillatool.py:
            * Scripts/webkitpy/steps/options.py:
            * Scripts/webkitpy/steps/postdiff.py:
            * Scripts/webkitpy/user.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52715 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index e6925f3..c7f80fe 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -2,6 +2,20 @@
 
         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
+
+        Python makes this very easy.
+
+        * Scripts/webkitpy/mock_bugzillatool.py:
+        * Scripts/webkitpy/steps/options.py:
+        * Scripts/webkitpy/steps/postdiff.py:
+        * Scripts/webkitpy/user.py:
+
+2010-01-04  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Eric Seidel.
+
         [bzt] Move steps to a submodule
         https://bugs.webkit.org/show_bug.cgi?id=33135
 
diff --git a/WebKitTools/Scripts/webkitpy/mock_bugzillatool.py b/WebKitTools/Scripts/webkitpy/mock_bugzillatool.py
index 3dbbdbb..e80ee4e 100644
--- a/WebKitTools/Scripts/webkitpy/mock_bugzillatool.py
+++ b/WebKitTools/Scripts/webkitpy/mock_bugzillatool.py
@@ -186,6 +186,9 @@ class MockUser(object):
     def confirm(self, message=None):
         return True
 
+    def open_url(self, url):
+        pass
+
 
 class MockStatusBot(object):
     def __init__(self):
diff --git a/WebKitTools/Scripts/webkitpy/steps/options.py b/WebKitTools/Scripts/webkitpy/steps/options.py
index 673be1e..ee33c5b 100644
--- a/WebKitTools/Scripts/webkitpy/steps/options.py
+++ b/WebKitTools/Scripts/webkitpy/steps/options.py
@@ -47,6 +47,7 @@ class Options(object):
     obsolete_patches = make_option("--no-obsolete", action="store_false", dest="obsolete_patches", default=True, help="Do not obsolete old patches before posting this one.")
     review = make_option("--no-review", action="store_false", dest="review", default=True, help="Do not mark the patch for review.")
     request_commit = make_option("--request-commit", action="store_true", dest="request_commit", default=False, help="Mark the patch as needing auto-commit after review.")
+    open_bug = make_option("--open-bug", action="store_true", dest="open_bug", default=False, help="Opens the associated bug in a browser.")
     description = make_option("-m", "--description", action="store", type="string", dest="description", help="Description string for the attachment (default: \"patch\")")
     cc = make_option("--cc", action="store", type="string", dest="cc", help="Comma-separated list of email addresses to carbon-copy.")
     component = make_option("--component", action="store", type="string", dest="component", help="Component for the new bug.")
diff --git a/WebKitTools/Scripts/webkitpy/steps/postdiff.py b/WebKitTools/Scripts/webkitpy/steps/postdiff.py
index 47d3344..a5ba2a4 100644
--- a/WebKitTools/Scripts/webkitpy/steps/postdiff.py
+++ b/WebKitTools/Scripts/webkitpy/steps/postdiff.py
@@ -39,6 +39,7 @@ class PostDiff(AbstractStep):
             Options.description,
             Options.review,
             Options.request_commit,
+            Options.open_bug,
         ]
 
     def run(self, state):
@@ -46,3 +47,5 @@ class PostDiff(AbstractStep):
         diff_file = StringIO.StringIO(diff) # add_patch_to_bug expects a file-like object
         description = self._options.description or "Patch"
         self._tool.bugs.add_patch_to_bug(state["bug_id"], diff_file, description, mark_for_review=self._options.review, mark_for_commit_queue=self._options.request_commit)
+        if self._options.open_bug:
+            self._tool.user.open_url(self._tool.bugs.bug_url_for_bug_id(state["bug_id"]))
diff --git a/WebKitTools/Scripts/webkitpy/user.py b/WebKitTools/Scripts/webkitpy/user.py
index c46ccfb..50a4e0d 100644
--- a/WebKitTools/Scripts/webkitpy/user.py
+++ b/WebKitTools/Scripts/webkitpy/user.py
@@ -28,6 +28,7 @@
 
 import os
 import subprocess
+import webbrowser
 
 class User(object):
     def prompt(self, message):
@@ -50,3 +51,6 @@ class User(object):
             message = "Continue?"
         response = raw_input("%s [Y/n]: " % message)
         return not response or response.lower() == "y"
+
+    def open_url(self, url):
+        webbrowser.open(url)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list