[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
eric at webkit.org
eric at webkit.org
Fri Jan 21 15:13:57 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit 615d800fecfa8c9a54e0d412f0a4a703fe6a9f44
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Jan 10 11:21:36 2011 +0000
2011-01-10 Eric Seidel <eric at webkit.org>
Reviewed by Adam Barth.
Commit bot tried to land r? cq+ patch
https://bugs.webkit.org/show_bug.cgi?id=36638
It should now be possible to post a patch with r? and cq+ and the
commit-queue will correctly wait for the r+ before attempting to land the patch.
(This was a feature requested by several users.)
One caveat: We don't actually reject r-, cq+ patches from the queue
(we just ignore them), but I think that's OK for now.
I also noticed that setting r- once a commit-queue node had grabbed
a patch would not properly cancel the landing. That's fixed and
tested in this patch.
* Scripts/webkitpy/tool/bot/commitqueuetask.py:
* Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
* Scripts/webkitpy/tool/bot/feeders.py:
* Scripts/webkitpy/tool/bot/feeders_unittest.py:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75366 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 9d87917..0e77220 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,26 @@
+2011-01-10 Eric Seidel <eric at webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Commit bot tried to land r? cq+ patch
+ https://bugs.webkit.org/show_bug.cgi?id=36638
+
+ It should now be possible to post a patch with r? and cq+ and the
+ commit-queue will correctly wait for the r+ before attempting to land the patch.
+ (This was a feature requested by several users.)
+
+ One caveat: We don't actually reject r-, cq+ patches from the queue
+ (we just ignore them), but I think that's OK for now.
+
+ I also noticed that setting r- once a commit-queue node had grabbed
+ a patch would not properly cancel the landing. That's fixed and
+ tested in this patch.
+
+ * Scripts/webkitpy/tool/bot/commitqueuetask.py:
+ * Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py:
+ * Scripts/webkitpy/tool/bot/feeders.py:
+ * Scripts/webkitpy/tool/bot/feeders_unittest.py:
+
2011-01-08 Benjamin Poulain <benjamin.poulain at nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py b/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py
index 4bdc79b..f99267a 100644
--- a/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py
+++ b/Tools/Scripts/webkitpy/tool/bot/commitqueuetask.py
@@ -66,6 +66,8 @@ class CommitQueueTask(object):
return False
if not self._patch.committer():
return False
+ if not self._patch.review() != "-":
+ return False
# Reviewer is not required. Missing reviewers will be caught during
# the ChangeLog check during landing.
return True
diff --git a/Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py b/Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py
index f279cac..d70c32b 100644
--- a/Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/bot/commitqueuetask_unittest.py
@@ -29,6 +29,7 @@
from datetime import datetime
import unittest
+from webkitpy.common.net import bugzilla
from webkitpy.common.system.deprecated_logging import error, log
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.layout_tests.layout_package import test_results
@@ -320,3 +321,24 @@ command_failed: failure_message='Unable to land patch' script_error='MOCK land f
"""
# FIXME: This should really be expect_retry=True for a better user experiance.
self._run_through_task(commit_queue, expected_stderr, ScriptError)
+
+ def _expect_validate(self, patch, is_valid):
+ class MockDelegate(object):
+ def refetch_patch(self, patch):
+ return patch
+
+ task = CommitQueueTask(MockDelegate(), patch)
+ self.assertEquals(task._validate(), is_valid)
+
+ def _mock_patch(self, attachment_dict={}, bug_dict={'bug_status': 'NEW'}, committer="fake"):
+ bug = bugzilla.Bug(bug_dict, None)
+ patch = bugzilla.Attachment(attachment_dict, bug)
+ patch._committer = committer
+ return patch
+
+ def test_validate(self):
+ self._expect_validate(self._mock_patch(), True)
+ self._expect_validate(self._mock_patch({'is_obsolete': True}), False)
+ self._expect_validate(self._mock_patch(bug_dict={'bug_status': 'CLOSED'}), False)
+ self._expect_validate(self._mock_patch(committer=None), False)
+ self._expect_validate(self._mock_patch({'review': '-'}), False)
diff --git a/Tools/Scripts/webkitpy/tool/bot/feeders.py b/Tools/Scripts/webkitpy/tool/bot/feeders.py
index 046c4c1..0b7f23d 100644
--- a/Tools/Scripts/webkitpy/tool/bot/feeders.py
+++ b/Tools/Scripts/webkitpy/tool/bot/feeders.py
@@ -54,6 +54,7 @@ class CommitQueueFeeder(AbstractFeeder):
def feed(self):
patches = self._validate_patches()
+ patches = self._patches_with_acceptable_review_flag(patches)
patches = sorted(patches, self._patch_cmp)
patch_ids = [patch.id() for patch in patches]
self._update_work_items(patch_ids)
@@ -61,6 +62,10 @@ class CommitQueueFeeder(AbstractFeeder):
def _patches_for_bug(self, bug_id):
return self._tool.bugs.fetch_bug(bug_id).commit_queued_patches(include_invalid=True)
+ # Filters out patches with r? or r-, only r+ or no review are OK to land.
+ def _patches_with_acceptable_review_flag(self, patches):
+ return [patch for patch in patches if patch.review() in [None, '+']]
+
def _validate_patches(self):
# Not using BugzillaQueries.fetch_patches_from_commit_queue() so we can reject patches with invalid committers/reviewers.
bug_ids = self._tool.bugs.queries.fetch_bug_ids_from_commit_queue()
diff --git a/Tools/Scripts/webkitpy/tool/bot/feeders_unittest.py b/Tools/Scripts/webkitpy/tool/bot/feeders_unittest.py
index 580f840..e956a8f 100644
--- a/Tools/Scripts/webkitpy/tool/bot/feeders_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/bot/feeders_unittest.py
@@ -68,3 +68,13 @@ Feeding commit-queue items [106, 197]
queue = CommitQueueFeeder(MockTool())
attachments.sort(queue._patch_cmp)
self.assertEqual(attachments, expected_sort)
+
+ def test_patches_with_acceptable_review_flag(self):
+ class MockPatch(object):
+ def __init__(self, patch_id, review):
+ self.id = patch_id
+ self.review = lambda: review
+
+ feeder = CommitQueueFeeder(MockTool())
+ patches = [MockPatch(1, None), MockPatch(2, '-'), MockPatch(3, "+")]
+ self.assertEquals([patch.id for patch in feeder._patches_with_acceptable_review_flag(patches)], [1, 3])
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list