[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 02:23:12 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 4299d362c3809d9a7371272f545ae1502599f9b1
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Mar 16 04:43:38 2010 +0000

    2010-03-15  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Eric Seidel.
    
            Add webkit-patch post-rollout to upload rollouts to bugs.webkit.org for easy committing
            https://bugs.webkit.org/show_bug.cgi?id=36154
    
            This new command is a mashup of prepare-rollout and post.  This command
            will be used by an experimental bot to post rollouts of patches that
            break things to bugs.webkit.org where they can be landed with the
            greatest of ease.
    
            * Scripts/webkitpy/commands/download.py:
            * Scripts/webkitpy/commands/download_unittest.py:
            * Scripts/webkitpy/steps/__init__.py:
            * Scripts/webkitpy/steps/postdiffforrevert.py: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@56034 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 9e2010a..7d72053 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -2,6 +2,23 @@
 
         Reviewed by Eric Seidel.
 
+        Add webkit-patch post-rollout to upload rollouts to bugs.webkit.org for easy committing
+        https://bugs.webkit.org/show_bug.cgi?id=36154
+
+        This new command is a mashup of prepare-rollout and post.  This command
+        will be used by an experimental bot to post rollouts of patches that
+        break things to bugs.webkit.org where they can be landed with the
+        greatest of ease.
+
+        * Scripts/webkitpy/commands/download.py:
+        * Scripts/webkitpy/commands/download_unittest.py:
+        * Scripts/webkitpy/steps/__init__.py:
+        * Scripts/webkitpy/steps/postdiffforrevert.py: Added.
+
+2010-03-15  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Eric Seidel.
+
         webkit-patch rollout should error out on conflicts
         https://bugs.webkit.org/show_bug.cgi?id=36151
 
diff --git a/WebKitTools/Scripts/webkitpy/commands/download.py b/WebKitTools/Scripts/webkitpy/commands/download.py
index aa423cf..9c3745e 100644
--- a/WebKitTools/Scripts/webkitpy/commands/download.py
+++ b/WebKitTools/Scripts/webkitpy/commands/download.py
@@ -248,7 +248,11 @@ class AbstractRolloutPrepCommand(AbstractSequencedCommand):
         return parse_bug_id(original_diff)
 
     def _bug_id_for_revision(self, revision):
-        raise NotImplementedError("subclasses must implement")
+        bug_id = self._parse_bug_id_from_revision_diff(revision)
+        if bug_id:
+            log("Preparing rollout for bug %s." % bug_id)
+            return bug_id
+        log("Unable to parse bug number from diff.")
 
     def _prepare_state(self, options, args, tool):
         revision = args[0]
@@ -273,11 +277,18 @@ Creates an appropriate rollout ChangeLog, including a trac link and bug link.
         steps.PrepareChangeLogForRevert,
     ]
 
-    def _bug_id_for_revision(self, revision):
-        bug_id = self._parse_bug_id_from_revision_diff(revision)
-        if bug_id:
-            return bug_id
-        log("Failed to parse bug number from diff.")
+
+class PostRollout(AbstractRolloutPrepCommand):
+    name = "post-rollout"
+    help_text = "Prepare a rollout of the given revision and upload it to the bug."
+    steps = [
+        steps.CleanWorkingDirectory,
+        steps.Update,
+        steps.RevertRevision,
+        steps.PrepareChangeLogForRevert,
+        # FIXME: If there's no bug number, we should make a new bug.
+        steps.PostDiffForRevert,
+    ]
 
 
 class Rollout(AbstractRolloutPrepCommand):
@@ -301,10 +312,3 @@ Commits the revert and updates the bug (including re-opening the bug if necessar
         steps.Commit,
         steps.ReopenBugAfterRollout,
     ]
-
-    def _bug_id_for_revision(self, revision):
-        bug_id = self._parse_bug_id_from_revision_diff(revision)
-        if bug_id:
-            log("Will re-open bug %s after rollout." % bug_id)
-            return bug_id
-        log("Failed to parse bug number from diff.  No bugs will be updated/reopened after the rollout.")
diff --git a/WebKitTools/Scripts/webkitpy/commands/download_unittest.py b/WebKitTools/Scripts/webkitpy/commands/download_unittest.py
index 609eeb1..ec76b36 100644
--- a/WebKitTools/Scripts/webkitpy/commands/download_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/commands/download_unittest.py
@@ -117,10 +117,14 @@ Not closing bug 42 as attachment 197 has review=+.  Assuming there are more patc
         self.assert_execute_outputs(LandFromBug(), [42], options=self._default_options(), expected_stderr=expected_stderr)
 
     def test_prepare_rollout(self):
-        expected_stderr="Updating working directory\nRunning prepare-ChangeLog\n"
+        expected_stderr="Preparing rollout for bug 12345.\nUpdating working directory\nRunning prepare-ChangeLog\n"
+        self.assert_execute_outputs(PrepareRollout(), [852, "Reason"], options=self._default_options(), expected_stderr=expected_stderr)
+
+    def test_post_rollout(self):
+        expected_stderr="Preparing rollout for bug 12345.\nUpdating working directory\nRunning prepare-ChangeLog\n"
         self.assert_execute_outputs(PrepareRollout(), [852, "Reason"], options=self._default_options(), expected_stderr=expected_stderr)
 
     def test_rollout(self):
-        expected_stderr = "Will re-open bug 12345 after rollout.\nUpdating working directory\nRunning prepare-ChangeLog\nBuilding WebKit\n"
+        expected_stderr = "Preparing rollout for bug 12345.\nUpdating working directory\nRunning prepare-ChangeLog\nBuilding WebKit\n"
         self.assert_execute_outputs(Rollout(), [852, "Reason"], options=self._default_options(), expected_stderr=expected_stderr)
 
diff --git a/WebKitTools/Scripts/webkitpy/steps/__init__.py b/WebKitTools/Scripts/webkitpy/steps/__init__.py
index 9b77f4f..bdb2520 100644
--- a/WebKitTools/Scripts/webkitpy/steps/__init__.py
+++ b/WebKitTools/Scripts/webkitpy/steps/__init__.py
@@ -46,6 +46,7 @@ from webkitpy.steps.obsoletepatches import ObsoletePatches
 from webkitpy.steps.options import Options
 from webkitpy.steps.postdiff import PostDiff
 from webkitpy.steps.postdiffforcommit import PostDiffForCommit
+from webkitpy.steps.postdiffforrevert import PostDiffForRevert
 from webkitpy.steps.preparechangelogforrevert import PrepareChangeLogForRevert
 from webkitpy.steps.preparechangelog import PrepareChangeLog
 from webkitpy.steps.promptforbugortitle import PromptForBugOrTitle
diff --git a/WebKitTools/Scripts/webkitpy/steps/postdiffforrevert.py b/WebKitTools/Scripts/webkitpy/steps/postdiffforrevert.py
new file mode 100644
index 0000000..d6904ba
--- /dev/null
+++ b/WebKitTools/Scripts/webkitpy/steps/postdiffforrevert.py
@@ -0,0 +1,41 @@
+# 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 StringIO
+
+from webkitpy.steps.abstractstep import AbstractStep
+
+
+class PostDiffForRevert(AbstractStep):
+    def run(self, state):
+        self._tool.bugs.add_patch_to_bug(
+            state["bug_id"],
+            StringIO.StringIO(self.cached_lookup(state, "diff")),
+            "ROLLOUT of r%s" % state["revision"],
+            mark_for_review=False,
+            mark_for_commit_queue=True)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list