[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 01:00:53 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 3443f3810ac61e4c02937d832dce339c04d10ad7
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jan 11 23:35:28 2010 +0000

    2010-01-11  Eric Seidel  <eric at webkit.org>
    
            No review, rolling out r53079.
            http://trac.webkit.org/changeset/53079
            https://bugs.webkit.org/show_bug.cgi?id=33197
    
            Adam doens't think this actually works, and believe it caused
            a regression https://bugs.webkit.org/show_bug.cgi?id=33488 so
            rolling this out.
    
            * Scripts/test-webkitpy:
            * Scripts/webkitpy/commands/abstractdiffcommand.py: Removed.
            * Scripts/webkitpy/commands/abstractdiffcommand_unittest.py: Removed.
            * Scripts/webkitpy/commands/download.py:
            * Scripts/webkitpy/commands/upload.py:
            * Scripts/webkitpy/mock_bugzillatool.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@53105 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 25b96ea..e0ad44e 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,20 @@
+2010-01-11  Eric Seidel  <eric at webkit.org>
+
+        No review, rolling out r53079.
+        http://trac.webkit.org/changeset/53079
+        https://bugs.webkit.org/show_bug.cgi?id=33197
+
+        Adam doens't think this actually works, and believe it caused
+        a regression https://bugs.webkit.org/show_bug.cgi?id=33488 so
+        rolling this out.
+
+        * Scripts/test-webkitpy:
+        * Scripts/webkitpy/commands/abstractdiffcommand.py: Removed.
+        * Scripts/webkitpy/commands/abstractdiffcommand_unittest.py: Removed.
+        * Scripts/webkitpy/commands/download.py:
+        * Scripts/webkitpy/commands/upload.py:
+        * Scripts/webkitpy/mock_bugzillatool.py:
+
 2010-01-10  Adam Barth  <abarth at webkit.org>
 
         Reviewed by David Kilzer.
diff --git a/WebKitTools/Scripts/test-webkitpy b/WebKitTools/Scripts/test-webkitpy
index 6e5e0ef..f320eeb 100755
--- a/WebKitTools/Scripts/test-webkitpy
+++ b/WebKitTools/Scripts/test-webkitpy
@@ -33,7 +33,6 @@ import unittest
 from webkitpy.bugzilla_unittest import *
 from webkitpy.buildbot_unittest import *
 from webkitpy.changelogs_unittest import *
-from webkitpy.commands.abstractdiffcommand_unittest import *
 from webkitpy.commands.download_unittest import *
 from webkitpy.commands.early_warning_system_unittest import *
 from webkitpy.commands.upload_unittest import *
diff --git a/WebKitTools/Scripts/webkitpy/commands/abstractdiffcommand.py b/WebKitTools/Scripts/webkitpy/commands/abstractdiffcommand.py
deleted file mode 100644
index 1563233..0000000
--- a/WebKitTools/Scripts/webkitpy/commands/abstractdiffcommand.py
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright (C) 2010 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.
-
-from webkitpy.bugzilla import parse_bug_id
-from webkitpy.commands.abstractsequencedcommand import AbstractSequencedCommand
-
-
-class AbstractDiffCommand(AbstractSequencedCommand):
-    def _bug_id(self, args, tool):
-        # Perfer a bug id passed as an argument over a bug URL in the ChangeLogs.
-        bug_id = args and args[0]
-        if not bug_id:
-            bug_id = parse_bug_id(tool.scm().commit_message_for_this_commit().message())
-        return bug_id
diff --git a/WebKitTools/Scripts/webkitpy/commands/abstractdiffcommand_unittest.py b/WebKitTools/Scripts/webkitpy/commands/abstractdiffcommand_unittest.py
deleted file mode 100644
index 8777b87..0000000
--- a/WebKitTools/Scripts/webkitpy/commands/abstractdiffcommand_unittest.py
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (C) 2010 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.
-
-import unittest
-
-from webkitpy.commands.abstractdiffcommand import AbstractDiffCommand
-from webkitpy.mock_bugzillatool import MockBugzillaTool
-
-class AbstractDiffCommandTest(unittest.TestCase):
-    def test_bug_id(self):
-        self.assertEquals(AbstractDiffCommand()._bug_id(None, MockBugzillaTool()), 93)
diff --git a/WebKitTools/Scripts/webkitpy/commands/download.py b/WebKitTools/Scripts/webkitpy/commands/download.py
index 3b7b2bf..bb8c01a 100644
--- a/WebKitTools/Scripts/webkitpy/commands/download.py
+++ b/WebKitTools/Scripts/webkitpy/commands/download.py
@@ -36,7 +36,6 @@ import webkitpy.steps as steps
 from webkitpy.bugzilla import parse_bug_id
 # We could instead use from modules import buildsteps and then prefix every buildstep with "buildsteps."
 from webkitpy.changelogs import ChangeLog
-from webkitpy.commands.abstractdiffcommand import AbstractDiffCommand
 from webkitpy.commands.abstractsequencedcommand import AbstractSequencedCommand
 from webkitpy.comments import bug_comment_from_commit_text
 from webkitpy.executive import ScriptError
@@ -67,7 +66,7 @@ class BuildAndTest(AbstractSequencedCommand):
     ]
 
 
