[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

abarth at webkit.org abarth at webkit.org
Wed Dec 22 18:21:30 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 25b0a07e91220288ec30b4b4c00638db4e4e3845
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Dec 10 04:53:20 2010 +0000

    2010-12-09  Adam Barth  <abarth at webkit.org>
    
            Reviewed by Ojan Vafai.
    
            commit-queue errors out due to local commits
            https://bugs.webkit.org/show_bug.cgi?id=50766
    
            We seem to be tripping over having local commits in the working copy a
            lot recently.  I don't quite fully understand what the issue is, but
            this patch attempts to solve the problem by adding an explicit clean
            step before processing a patch.  Previously, we did the cleaning as
            part of the apply-attachment step, so this might not actually fix the
            problem.
    
            * Scripts/webkitpy/tool/bot/commitqueuetask.py:
            * Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
            * Scripts/webkitpy/tool/commands/queues_unittest.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73682 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 79ff508..d56c62f 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,21 @@
+2010-12-09  Adam Barth  <abarth at webkit.org>
+
+        Reviewed by Ojan Vafai.
+
+        commit-queue errors out due to local commits
+        https://bugs.webkit.org/show_bug.cgi?id=50766
+
+        We seem to be tripping over having local commits in the working copy a
+        lot recently.  I don't quite fully understand what the issue is, but
+        this patch attempts to solve the problem by adding an explicit clean
+        step before processing a patch.  Previously, we did the cleaning as
+        part of the apply-attachment step, so this might not actually fix the
+        problem.
+
+        * Scripts/webkitpy/tool/bot/commitqueuetask.py:
+        * Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
+        * Scripts/webkitpy/tool/commands/queues_unittest.py:
+
 2010-12-09  Dirk Pranke  <dpranke at chromium.org>
 
         Reviewed by Ojan Vafai.
diff --git a/WebKitTools/Scripts/webkitpy/tool/bot/commitqueuetask.py b/WebKitTools/Scripts/webkitpy/tool/bot/commitqueuetask.py
index ea12702..e2187f1 100644
--- a/WebKitTools/Scripts/webkitpy/tool/bot/commitqueuetask.py
+++ b/WebKitTools/Scripts/webkitpy/tool/bot/commitqueuetask.py
@@ -80,10 +80,16 @@ class CommitQueueTask(object):
             self.failure_status_id = self._delegate.command_failed(failure_message, script_error=self._script_error, patch=self._patch)
             return False
 
+    def _clean(self):
+        return self._run_command([
+            "clean",
+        ],
+        "Cleaned working directory",
+        "Unable to clean working directory")
+
     def _apply(self):
         return self._run_command([
             "apply-attachment",
-            "--force-clean",
             "--non-interactive",
             self._patch.id(),
         ],
@@ -179,6 +185,8 @@ class CommitQueueTask(object):
     def run(self):
         if not self._validate():
             return False
+        if not self._clean():
+            return False
         if not self._apply():
             raise self._script_error
         if not self._build():
diff --git a/WebKitTools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py b/WebKitTools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py
index 15a4a6b..9142451 100644
--- a/WebKitTools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py
@@ -75,7 +75,9 @@ class CommitQueueTaskTest(unittest.TestCase):
 
     def test_success_case(self):
         commit_queue = MockCommitQueue([])
-        expected_stderr = """run_webkit_patch: ['apply-attachment', '--force-clean', '--non-interactive', 197]
+        expected_stderr = """run_webkit_patch: ['clean']
+command_passed: success_message='Cleaned working directory' patch='197'
+run_webkit_patch: ['apply-attachment', '--non-interactive', 197]
 command_passed: success_message='Applied patch' patch='197'
 run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both']
 command_passed: success_message='Built patch' patch='197'
@@ -86,11 +88,23 @@ command_passed: success_message='Landed patch' patch='197'
 """
         self._run_through_task(commit_queue, expected_stderr)
 
+    def test_clean_failure(self):
+        commit_queue = MockCommitQueue([
+            ScriptError("MOCK clean failure"),
+        ])
+        expected_stderr = """run_webkit_patch: ['clean']
+command_failed: failure_message='Unable to clean working directory' script_error='MOCK clean failure' patch='197'
+"""
+        self._run_through_task(commit_queue, expected_stderr)
+
     def test_apply_failure(self):
         commit_queue = MockCommitQueue([
+            None,
             ScriptError("MOCK apply failure"),
         ])
-        expected_stderr = """run_webkit_patch: ['apply-attachment', '--force-clean', '--non-interactive', 197]
+        expected_stderr = """run_webkit_patch: ['clean']
+command_passed: success_message='Cleaned working directory' patch='197'
+run_webkit_patch: ['apply-attachment', '--non-interactive', 197]
 command_failed: failure_message='Patch does not apply' script_error='MOCK apply failure' patch='197'
 """
         self._run_through_task(commit_queue, expected_stderr, ScriptError)
@@ -98,9 +112,12 @@ command_failed: failure_message='Patch does not apply' script_error='MOCK apply
     def test_build_failure(self):
         commit_queue = MockCommitQueue([
             None,
+            None,
             ScriptError("MOCK build failure"),
         ])
-        expected_stderr = """run_webkit_patch: ['apply-attachment', '--force-clean', '--non-interactive', 197]
+        expected_stderr = """run_webkit_patch: ['clean']
+command_passed: success_message='Cleaned working directory' patch='197'
+run_webkit_patch: ['apply-attachment', '--non-interactive', 197]
 command_passed: success_message='Applied patch' patch='197'
 run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both']
 command_failed: failure_message='Patch does not build' script_error='MOCK build failure' patch='197'
@@ -112,10 +129,13 @@ command_passed: success_message='Able to build without patch' patch='197'
     def test_red_build_failure(self):
         commit_queue = MockCommitQueue([
             None,
+            None,
             ScriptError("MOCK build failure"),
             ScriptError("MOCK clean build failure"),
         ])
-        expected_stderr = """run_webkit_patch: ['apply-attachment', '--force-clean', '--non-interactive', 197]
+        expected_stderr = """run_webkit_patch: ['clean']
+command_passed: success_message='Cleaned working directory' patch='197'
+run_webkit_patch: ['apply-attachment', '--non-interactive', 197]
 command_passed: success_message='Applied patch' patch='197'
 run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both']
 command_failed: failure_message='Patch does not build' script_error='MOCK build failure' patch='197'
@@ -128,9 +148,12 @@ command_failed: failure_message='Unable to build without patch' script_error='MO
         commit_queue = MockCommitQueue([
             None,
             None,
+            None,
             ScriptError("MOCK tests failure"),
         ])
-        expected_stderr = """run_webkit_patch: ['apply-attachment', '--force-clean', '--non-interactive', 197]
+        expected_stderr = """run_webkit_patch: ['clean']
+command_passed: success_message='Cleaned working directory' patch='197'
+run_webkit_patch: ['apply-attachment', '--non-interactive', 197]
 command_passed: success_message='Applied patch' patch='197'
 run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both']
 command_passed: success_message='Built patch' patch='197'
@@ -148,10 +171,13 @@ command_passed: success_message='Landed patch' patch='197'
         commit_queue = MockCommitQueue([
             None,
             None,
+            None,
             ScriptError("MOCK test failure"),
             ScriptError("MOCK test failure again"),
         ])
-        expected_stderr = """run_webkit_patch: ['apply-attachment', '--force-clean', '--non-interactive', 197]
+        expected_stderr = """run_webkit_patch: ['clean']
+command_passed: success_message='Cleaned working directory' patch='197'
+run_webkit_patch: ['apply-attachment', '--non-interactive', 197]
 command_passed: success_message='Applied patch' patch='197'
 run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both']
 command_passed: success_message='Built patch' patch='197'
@@ -168,11 +194,14 @@ command_passed: success_message='Able to pass tests without patch' patch='197'
         commit_queue = MockCommitQueue([
             None,
             None,
+            None,
             ScriptError("MOCK test failure"),
             ScriptError("MOCK test failure again"),
             ScriptError("MOCK clean test failure"),
         ])
-        expected_stderr = """run_webkit_patch: ['apply-attachment', '--force-clean', '--non-interactive', 197]
+        expected_stderr = """run_webkit_patch: ['clean']
+command_passed: success_message='Cleaned working directory' patch='197'
+run_webkit_patch: ['apply-attachment', '--non-interactive', 197]
 command_passed: success_message='Applied patch' patch='197'
 run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both']
 command_passed: success_message='Built patch' patch='197'
@@ -190,9 +219,12 @@ command_failed: failure_message='Unable to pass tests without patch (tree is red
             None,
             None,
             None,
+            None,
             ScriptError("MOCK land failure"),
         ])
