summaryrefslogtreecommitdiff
path: root/Tools/Scripts/webkitpy/tool/commands
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-07-30 11:37:48 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-07-30 11:38:52 +0200
commit89e2486a48b739f8d771d69ede5a6a1b244a10fc (patch)
tree503b1a7812cf97d93704c32437eb5f62dc1a1ff9 /Tools/Scripts/webkitpy/tool/commands
parent625f028249cb37c55bbbd153f3902afd0b0756d9 (diff)
downloadqtwebkit-89e2486a48b739f8d771d69ede5a6a1b244a10fc.tar.gz
Imported WebKit commit 0282df8ca7c11d8c8a66ea18543695c69f545a27 (http://svn.webkit.org/repository/webkit/trunk@124002)
New snapshot with prospective Mountain Lion build fix
Diffstat (limited to 'Tools/Scripts/webkitpy/tool/commands')
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/queues.py20
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/queues_unittest.py12
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/rebaseline.py3
-rw-r--r--Tools/Scripts/webkitpy/tool/commands/upload.py8
4 files changed, 33 insertions, 10 deletions
diff --git a/Tools/Scripts/webkitpy/tool/commands/queues.py b/Tools/Scripts/webkitpy/tool/commands/queues.py
index e8db17c7b..b251c0fb6 100644
--- a/Tools/Scripts/webkitpy/tool/commands/queues.py
+++ b/Tools/Scripts/webkitpy/tool/commands/queues.py
@@ -379,9 +379,6 @@ class AbstractReviewQueue(AbstractPatchQueue, StepSequenceErrorHandler):
# AbstractPatchQueue methods
- def begin_work_queue(self):
- AbstractPatchQueue.begin_work_queue(self)
-
def next_work_item(self):
return self._next_patch()
@@ -416,6 +413,23 @@ class StyleQueue(AbstractReviewQueue, StyleQueueTaskDelegate):
def __init__(self):
AbstractReviewQueue.__init__(self)
+ def begin_work_queue(self):
+ AbstractReviewQueue.begin_work_queue(self)
+ self.clean_bugzilla()
+
+ def clean_bugzilla(self):
+ try:
+ self._update_status("Cleaning review queue")
+ self.run_webkit_patch(["clean-review-queue"])
+ except ScriptError, e:
+ self._update_status(e)
+
+ try:
+ self._update_status("Cleaning pending commit")
+ self.run_webkit_patch(["clean-pending-commit"])
+ except ScriptError, e:
+ self._update_status(e)
+
def review_patch(self, patch):
task = StyleQueueTask(self, patch)
if not task.validate():
diff --git a/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py b/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py
index 1914ccd4b..2e6b1f07b 100644
--- a/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py
+++ b/Tools/Scripts/webkitpy/tool/commands/queues_unittest.py
@@ -449,7 +449,11 @@ The commit-queue is continuing to process your patch.
class StyleQueueTest(QueuesTest):
def test_style_queue_with_style_exception(self):
expected_stderr = {
- "begin_work_queue": self._default_begin_work_queue_stderr("style-queue"),
+ "begin_work_queue": self._default_begin_work_queue_stderr("style-queue") + """MOCK: update_status: style-queue Cleaning review queue
+MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'clean-review-queue'], cwd=/mock-checkout
+MOCK: update_status: style-queue Cleaning pending commit
+MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'clean-pending-commit'], cwd=/mock-checkout
+""",
"next_work_item": "",
"process_work_item": """MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'clean'], cwd=/mock-checkout
MOCK: update_status: style-queue Cleaned working directory
@@ -472,7 +476,11 @@ MOCK: release_work_item: style-queue 10000
def test_style_queue_with_watch_list_exception(self):
expected_stderr = {
- "begin_work_queue": self._default_begin_work_queue_stderr("style-queue"),
+ "begin_work_queue": self._default_begin_work_queue_stderr("style-queue") + """MOCK: update_status: style-queue Cleaning review queue
+MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'clean-review-queue'], cwd=/mock-checkout
+MOCK: update_status: style-queue Cleaning pending commit
+MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'clean-pending-commit'], cwd=/mock-checkout
+""",
"next_work_item": "",
"process_work_item": """MOCK run_and_throw_if_fail: ['echo', '--status-host=example.com', 'clean'], cwd=/mock-checkout
MOCK: update_status: style-queue Cleaned working directory
diff --git a/Tools/Scripts/webkitpy/tool/commands/rebaseline.py b/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
index c214a339c..ed27ab553 100644
--- a/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
+++ b/Tools/Scripts/webkitpy/tool/commands/rebaseline.py
@@ -302,7 +302,8 @@ class AbstractParallelRebaselineCommand(AbstractDeclarativeCommand):
command_results = self._tool.executive.run_in_parallel(commands)
files_to_add = self._files_to_add(command_results)
- self._tool.scm().add_list(list(files_to_add))
+ if files_to_add:
+ self._tool.scm().add_list(list(files_to_add))
if options.optimize:
self._optimize_baselines(test_list)
diff --git a/Tools/Scripts/webkitpy/tool/commands/upload.py b/Tools/Scripts/webkitpy/tool/commands/upload.py
index d587e0c97..6b52e6c83 100644
--- a/Tools/Scripts/webkitpy/tool/commands/upload.py
+++ b/Tools/Scripts/webkitpy/tool/commands/upload.py
@@ -74,7 +74,7 @@ class CleanPendingCommit(AbstractDeclarativeCommand):
what_was_cleared = []
if patch.review() == "+":
if patch.reviewer():
- what_was_cleared.append("%s's review+" % patch.reviewer().full_name)
+ what_was_cleared.append(u"%s's review+" % patch.reviewer().full_name)
else:
what_was_cleared.append("review+")
return join_with_separators(what_was_cleared)
@@ -88,7 +88,7 @@ class CleanPendingCommit(AbstractDeclarativeCommand):
flags_to_clear = self._flags_to_clear_on_patch(patch)
if not flags_to_clear:
continue
- message = "Cleared %s from obsolete attachment %s so that this bug does not appear in http://webkit.org/pending-commit." % (flags_to_clear, patch.id())
+ message = u"Cleared %s from obsolete attachment %s so that this bug does not appear in http://webkit.org/pending-commit." % (flags_to_clear, patch.id())
self._tool.bugs.obsolete_attachment(patch.id(), message)
@@ -133,7 +133,7 @@ class AssignToCommitter(AbstractDeclarativeCommand):
bug = self._tool.bugs.fetch_bug(bug_id)
if not bug.is_unassigned():
assigned_to_email = bug.assigned_to_email()
- log("Bug %s is already assigned to %s (%s)." % (bug_id, assigned_to_email, committers.committer_by_email(assigned_to_email)))
+ log(u"Bug %s is already assigned to %s (%s)." % (bug_id, assigned_to_email, committers.committer_by_email(assigned_to_email)))
return
reviewed_patches = bug.reviewed_patches()
@@ -153,7 +153,7 @@ class AssignToCommitter(AbstractDeclarativeCommand):
log("Attacher %s is not a committer. Bug %s likely needs commit-queue+." % (attacher_email, bug_id))
return
- reassign_message = "Attachment %s was posted by a committer and has review+, assigning to %s for commit." % (latest_patch.id(), committer.full_name)
+ reassign_message = u"Attachment %s was posted by a committer and has review+, assigning to %s for commit." % (latest_patch.id(), committer.full_name)
self._tool.bugs.reassign_bug(bug_id, committer.bugzilla_email(), reassign_message)
def execute(self, options, args, tool):