Changeset 56034 in webkit


Ignore:
Timestamp:
Mar 15, 2010 9:43:38 PM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-03-15 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Add webkit-patch post-rollout to upload rollouts to bugs.webkit.org for easy committing
https://bugs.webkit.org/show_bug.cgi?id=36154

This new command is a mashup of prepare-rollout and post. This command
will be used by an experimental bot to post rollouts of patches that
break things to bugs.webkit.org where they can be landed with the
greatest of ease.

  • Scripts/webkitpy/commands/download.py:
  • Scripts/webkitpy/commands/download_unittest.py:
  • Scripts/webkitpy/steps/init.py:
  • Scripts/webkitpy/steps/postdiffforrevert.py: Added.
Location:
trunk/WebKitTools
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r56032 r56034  
     12010-03-15  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Add webkit-patch post-rollout to upload rollouts to bugs.webkit.org for easy committing
     6        https://bugs.webkit.org/show_bug.cgi?id=36154
     7
     8        This new command is a mashup of prepare-rollout and post.  This command
     9        will be used by an experimental bot to post rollouts of patches that
     10        break things to bugs.webkit.org where they can be landed with the
     11        greatest of ease.
     12
     13        * Scripts/webkitpy/commands/download.py:
     14        * Scripts/webkitpy/commands/download_unittest.py:
     15        * Scripts/webkitpy/steps/__init__.py:
     16        * Scripts/webkitpy/steps/postdiffforrevert.py: Added.
     17
    1182010-03-15  Adam Barth  <abarth@webkit.org>
    219
  • trunk/WebKitTools/Scripts/webkitpy/commands/download.py

    r55034 r56034  
    249249
    250250    def _bug_id_for_revision(self, revision):
    251         raise NotImplementedError("subclasses must implement")
     251        bug_id = self._parse_bug_id_from_revision_diff(revision)
     252        if bug_id:
     253            log("Preparing rollout for bug %s." % bug_id)
     254            return bug_id
     255        log("Unable to parse bug number from diff.")
    252256
    253257    def _prepare_state(self, options, args, tool):
     
    274278    ]
    275279
    276     def _bug_id_for_revision(self, revision):
    277         bug_id = self._parse_bug_id_from_revision_diff(revision)
    278         if bug_id:
    279             return bug_id
    280         log("Failed to parse bug number from diff.")
     280
     281class PostRollout(AbstractRolloutPrepCommand):
     282    name = "post-rollout"
     283    help_text = "Prepare a rollout of the given revision and upload it to the bug."
     284    steps = [
     285        steps.CleanWorkingDirectory,
     286        steps.Update,
     287        steps.RevertRevision,
     288        steps.PrepareChangeLogForRevert,
     289        # FIXME: If there's no bug number, we should make a new bug.
     290        steps.PostDiffForRevert,
     291    ]
    281292
    282293
     
    302313        steps.ReopenBugAfterRollout,
    303314    ]
    304 
    305     def _bug_id_for_revision(self, revision):
    306         bug_id = self._parse_bug_id_from_revision_diff(revision)
    307         if bug_id:
    308             log("Will re-open bug %s after rollout." % bug_id)
    309             return bug_id
    310         log("Failed to parse bug number from diff.  No bugs will be updated/reopened after the rollout.")
  • trunk/WebKitTools/Scripts/webkitpy/commands/download_unittest.py

    r55968 r56034  
    118118
    119119    def test_prepare_rollout(self):
    120         expected_stderr="Updating working directory\nRunning prepare-ChangeLog\n"
     120        expected_stderr="Preparing rollout for bug 12345.\nUpdating working directory\nRunning prepare-ChangeLog\n"
     121        self.assert_execute_outputs(PrepareRollout(), [852, "Reason"], options=self._default_options(), expected_stderr=expected_stderr)
     122
     123    def test_post_rollout(self):
     124        expected_stderr="Preparing rollout for bug 12345.\nUpdating working directory\nRunning prepare-ChangeLog\n"
    121125        self.assert_execute_outputs(PrepareRollout(), [852, "Reason"], options=self._default_options(), expected_stderr=expected_stderr)
    122126
    123127    def test_rollout(self):
    124         expected_stderr = "Will re-open bug 12345 after rollout.\nUpdating working directory\nRunning prepare-ChangeLog\nBuilding WebKit\n"
     128        expected_stderr = "Preparing rollout for bug 12345.\nUpdating working directory\nRunning prepare-ChangeLog\nBuilding WebKit\n"
    125129        self.assert_execute_outputs(Rollout(), [852, "Reason"], options=self._default_options(), expected_stderr=expected_stderr)
    126130
  • trunk/WebKitTools/Scripts/webkitpy/steps/__init__.py

    r55034 r56034  
    4747from webkitpy.steps.postdiff import PostDiff
    4848from webkitpy.steps.postdiffforcommit import PostDiffForCommit
     49from webkitpy.steps.postdiffforrevert import PostDiffForRevert
    4950from webkitpy.steps.preparechangelogforrevert import PrepareChangeLogForRevert
    5051from webkitpy.steps.preparechangelog import PrepareChangeLog
Note: See TracChangeset for help on using the changeset viewer.