Modified: trunk/Tools/ChangeLog (148440 => 148441)
--- trunk/Tools/ChangeLog 2013-04-15 15:28:45 UTC (rev 148440)
+++ trunk/Tools/ChangeLog 2013-04-15 15:39:40 UTC (rev 148441)
@@ -1,3 +1,20 @@
+2013-04-15 Zan Dobersek <zandober...@gmail.com>
+
+ Deprecate land-cowboy in favor of land-cowhand
+ https://bugs.webkit.org/show_bug.cgi?id=104470
+
+ 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.
+
2013-04-15 Jonathan Liu <net...@gmail.com>
Improve Windows cmd.exe detection
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/download.py (148440 => 148441)
--- trunk/Tools/Scripts/webkitpy/tool/commands/download.py 2013-04-15 15:28:45 UTC (rev 148440)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/download.py 2013-04-15 15:39:40 UTC (rev 148441)
@@ -114,8 +114,9 @@
}
-class LandCowboy(AbstractSequencedCommand):
- name = "land-cowboy"
+class LandCowhand(AbstractSequencedCommand):
+ # Gender-blind term for cowboy, see: http://en.wiktionary.org/wiki/cowhand
+ name = "land-cowhand"
help_text = "Prepares a ChangeLog and lands the current working directory diff."
steps = [
steps.PrepareChangeLog,
@@ -132,11 +133,14 @@
options.check_style_filter = "-changelog"
-class LandCowhand(LandCowboy):
- # Gender-blind term for cowboy, see: http://en.wiktionary.org/wiki/cowhand
- name = "land-cowhand"
+class LandCowboy(LandCowhand):
+ name = "land-cowboy"
+ def _prepare_state(self, options, args, tool):
+ _log.warning("land-cowboy is deprecated, use land-cowhand instead.")
+ LandCowhand._prepare_state(self, options, args, tool)
+
class CheckStyleLocal(AbstractSequencedCommand):
name = "check-style-local"
help_text = "Run check-webkit-style on the current working directory diff"
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py (148440 => 148441)
--- trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py 2013-04-15 15:28:45 UTC (rev 148440)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/download_unittest.py 2013-04-15 15:39:40 UTC (rev 148441)
@@ -155,7 +155,7 @@
self.assertEqual(mock_tool.scm().create_patch.call_count, 0)
self.assertEqual(mock_tool.checkout().modified_changelogs.call_count, 1)
- def test_land_cowboy(self):
+ def test_land_cowhand(self):
expected_logs = """MOCK run_and_throw_if_fail: ['mock-prepare-ChangeLog', '--email=MOCK email', '--merge-base=None', 'MockFile1'], cwd=/mock-checkout
MOCK run_and_throw_if_fail: ['mock-check-webkit-style', '--git-commit', 'MOCK git commit', '--diff-files', 'MockFile1', '--filter', '-changelog'], cwd=/mock-checkout
MOCK run_command: ['ruby', '-I', '/mock-checkout/Websites/bugs.webkit.org/PrettyPatch', '/mock-checkout/Websites/bugs.webkit.org/PrettyPatch/prettify.rb'], cwd=None, input=Patch1
@@ -180,6 +180,9 @@
No bug id provided.
"""
mock_tool = MockTool(log_executive=True)
+ self.assert_execute_outputs(LandCowhand(), [50000], options=self._default_options(), expected_logs=expected_logs, tool=mock_tool)
+
+ expected_logs = "land-cowboy is deprecated, use land-cowhand instead.\n" + expected_logs
self.assert_execute_outputs(LandCowboy(), [50000], options=self._default_options(), expected_logs=expected_logs, tool=mock_tool)
def test_land_red_builders(self):