Diff
Modified: trunk/Tools/ChangeLog (94035 => 94036)
--- trunk/Tools/ChangeLog 2011-08-30 01:43:46 UTC (rev 94035)
+++ trunk/Tools/ChangeLog 2011-08-30 01:43:57 UTC (rev 94036)
@@ -1,3 +1,14 @@
+2011-08-29 Tom Zakrajsek <[email protected]>
+
+ sheriffbot "usage" help statements are wrong
+ https://bugs.webkit.org/show_bug.cgi?id=67170
+
+ Reviewed by Adam Barth.
+
+ * Scripts/webkitpy/tool/bot/irc_command.py:
+ * Scripts/webkitpy/tool/bot/irc_command_unittest.py:
+ * Scripts/webkitpy/tool/bot/sheriffircbot_unittest.py:
+
2011-08-29 Adam Barth <[email protected]>
Add support for chomium-mac (non-CoreGraphics) baselines
Modified: trunk/Tools/Scripts/webkitpy/tool/bot/irc_command.py (94035 => 94036)
--- trunk/Tools/Scripts/webkitpy/tool/bot/irc_command.py 2011-08-30 01:43:46 UTC (rev 94035)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/irc_command.py 2011-08-30 01:43:57 UTC (rev 94036)
@@ -109,7 +109,7 @@
if (not svn_revision_list or not rollout_reason):
# return is equivalent to an irc().post(), but makes for easier unit testing.
- return "%s: Usage: SVN_REVISION [SVN_REVISIONS] REASON" % nick
+ return "%s: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON" % nick
self._update_working_copy(tool)
@@ -174,7 +174,7 @@
class Whois(IRCCommand):
def execute(self, nick, args, tool, sheriff):
if len(args) != 1:
- return "%s: Usage: BUGZILLA_EMAIL" % nick
+ return "%s: Usage: whois BUGZILLA_EMAIL" % nick
email = args[0]
# FIXME: We should get the ContributorList off the tool somewhere.
committer = CommitterList().contributor_by_email(email)
@@ -200,7 +200,7 @@
class CreateBug(IRCCommand):
def execute(self, nick, args, tool, sheriff):
if not args:
- return "%s: Usage: BUG_TITLE" % nick
+ return "%s: Usage: create-bug BUG_TITLE" % nick
bug_title = " ".join(args)
bug_description = "%s\nRequested by %s on %s." % (bug_title, nick, config_irc.channel)
Modified: trunk/Tools/Scripts/webkitpy/tool/bot/irc_command_unittest.py (94035 => 94036)
--- trunk/Tools/Scripts/webkitpy/tool/bot/irc_command_unittest.py 2011-08-30 01:43:46 UTC (rev 94035)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/irc_command_unittest.py 2011-08-30 01:43:57 UTC (rev 94036)
@@ -41,9 +41,9 @@
def test_whois(self):
whois = Whois()
- self.assertEquals("tom: Usage: BUGZILLA_EMAIL",
+ self.assertEquals("tom: Usage: whois BUGZILLA_EMAIL",
whois.execute("tom", [], None, None))
- self.assertEquals("tom: Usage: BUGZILLA_EMAIL",
+ self.assertEquals("tom: Usage: whois BUGZILLA_EMAIL",
whois.execute("tom", ["Adam", "Barth"], None, None))
self.assertEquals("tom: Sorry, I don't know [email protected]. Maybe you could introduce me?",
whois.execute("tom", ["[email protected]"], None, None))
@@ -54,7 +54,7 @@
def test_create_bug(self):
create_bug = CreateBug()
- self.assertEquals("tom: Usage: BUG_TITLE",
+ self.assertEquals("tom: Usage: create-bug BUG_TITLE",
create_bug.execute("tom", [], None, None))
example_args = ["sherrif-bot", "should", "have", "a", "create-bug", "command"]
@@ -93,7 +93,7 @@
self.assertEquals((None, None), rollout._parse_args(["--bar", "1234"]))
# Invalid arguments result in the USAGE message.
- self.assertEquals("tom: Usage: SVN_REVISION [SVN_REVISIONS] REASON",
+ self.assertEquals("tom: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON",
rollout.execute("tom", [], None, None))
# FIXME: We need a better way to test IRCCommands which call tool.irc().post()
Modified: trunk/Tools/Scripts/webkitpy/tool/bot/sheriffircbot_unittest.py (94035 => 94036)
--- trunk/Tools/Scripts/webkitpy/tool/bot/sheriffircbot_unittest.py 2011-08-30 01:43:46 UTC (rev 94035)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/sheriffircbot_unittest.py 2011-08-30 01:43:57 UTC (rev 94036)
@@ -118,12 +118,12 @@
OutputCapture().assert_outputs(self, run, args=["rollout r21654 21655 r21656 This r21654 patch broke the world"], expected_stderr=expected_stderr)
def test_rollout_bananas(self):
- expected_stderr = "MOCK: irc.post: mock_nick: Usage: SVN_REVISION [SVN_REVISIONS] REASON\n"
+ expected_stderr = "MOCK: irc.post: mock_nick: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON\n"
OutputCapture().assert_outputs(self, run, args=["rollout bananas"], expected_stderr=expected_stderr)
def test_rollout_invalidate_revision(self):
# When folks pass junk arguments, we should just spit the usage back at them.
- expected_stderr = "MOCK: irc.post: mock_nick: Usage: SVN_REVISION [SVN_REVISIONS] REASON\n"
+ expected_stderr = "MOCK: irc.post: mock_nick: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON\n"
OutputCapture().assert_outputs(self, run,
args=["rollout --component=Tools 21654"],
expected_stderr=expected_stderr)
@@ -149,9 +149,9 @@
expected_stderr=expected_stderr)
def test_rollout_no_reason(self):
- expected_stderr = "MOCK: irc.post: mock_nick: Usage: SVN_REVISION [SVN_REVISIONS] REASON\n"
+ expected_stderr = "MOCK: irc.post: mock_nick: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON\n"
OutputCapture().assert_outputs(self, run, args=["rollout 21654"], expected_stderr=expected_stderr)
def test_multi_rollout_no_reason(self):
- expected_stderr = "MOCK: irc.post: mock_nick: Usage: SVN_REVISION [SVN_REVISIONS] REASON\n"
+ expected_stderr = "MOCK: irc.post: mock_nick: Usage: rollout SVN_REVISION [SVN_REVISIONS] REASON\n"
OutputCapture().assert_outputs(self, run, args=["rollout 21654 21655 r21656"], expected_stderr=expected_stderr)