[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
eric at webkit.org
eric at webkit.org
Wed Apr 7 23:52:10 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit 8b77a00c532470d22eb5f1fb37cbf93ebc2b287d
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Nov 20 18:57:50 2009 +0000
2009-11-20 Adam Barth <abarth at webkit.org>
Reviewed by Eric Seidel.
Implement bugzilla-tool build-attachment
https://bugs.webkit.org/show_bug.cgi?id=31722
This command builds an attachment from bugzilla. It leaves the built
patch in the working copy.
* Scripts/bugzilla-tool:
* Scripts/modules/landingsequence.py:
* Scripts/modules/webkitlandingscripts.py:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51243 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 9bbbbff..ac1e16e 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,17 @@
+2009-11-20 Adam Barth <abarth at webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Implement bugzilla-tool build-attachment
+ https://bugs.webkit.org/show_bug.cgi?id=31722
+
+ This command builds an attachment from bugzilla. It leaves the built
+ patch in the working copy.
+
+ * Scripts/bugzilla-tool:
+ * Scripts/modules/landingsequence.py:
+ * Scripts/modules/webkitlandingscripts.py:
+
2009-11-20 Alejandro G. Castro <alex at igalia.com>
Reviewed by Xan Lopez.
diff --git a/WebKitTools/Scripts/bugzilla-tool b/WebKitTools/Scripts/bugzilla-tool
index 6cfecbe..922595a 100755
--- a/WebKitTools/Scripts/bugzilla-tool
+++ b/WebKitTools/Scripts/bugzilla-tool
@@ -45,7 +45,7 @@ from modules.comments import bug_comment_from_commit_text
from modules.bugzilla import Bugzilla, parse_bug_id
from modules.buildbot import BuildBot
from modules.changelogs import ChangeLog
-from modules.landingsequence import ConditionalLandingSequence
+from modules.landingsequence import LandingSequence, ConditionalLandingSequence
from modules.logging import error, log, tee
from modules.multicommandtool import MultiCommandTool, Command
from modules.patchcollection import PatchCollection
@@ -186,7 +186,7 @@ class WebKitApplyingScripts:
scm.commit_locally_with_message(commit_message.message() or patch["name"])
-class LandDiffLandingSequence(ConditionalLandingSequence):
+class LandDiffSequence(ConditionalLandingSequence):
def __init__(self, patch, options, tool):
ConditionalLandingSequence.__init__(self, patch, options, tool)
@@ -221,6 +221,7 @@ class LandDiff(Command):
options = [
make_option("-r", "--reviewer", action="store", type="string", dest="reviewer", help="Update ChangeLogs to say Reviewed by REVIEWER."),
]
+ options += WebKitLandingScripts.build_options()
options += WebKitLandingScripts.land_options()
Command.__init__(self, "Lands the current working directory diff and updates the bug if provided.", "[BUGID]", options=options)
@@ -261,7 +262,7 @@ class LandDiff(Command):
"bug_id": bug_id
}
- sequence = LandDiffLandingSequence(fake_patch, options, tool)
+ sequence = LandDiffSequence(fake_patch, options, tool)
sequence.run()
@@ -298,9 +299,41 @@ class AbstractPatchProcessingCommand(Command):
self._process_patch(patch, options, args, tool)
+class BuildAttachmentSequence(LandingSequence):
+ def __init__(self, patch, options, tool):
+ LandingSequence.__init__(self, patch, options, tool)
+
+ def run(self):
+ self.update()
+ self.apply_patch()
+ self.build()
+
+
+class BuildAttachment(AbstractPatchProcessingCommand):
+ name = "build-attachment"
+ def __init__(self):
+ options = WebKitLandingScripts.cleaning_options()
+ options += WebKitLandingScripts.build_options()
+ AbstractPatchProcessingCommand.__init__(self, "Builds patches from bugzilla", "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):
+ # Check the tree status first so we can fail early.
+ WebKitLandingScripts.ensure_builders_are_green(tool.buildbot, options)
+ WebKitLandingScripts.prepare_clean_working_directory(tool.scm(), options)
+
+ def _process_patch(self, patch, options, args, tool):
+ sequence = BuildAttachmentSequence(patch, options, tool)
+ sequence.run_and_handle_errors()
+
+
class AbstractPatchLandingCommand(AbstractPatchProcessingCommand):
def __init__(self, help_text, args_description):
- options = WebKitLandingScripts.cleaning_options() + WebKitLandingScripts.land_options()
+ options = WebKitLandingScripts.cleaning_options()
+ options += WebKitLandingScripts.build_options()
+ options += WebKitLandingScripts.land_options()
AbstractPatchProcessingCommand.__init__(self, help_text, args_description, options)
def _prepare_to_process(self, options, args, tool):
@@ -315,7 +348,7 @@ class AbstractPatchLandingCommand(AbstractPatchProcessingCommand):
class LandAttachment(AbstractPatchLandingCommand):
name = "land-attachment"
def __init__(self):
- AbstractPatchLandingCommand.__init__(self, "Lands a patches from bugzilla, optionally building and testing them first", "ATTACHMENT_ID [ATTACHMENT_IDS]")
+ AbstractPatchLandingCommand.__init__(self, "Lands patches from bugzilla, optionally building and testing them first", "ATTACHMENT_ID [ATTACHMENT_IDS]")
def _fetch_list_of_patches_to_process(self, options, args, tool):
return map(lambda patch_id: tool.bugs.fetch_attachment(patch_id), args)
@@ -453,8 +486,9 @@ class PostCommits(Command):
class Rollout(Command):
name = "rollout"
def __init__(self):
- options = WebKitLandingScripts.land_options()
- options += WebKitLandingScripts.cleaning_options()
+ options = WebKitLandingScripts.cleaning_options()
+ options += WebKitLandingScripts.build_options()
+ options += WebKitLandingScripts.land_options()
options.append(make_option("--complete-rollout", action="store_true", dest="complete_rollout", help="Experimental support for complete unsupervised rollouts, including re-opening the bug. Not recommended."))
Command.__init__(self, "Reverts the given revision and commits the revert and re-opens the original bug.", "REVISION [BUGID]", options=options)
diff --git a/WebKitTools/Scripts/modules/landingsequence.py b/WebKitTools/Scripts/modules/landingsequence.py
index 3e9e4f7..7264ca3 100644
--- a/WebKitTools/Scripts/modules/landingsequence.py
+++ b/WebKitTools/Scripts/modules/landingsequence.py
@@ -59,8 +59,11 @@ class LandingSequence:
log("You can pass --no-build to skip building/testing after update if you believe the new commits did not affect the results.")
WorkQueue.exit_after_handled_error(e)
except ScriptError, e:
- # Mark the patch as commit-queue- and comment in the bug.
- self._tool.bugs.reject_patch_from_commit_queue(self._patch["id"], e.message_with_output())
+ if not self._options.quiet:
+ log(e.message_with_output())
+ if self._options.non_interactive:
+ # Mark the patch as commit-queue- and comment in the bug.
+ self._tool.bugs.reject_patch_from_commit_queue(self._patch["id"], e.message_with_output())
WorkQueue.exit_after_handled_error(e)
def update(self):
diff --git a/WebKitTools/Scripts/modules/webkitlandingscripts.py b/WebKitTools/Scripts/modules/webkitlandingscripts.py
index bfca90a..87bcc4d 100644
--- a/WebKitTools/Scripts/modules/webkitlandingscripts.py
+++ b/WebKitTools/Scripts/modules/webkitlandingscripts.py
@@ -68,17 +68,22 @@ class WebKitLandingScripts:
]
@staticmethod
- def land_options():
+ def build_options():
return [
make_option("--ignore-builders", action="store_false", dest="check_builders", default=True, help="Don't check to see if the build.webkit.org builders are green before landing."),
- make_option("--no-close", action="store_false", dest="close_bug", default=True, help="Leave bug open after landing."),
- make_option("--no-build", action="store_false", dest="build", default=True, help="Commit without building first, implies --no-test."),
- make_option("--no-test", action="store_false", dest="test", default=True, help="Commit without running run-webkit-tests."),
make_option("--quiet", action="store_true", dest="quiet", default=False, help="Produce less console output."),
make_option("--non-interactive", action="store_true", dest="non_interactive", default=False, help="Never prompt the user, fail as fast as possible."),
] + WebKitPort.port_options()
@staticmethod
+ def land_options():
+ return [
+ make_option("--no-close", action="store_false", dest="close_bug", default=True, help="Leave bug open after landing."),
+ make_option("--no-build", action="store_false", dest="build", default=True, help="Commit without building first, implies --no-test."),
+ make_option("--no-test", action="store_false", dest="test", default=True, help="Commit without running run-webkit-tests."),
+ ]
+
+ @staticmethod
def run_command_with_teed_output(args, teed_output):
child_process = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list