Skip to content
Permalink
Browse files
2009-11-20 Adam Barth <abarth@webkit.org>
        Reviewed by Eric Seidel.

        Move prepare_clean_working_directory into the LandingSequence
        https://bugs.webkit.org/show_bug.cgi?id=31743

        * Scripts/bugzilla-tool:
        * Scripts/modules/landingsequence.py:

Canonical link: https://commits.webkit.org/42688@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@51259 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Adam Barth committed Nov 20, 2009
1 parent 7cf4038 commit 054ea2d76022a8ee8fc98a61c8b6e834a9072456
Showing with 26 additions and 15 deletions.
  1. +10 −0 WebKitTools/ChangeLog
  2. +12 −15 WebKitTools/Scripts/bugzilla-tool
  3. +4 −0 WebKitTools/Scripts/modules/landingsequence.py
@@ -1,3 +1,13 @@
2009-11-20 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Move prepare_clean_working_directory into the LandingSequence
https://bugs.webkit.org/show_bug.cgi?id=31743

* Scripts/bugzilla-tool:
* Scripts/modules/landingsequence.py:

2009-11-20 Yael Aharon <yael.aharon@nokia.com>

Reviewed by Kenneth Rohde Christiansen.
@@ -190,28 +190,25 @@ class LandDiffSequence(ConditionalLandingSequence):
def __init__(self, patch, options, tool):
ConditionalLandingSequence.__init__(self, patch, options, tool)

def update(self):
pass

def apply_patch(self):
pass

def close_patch(self, commit_log):
self._comment_test = bug_comment_from_commit_text(self._tool.scm(), commit_log)
# There is no patch to close.
def run(self):
self.build()
self.test()
commit_log = self.commit()
self.close_bug(commit_log)

def close_bug(self):
def close_bug(self, commit_log):
comment_test = bug_comment_from_commit_text(self._tool.scm(), commit_log)
bug_id = self._patch["bug_id"]
if bug_id:
log("Updating bug %s" % bug_id)
if self._options.close_bug:
self._tool.bugs.close_bug_as_fixed(bug_id, self._comment_test)
self._tool.bugs.close_bug_as_fixed(bug_id, comment_test)
else:
# FIXME: We should a smart way to figure out if the patch is attached
# to the bug, and if so obsolete it.
self._tool.bugs.post_comment_to_bug(bug_id, self._comment_test)
self._tool.bugs.post_comment_to_bug(bug_id, comment_test)
else:
log(self._comment_test)
log(comment_test)
log("No bug id provided.")


@@ -304,6 +301,7 @@ class BuildAttachmentSequence(LandingSequence):
LandingSequence.__init__(self, patch, options, tool)

def run(self):
self.clean()
self.update()
self.apply_patch()
self.build()
@@ -322,7 +320,6 @@ class BuildAttachment(AbstractPatchProcessingCommand):
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)
@@ -339,12 +336,12 @@ class AbstractPatchLandingCommand(AbstractPatchProcessingCommand):
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 = ConditionalLandingSequence(patch, options, tool)
sequence.run_and_handle_errors()


class LandAttachment(AbstractPatchLandingCommand):
name = "land-attachment"
def __init__(self):
@@ -43,6 +43,7 @@ def __init__(self, patch, options, tool):
self._port = WebKitPort.port(self._options)

def run(self):
self.clean()
self.update()
self.apply_patch()
self.build()
@@ -66,6 +67,9 @@ def run_and_handle_errors(self):
self._tool.bugs.reject_patch_from_commit_queue(self._patch["id"], e.message_with_output())
WorkQueue.exit_after_handled_error(e)

def clean(self):
WebKitLandingScripts.prepare_clean_working_directory(self._tool.scm(), self._options)

def update(self):
self._tool.scm().update_webkit()

0 comments on commit 054ea2d

Please sign in to comment.