Changeset 148441 in webkit


Ignore:
Timestamp:
Apr 15, 2013, 8:39:40 AM (12 years ago)
Author:
zandobersek@gmail.com
Message:

Deprecate land-cowboy in favor of land-cowhand
https://bugs.webkit.org/show_bug.cgi?id=104470

Patch by Zan Dobersek <zandobersek@gmail.com> on 2013-04-15
Reviewed by Darin Adler.

Move the LandCowboy command implementation under the LandCowhand command and deprecate the former.

  • Scripts/webkitpy/tool/commands/download.py:

(LandCowhand):
(LandCowboy):
(LandCowboy._prepare_state):

  • Scripts/webkitpy/tool/commands/download_unittest.py:

(test_land_cowhand): Adjust the unit tests by testing both LandCowhand and LandCowboy,
also checking the deprecation message in the output of the latter.

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r148435 r148441  
     12013-04-15  Zan Dobersek  <zandobersek@gmail.com>
     2
     3        Deprecate land-cowboy in favor of land-cowhand
     4        https://bugs.webkit.org/show_bug.cgi?id=104470
     5
     6        Reviewed by Darin Adler.
     7
     8        Move the LandCowboy command implementation under the LandCowhand command and deprecate the former.
     9
     10        * Scripts/webkitpy/tool/commands/download.py:
     11        (LandCowhand):
     12        (LandCowboy):
     13        (LandCowboy._prepare_state):
     14        * Scripts/webkitpy/tool/commands/download_unittest.py:
     15        (test_land_cowhand): Adjust the unit tests by testing both LandCowhand and LandCowboy,
     16        also checking the deprecation message in the output of the latter.
     17
    1182013-04-15  Jonathan Liu  <net147@gmail.com>
    219
  • trunk/Tools/Scripts/webkitpy/tool/commands/download.py

    r148360 r148441  
    115115
    116116
    117 class LandCowboy(AbstractSequencedCommand):
    118     name = "land-cowboy"
     117class LandCowhand(AbstractSequencedCommand):
     118    # Gender-blind term for cowboy, see: http://en.wiktionary.org/wiki/cowhand
     119    name = "land-cowhand"
    119120    help_text = "Prepares a ChangeLog and lands the current working directory diff."
    120121    steps = [
     
    133134
    134135
    135 class LandCowhand(LandCowboy):
    136     # Gender-blind term for cowboy, see: http://en.wiktionary.org/wiki/cowhand
    137     name = "land-cowhand"
     136class LandCowboy(LandCowhand):
     137    name = "land-cowboy"
     138
     139    def _prepare_state(self, options, args, tool):
     140        _log.warning("land-cowboy is deprecated, use land-cowhand instead.")
     141        LandCowhand._prepare_state(self, options, args, tool)
    138142
    139143
  • trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py

    r144731 r148441  
    156156        self.assertEqual(mock_tool.checkout().modified_changelogs.call_count, 1)
    157157
    158     def test_land_cowboy(self):
     158    def test_land_cowhand(self):
    159159        expected_logs = """MOCK run_and_throw_if_fail: ['mock-prepare-ChangeLog', '--email=MOCK email', '--merge-base=None', 'MockFile1'], cwd=/mock-checkout
    160160MOCK run_and_throw_if_fail: ['mock-check-webkit-style', '--git-commit', 'MOCK git commit', '--diff-files', 'MockFile1', '--filter', '-changelog'], cwd=/mock-checkout
     
    181181"""
    182182        mock_tool = MockTool(log_executive=True)
     183        self.assert_execute_outputs(LandCowhand(), [50000], options=self._default_options(), expected_logs=expected_logs, tool=mock_tool)
     184
     185        expected_logs = "land-cowboy is deprecated, use land-cowhand instead.\n" + expected_logs
    183186        self.assert_execute_outputs(LandCowboy(), [50000], options=self._default_options(), expected_logs=expected_logs, tool=mock_tool)
    184187
Note: See TracChangeset for help on using the changeset viewer.