-class Land(AbstractDiffCommand):
+class Land(AbstractSequencedCommand):
     name = "land"
     help_text = "Land the current working directory diff and updates the associated bug if any"
     argument_names = "[BUGID]"
@@ -89,7 +88,7 @@ If a bug id is provided, or one can be found in the ChangeLog land will update t
         return {
             "patch" : {
                 "id" : None,
-                "bug_id" : self._bug_id(args, tool),
+                "bug_id" : (args and args[0]) or parse_bug_id(tool.scm().create_patch()),
             }
         }
 
@@ -269,7 +268,6 @@ Commits the revert and updates the bug (including re-opening the bug if necessar
     @staticmethod
     def _parse_bug_id_from_revision_diff(tool, revision):
         original_diff = tool.scm().diff_for_revision(revision)
-        # FIXME: This is wrong because it picks up bug numbers outside of ChangeLogs
         return parse_bug_id(original_diff)
 
     def execute(self, options, args, tool):
diff --git a/WebKitTools/Scripts/webkitpy/commands/upload.py b/WebKitTools/Scripts/webkitpy/commands/upload.py
index 9e7636a..65f6b39 100644
--- a/WebKitTools/Scripts/webkitpy/commands/upload.py
+++ b/WebKitTools/Scripts/webkitpy/commands/upload.py
@@ -38,7 +38,6 @@ from optparse import make_option
 import webkitpy.steps as steps
 
 from webkitpy.bugzilla import parse_bug_id
-from webkitpy.commands.abstractdiffcommand import AbstractDiffCommand
 from webkitpy.commands.abstractsequencedcommand import AbstractSequencedCommand
 from webkitpy.comments import bug_comment_from_svn_revision
 from webkitpy.committers import CommitterList
@@ -100,7 +99,17 @@ class ObsoleteAttachments(AbstractSequencedCommand):
         return { "bug_id" : args[0] }
 
 
-class Post(AbstractDiffCommand):
+class AbstractPatchUploadingCommand(AbstractSequencedCommand):
+    def _bug_id(self, args, tool, state):
+        # Perfer a bug id passed as an argument over a bug url in the diff (i.e. ChangeLogs).
+        bug_id = args and args[0]
+        if not bug_id:
+            state["diff"] = tool.scm().create_patch()
+            bug_id = parse_bug_id(state["diff"])
+        return bug_id
+
+
+class Post(AbstractPatchUploadingCommand):
     name = "post"
     help_text = "Attach the current working directory diff to a bug as a patch file"
     argument_names = "[BUGID]"
@@ -113,7 +122,8 @@ class Post(AbstractDiffCommand):
     ]
 
     def _prepare_state(self, options, args, tool):
-        state = { "bug_id" : self._bug_id(args, tool) }
+        state = {}
+        state["bug_id"] = self._bug_id(args, tool, state)
         if not state["bug_id"]:
             error("No bug id passed and no bug url found in diff, can't post.")
         return state
@@ -135,7 +145,7 @@ class Prepare(AbstractSequencedCommand):
         return { "bug_id" : bug_id }
 
 
-class Upload(AbstractDiffCommand):
+class Upload(AbstractPatchUploadingCommand):
     name = "upload"
     help_text = "Automates the process of uploading a patch for review"
     argument_names = "[BUGID]"
@@ -159,7 +169,8 @@ class Upload(AbstractDiffCommand):
     command in the PAGER environment variable."""
 
     def _prepare_state(self, options, args, tool):
-        state = { "bug_id" : self._bug_id(args, tool) }
+        state = {}
+        state["bug_id"] = self._bug_id(args, tool, state)
         return state
 
 
diff --git a/WebKitTools/Scripts/webkitpy/mock_bugzillatool.py b/WebKitTools/Scripts/webkitpy/mock_bugzillatool.py
index ee5a3c8..f8392aa 100644
--- a/WebKitTools/Scripts/webkitpy/mock_bugzillatool.py
+++ b/WebKitTools/Scripts/webkitpy/mock_bugzillatool.py
@@ -156,14 +156,11 @@ class MockSCM(Mock):
     def commit_ids_from_commitish_arguments(self, args):
         return ["Commitish1", "Commitish2"]
 
-    def commit_message_for_this_commit(self):
-        return CommitMessage(["CommitMessage1", "https://bugs.webkit.org/show_bug.cgi?id=93"])
-
     def commit_message_for_local_commit(self, commit_id):
         if commit_id == "Commitish1":
-            return CommitMessage(["CommitMessage1", "https://bugs.webkit.org/show_bug.cgi?id=42"])
+            return CommitMessage("CommitMessage1\nhttps://bugs.example.org/show_bug.cgi?id=42\n")
         if commit_id == "Commitish2":
-            return CommitMessage(["CommitMessage2", "https://bugs.webkit.org/show_bug.cgi?id=75"])
+            return CommitMessage("CommitMessage2\nhttps://bugs.example.org/show_bug.cgi?id=75\n")
         raise Exception("Bogus commit_id in commit_message_for_local_commit.")
 
     def create_patch_from_local_commit(self, commit_id):

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list