Changeset 50104 in webkit


Ignore:
Timestamp:
Oct 26, 2009 3:32:03 PM (14 years ago)
Author:
eric@webkit.org
Message:

2009-10-22 Eric Seidel <eric@webkit.org>

Reviewed by Adam Barth.

commit-queue will get stuck on patches if land-patches terminates unexpectedly
https://bugs.webkit.org/show_bug.cgi?id=30634

  • Scripts/bugzilla-tool:
    • Add a way for land-patches to exit(2) to indicate an error, but one it has handled.
    • Make commit-queue auto cq- any patch where land-patches exited anything other than '0' or '2'.
Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r50102 r50104  
     12009-10-22  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        commit-queue will get stuck on patches if land-patches terminates unexpectedly
     6        https://bugs.webkit.org/show_bug.cgi?id=30634
     7
     8        * Scripts/bugzilla-tool:
     9         - Add a way for land-patches to exit(2) to indicate an error, but one it has handled.
     10         - Make commit-queue auto cq- any patch where land-patches exited anything other than '0' or '2'.
     11
    1122009-10-26  Yuzo Fujishima  <yuzo@google.com>
    213
  • trunk/WebKitTools/Scripts/bugzilla-tool

    r49708 r50104  
    7474        changelog_entry = ChangeLog(changelog_path).latest_entry()
    7575        if not changelog_entry:
    76             error("Failed to parse ChangeLog: " + os.path.abspath(changelog_path))
     76            raise ScriptError(message="Failed to parse ChangeLog: " + os.path.abspath(changelog_path))
    7777        changelog_messages.append(changelog_entry)
    7878
     
    326326        Command.__init__(self, 'Lands all patches on a bug optionally testing them first', 'BUGID', options=options)
    327327
     328    @staticmethod
     329    def handled_error(error):
     330        log(error)
     331        exit(2) # Exit 2 insted of 1 to indicate to the commit-queue to indicate we handled the error, and that the queue should keep looping.
     332
    328333    @classmethod
    329334    def land_patches(cls, bug_id, patches, options, tool):
     
    345350            log("Commit was rejected because the checkout is out of date.  Please update and try again.")
    346351            log("You can pass --no-build to skip building/testing after update if you believe the new commits did not affect the results.")
    347             error(e)
     352            cls.handled_error(e)
    348353        except ScriptError, e:
    349354            # Mark the patch as commit-queue- and comment in the bug.
    350355            tool.bugs.reject_patch_from_commit_queue(patch['id'], e.message_with_output())
    351             error(e)
     356            cls.handled_error(e)
    352357
    353358    @staticmethod
     
    747752            bugzilla_tool_path = __file__ # re-execute this script
    748753            bugzilla_tool_args = [bugzilla_tool_path, 'land-patches', '--force-clean', '--commit-queue', '--quiet', first_bug_id]
    749             WebKitLandingScripts.run_command_with_teed_output(bugzilla_tool_args, sys.stdout)
     754            try:
     755                WebKitLandingScripts.run_and_throw_if_fail(bugzilla_tool_args)
     756            except ScriptError, e:
     757                # Unexpected failure!  Mark the patch as commit-queue- and comment in the bug.
     758                # exit(2) is a special exit code we use to indicate that the error was already handled by land-patches and we should keep looping anyway.
     759                if e.exit_code != 2:
     760                    tool.bugs.reject_patch_from_commit_queue(patch['id'], "Unexpected failure when landing patch!  Please file a bug against bugzilla-tool.\n%s" % e.message_with_output())
    750761            self._remove_log_from_output_tee(bug_log)
    751762
Note: See TracChangeset for help on using the changeset viewer.