Changeset 90840 in webkit


Ignore:
Timestamp:
Jul 12, 2011 12:20:56 PM (13 years ago)
Author:
abarth@webkit.org
Message:

sheriffbot can't perform rollouts
https://bugs.webkit.org/show_bug.cgi?id=64370

Reviewed by Eric Seidel.

Now that we're not updating the working copy before processing every
IRC message, the rollout command needs to update it manually.

  • Scripts/webkitpy/tool/bot/irc_command.py:
  • Scripts/webkitpy/tool/bot/irc_command_unittest.py:
Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r90835 r90840  
     12011-07-12  Adam Barth  <abarth@webkit.org>
     2
     3        sheriffbot can't perform rollouts
     4        https://bugs.webkit.org/show_bug.cgi?id=64370
     5
     6        Reviewed by Eric Seidel.
     7
     8        Now that we're not updating the working copy before processing every
     9        IRC message, the rollout command needs to update it manually.
     10
     11        * Scripts/webkitpy/tool/bot/irc_command.py:
     12        * Scripts/webkitpy/tool/bot/irc_command_unittest.py:
     13
    1142011-07-12  Adam Barth  <abarth@webkit.org>
    215
  • trunk/Tools/Scripts/webkitpy/tool/bot/irc_command.py

    r90521 r90840  
    101101        return ", ".join(target_nicks)
    102102
     103    def _update_working_copy(self, tool):
     104        tool.scm().ensure_clean_working_directory(force_clean=True)
     105        tool.executive.run_and_throw_if_fail(tool.port().update_webkit_command(), quiet=True)
     106
    103107    def execute(self, nick, args, tool, sheriff):
    104108        svn_revision_list, rollout_reason = self._parse_args(args)
     
    107111            # return is equivalent to an irc().post(), but makes for easier unit testing.
    108112            return "%s: Usage: SVN_REVISION [SVN_REVISIONS] REASON" % nick
     113
     114        self._update_working_copy(tool)
    109115
    110116        # FIXME: IRCCommand should bind to a tool and have a self._tool like Command objects do.
  • trunk/Tools/Scripts/webkitpy/tool/bot/irc_command_unittest.py

    r90507 r90840  
    3131from webkitpy.common.system.outputcapture import OutputCapture
    3232from webkitpy.tool.bot.irc_command import *
    33 from webkitpy.tool.mocktool import MockTool
     33from webkitpy.tool.mocktool import MockTool, MockExecutive
    3434
    3535
     
    7777        self.assertEquals("1234", roll._parse_args(["1234"]))
    7878
     79    def test_rollout_updates_working_copy(self):
     80        rollout = Rollout()
     81        tool = MockTool()
     82        tool.executive = MockExecutive(should_log=True)
     83        expected_stderr = "MOCK run_and_throw_if_fail: ['mock-update-webkit']\n"
     84        OutputCapture().assert_outputs(self, rollout._update_working_copy, [tool], expected_stderr=expected_stderr)
     85
    7986    def test_rollout(self):
    8087        rollout = Rollout()
Note: See TracChangeset for help on using the changeset viewer.