[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
abarth at webkit.org
abarth at webkit.org
Thu Dec 3 13:42:06 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 3f6510ae3514884ca68fd2dba47ecd99a767339e
Author: abarth at webkit.org <abarth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Nov 21 15:29:00 2009 +0000
2009-11-21 Adam Barth <abarth at webkit.org>
Reviewed by Eric Seidel.
Convert check-style to use LandingSequence
https://bugs.webkit.org/show_bug.cgi?id=31763
Instead of manipulating the working copy by hand, we should use the
LandingSequence in CheckStyle. This will make this code eaiser to
test.
* Scripts/modules/commands/download.py:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51281 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 609b886..a6ff672 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,16 @@
+2009-11-21 Adam Barth <abarth at webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Convert check-style to use LandingSequence
+ https://bugs.webkit.org/show_bug.cgi?id=31763
+
+ Instead of manipulating the working copy by hand, we should use the
+ LandingSequence in CheckStyle. This will make this code eaiser to
+ test.
+
+ * Scripts/modules/commands/download.py:
+
2009-11-20 Adam Barth <abarth at webkit.org>
Reviewed by Eric Seidel.
diff --git a/WebKitTools/Scripts/modules/commands/download.py b/WebKitTools/Scripts/modules/commands/download.py
index d6ffdeb..1b88cd6 100644
--- a/WebKitTools/Scripts/modules/commands/download.py
+++ b/WebKitTools/Scripts/modules/commands/download.py
@@ -54,35 +54,6 @@ from modules.webkitlandingscripts import WebKitLandingScripts, commit_message_fo
from modules.webkitport import WebKitPort
from modules.workqueue import WorkQueue, WorkQueueDelegate
-class CheckStyle(Command):
- name = "check-style"
- def __init__(self):
- options = WebKitLandingScripts.cleaning_options()
- Command.__init__(self, "Runs check-webkit-style on the specified attachment", "ATTACHMENT_ID", options=options)
-
- @classmethod
- def check_style(cls, patch, options, tool):
- tool.scm().update_webkit()
- log("Checking style for patch %s from bug %s." % (patch["id"], patch["bug_id"]))
- try:
- # FIXME: check-webkit-style shouldn't really have to apply the patch to check the style.
- tool.scm().apply_patch(patch)
- WebKitLandingScripts.run_webkit_script("check-webkit-style")
- except ScriptError, e:
- log("Patch %s from bug %s failed to apply and check style." % (patch["id"], patch["bug_id"]))
- log(e.output)
-
- # This is safe because in order to get here the working directory had to be
- # clean at the beginning. Clean it out again before we exit.
- tool.scm().ensure_clean_working_directory(force_clean=True)
-
- def execute(self, options, args, tool):
- attachment_id = args[0]
- attachment = tool.bugs.fetch_attachment(attachment_id)
-
- WebKitLandingScripts.prepare_clean_working_directory(tool.scm(), options)
- self.check_style(attachment, options, tool)
-
class BuildSequence(ConditionalLandingSequence):
def __init__(self, options, tool):
@@ -270,6 +241,38 @@ class AbstractPatchProcessingCommand(Command):
self._process_patch(patch, options, args, tool)
+class CheckStyleSequence(LandingSequence):
+ def __init__(self, patch, options, tool):
+ ConditionalLandingSequence.__init__(self, patch, options, tool)
+
+ def run(self):
+ self.clean()
+ self.update()
+ self.apply_patch()
+ self.build()
+
+ def build(self):
+ # Instead of building, we check style.
+ WebKitLandingScripts.run_webkit_script("check-webkit-style")
+
+
+class CheckStyle(AbstractPatchProcessingCommand):
+ name = "check-style"
+ def __init__(self):
+ options = WebKitLandingScripts.cleaning_options()
+ AbstractPatchProcessingCommand.__init__(self, "Runs check-webkit-style on the specified attachments.", "ATTACHMENT_ID [ATTACHMENT_IDS]", options)
+
+ def _fetch_list_of_patches_to_process(self, options, args, tool):
+ return map(lambda patch_id: tool.bugs.fetch_attachment(patch_id), args)
+
+ def _prepare_to_process(self, options, args, tool):
+ pass
+
+ def _process_patch(self, patch, options, args, tool):
+ sequence = CheckStyleSequence(patch, options, tool)
+ sequence.run_and_handle_errors()
+
+
class BuildAttachmentSequence(LandingSequence):
def __init__(self, patch, options, tool):
LandingSequence.__init__(self, patch, options, tool)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list