-        expected_stderr = """run_webkit_patch: ['apply-attachment', '--force-clean', '--non-interactive', 197]
+        expected_stderr = """run_webkit_patch: ['clean']
+command_passed: success_message='Cleaned working directory' patch='197'
+run_webkit_patch: ['apply-attachment', '--non-interactive', 197]
 command_passed: success_message='Applied patch' patch='197'
 run_webkit_patch: ['build', '--no-clean', '--no-update', '--build-style=both']
 command_passed: success_message='Built patch' patch='197'
diff --git a/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py b/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
index b45db7b..087297a 100644
--- a/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/tool/commands/queues_unittest.py
@@ -217,7 +217,8 @@ class CommitQueueTest(QueuesTest):
             "begin_work_queue": self._default_begin_work_queue_stderr("commit-queue", MockSCM.fake_checkout_root),
             "should_proceed_with_work_item": "MOCK: update_status: commit-queue Processing patch\n",
             "next_work_item": "",
-            "process_work_item": """MOCK: update_status: commit-queue Applied patch
+            "process_work_item": """MOCK: update_status: commit-queue Cleaned working directory
+MOCK: update_status: commit-queue Applied patch
 MOCK: update_status: commit-queue Built patch
 MOCK: update_status: commit-queue Passed tests
 MOCK: update_status: commit-queue Landed patch
@@ -234,7 +235,8 @@ MOCK: release_work_item: commit-queue 197
             "begin_work_queue": self._default_begin_work_queue_stderr("commit-queue", MockSCM.fake_checkout_root),
             "should_proceed_with_work_item": "MOCK: update_status: commit-queue Processing patch\n",
             "next_work_item": "",
-            "process_work_item": """MOCK: update_status: commit-queue Patch does not apply
+            "process_work_item": """MOCK: update_status: commit-queue Cleaned working directory
+MOCK: update_status: commit-queue Patch does not apply
 MOCK setting flag 'commit-queue' to '-' on attachment '197' with comment 'Rejecting patch 197 from commit-queue.' and additional comment 'MOCK script error'
 MOCK: update_status: commit-queue Fail
 MOCK: release_work_item: commit-queue 197
@@ -245,6 +247,10 @@ MOCK: release_work_item: commit-queue 197
         queue = CommitQueue()
 
         def mock_run_webkit_patch(command):
+            if command == ['clean']:
+                # We want cleaning to succeed so we can error out on a step
+                # that causes the commit-queue to reject the patch.
+                return
             raise ScriptError('MOCK script error')
 
         queue.run_webkit_patch = mock_run_webkit_patch
@@ -257,7 +263,9 @@ MOCK: release_work_item: commit-queue 197
             "begin_work_queue": self._default_begin_work_queue_stderr("commit-queue", MockSCM.fake_checkout_root),
             "should_proceed_with_work_item": "MOCK: update_status: commit-queue Processing patch\n",
             "next_work_item": "",
-            "process_work_item": """MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'apply-attachment', '--force-clean', '--non-interactive', 197]
+            "process_work_item": """MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'clean']
+MOCK: update_status: commit-queue Cleaned working directory
+MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'apply-attachment', '--non-interactive', 197]
 MOCK: update_status: commit-queue Applied patch
 MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'build', '--no-clean', '--no-update', '--build-style=both']
 MOCK: update_status: commit-queue Built patch
@@ -282,7 +290,9 @@ MOCK: release_work_item: commit-queue 197
             "begin_work_queue": self._default_begin_work_queue_stderr("commit-queue", MockSCM.fake_checkout_root),
             "should_proceed_with_work_item": "MOCK: update_status: commit-queue Processing rollout patch\n",
             "next_work_item": "",
-            "process_work_item": """MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'apply-attachment', '--force-clean', '--non-interactive', 106]
+            "process_work_item": """MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'clean']
+MOCK: update_status: commit-queue Cleaned working directory
+MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'apply-attachment', '--non-interactive', 106]
 MOCK: update_status: commit-queue Applied patch
 MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'build', '--no-clean', '--no-update', '--build-style=both']
 MOCK: update_status: commit-queue Built patch
@@ -316,7 +326,8 @@ MOCK: release_work_item: commit-queue 106
         queue.bind_to_tool(MockTool())
         queue._options = Mock()
         queue._options.port = None
-        expected_stderr = """MOCK: update_status: commit-queue Applied patch
+        expected_stderr = """MOCK: update_status: commit-queue Cleaned working directory
+MOCK: update_status: commit-queue Applied patch
 MOCK: update_status: commit-queue Built patch
 MOCK: update_status: commit-queue Passed tests
 MOCK: update_status: commit-queue Retry

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list