summaryrefslogtreecommitdiffstats
path: root/WebKitTools/Scripts/webkitpy/tool/steps
diff options
context:
space:
mode:
Diffstat (limited to 'WebKitTools/Scripts/webkitpy/tool/steps')
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/steps/abstractstep.py12
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/steps/applypatchwithlocalcommit.py2
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/steps/checkstyle.py6
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/steps/checkstyle_unittest.py46
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py5
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/steps/commit.py40
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/steps/createbug.py6
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/steps/options.py10
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/steps/preparechangelog.py9
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/steps/preparechangelog_unittest.py5
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/steps/preparechangelogforrevert.py2
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/steps/steps_unittest.py9
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/steps/updatechangelogswithreview_unittest.py7
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/steps/updatechangelogswithreviewer.py2
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/steps/validatereviewer.py2
-rw-r--r--WebKitTools/Scripts/webkitpy/tool/steps/validatereviewer_unittest.py5
16 files changed, 72 insertions, 96 deletions
diff --git a/WebKitTools/Scripts/webkitpy/tool/steps/abstractstep.py b/WebKitTools/Scripts/webkitpy/tool/steps/abstractstep.py
index 20f8bbf..8f0d153 100644
--- a/WebKitTools/Scripts/webkitpy/tool/steps/abstractstep.py
+++ b/WebKitTools/Scripts/webkitpy/tool/steps/abstractstep.py
@@ -27,6 +27,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from webkitpy.common.system.deprecated_logging import log
+from webkitpy.common.system.executive import ScriptError
from webkitpy.common.config.ports import WebKitPort
from webkitpy.tool.steps.options import Options
@@ -34,6 +35,10 @@ from webkitpy.tool.steps.options import Options
class AbstractStep(object):
def __init__(self, tool, options):
self._tool = tool
+ if options.no_squash:
+ raise ScriptError('--no-squash has been removed. Use "--git-commit=HEAD.." or "-g HEAD.." to operate on the working copy.')
+ if options.squash:
+ raise ScriptError('--squash has been removed. It is now the default behavior if --git-commit is omitted.')
self._options = options
self._port = None
@@ -53,8 +58,8 @@ class AbstractStep(object):
return self._port
_well_known_keys = {
- "diff": lambda self, state: self._tool.scm().create_patch(self._options.git_commit, self._options.squash),
- "changelogs": lambda self, state: self._tool.checkout().modified_changelogs(self._options.git_commit, self._options.squash),
+ "diff": lambda self, state: self._tool.scm().create_patch(self._options.git_commit),
+ "changelogs": lambda self, state: self._tool.checkout().modified_changelogs(self._options.git_commit),
"bug_title": lambda self, state: self._tool.bugs.fetch_bug(state["bug_id"]).title(),
}
@@ -69,8 +74,9 @@ class AbstractStep(object):
@classmethod
def options(cls):
return [
- # We need these options here because cached_lookup uses them. :(
+ # We need this option here because cached_lookup uses it. :(
Options.git_commit,
+ # FIXME: Get rid of these.
Options.no_squash,
Options.squash,
]
diff --git a/WebKitTools/Scripts/webkitpy/tool/steps/applypatchwithlocalcommit.py b/WebKitTools/Scripts/webkitpy/tool/steps/applypatchwithlocalcommit.py
index d6b026d..3dcd8d9 100644
--- a/WebKitTools/Scripts/webkitpy/tool/steps/applypatchwithlocalcommit.py
+++ b/WebKitTools/Scripts/webkitpy/tool/steps/applypatchwithlocalcommit.py
@@ -39,5 +39,5 @@ class ApplyPatchWithLocalCommit(ApplyPatch):
def run(self, state):
ApplyPatch.run(self, state)
if self._options.local_commit:
- commit_message = self._tool.checkout().commit_message_for_this_commit(git_commit=None, squash=False)
+ commit_message = self._tool.checkout().commit_message_for_this_commit(git_commit=None)
self._tool.scm().commit_locally_with_message(commit_message.message() or state["patch"].name())
diff --git a/WebKitTools/Scripts/webkitpy/tool/steps/checkstyle.py b/WebKitTools/Scripts/webkitpy/tool/steps/checkstyle.py
index 93e6215..af38214 100644
--- a/WebKitTools/Scripts/webkitpy/tool/steps/checkstyle.py
+++ b/WebKitTools/Scripts/webkitpy/tool/steps/checkstyle.py
@@ -40,8 +40,6 @@ class CheckStyle(AbstractStep):
Options.non_interactive,
Options.check_style,
Options.git_commit,
- Options.no_squash,
- Options.squash,
]
def run(self, state):
@@ -53,10 +51,6 @@ class CheckStyle(AbstractStep):
if self._options.git_commit:
args.append("--git-commit")
args.append(self._options.git_commit)
- if self._tool.scm().should_squash(self._options.squash):
- args.append("--squash")
- else:
- args.append("--no-squash")
try:
self._run_script("check-webkit-style", args)
diff --git a/WebKitTools/Scripts/webkitpy/tool/steps/checkstyle_unittest.py b/WebKitTools/Scripts/webkitpy/tool/steps/checkstyle_unittest.py
deleted file mode 100644
index a23ea1b..0000000
--- a/WebKitTools/Scripts/webkitpy/tool/steps/checkstyle_unittest.py
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright (C) 2009 Google Inc. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import unittest
-
-from webkitpy.common.system.executive import ScriptError
-from webkitpy.thirdparty.mock import Mock
-from webkitpy.tool.mocktool import MockTool
-from webkitpy.tool.steps.checkstyle import CheckStyle
-
-
-class CheckStyleTest(unittest.TestCase):
- def test_should_squash_error(self):
- """should_squash can throw an error. That error should not be eaten by CheckStyle."""
- def should_squash(squash):
- raise ScriptError(message="Dummy error")
-
- tool = MockTool()
- tool._scm.should_squash = should_squash
- step = CheckStyle(tool, Mock())
- self.assertRaises(ScriptError, step.run, [])
diff --git a/WebKitTools/Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py b/WebKitTools/Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py
index 4e7f9e6..0a56564 100644
--- a/WebKitTools/Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/tool/steps/closebugforlanddiff_unittest.py
@@ -29,13 +29,12 @@
import unittest
from webkitpy.common.system.outputcapture import OutputCapture
-from webkitpy.thirdparty.mock import Mock
-from webkitpy.tool.mocktool import MockTool
+from webkitpy.tool.mocktool import MockOptions, MockTool
from webkitpy.tool.steps.closebugforlanddiff import CloseBugForLandDiff
class CloseBugForLandDiffTest(unittest.TestCase):
def test_empty_state(self):
capture = OutputCapture()
- step = CloseBugForLandDiff(MockTool(), Mock())
+ step = CloseBugForLandDiff(MockTool(), MockOptions())
expected_stderr = "Committed r49824: <http://trac.webkit.org/changeset/49824>\nNo bug id provided.\n"
capture.assert_outputs(self, step.run, [{"commit_text" : "Mock commit text"}], expected_stderr=expected_stderr)
diff --git a/WebKitTools/Scripts/webkitpy/tool/steps/commit.py b/WebKitTools/Scripts/webkitpy/tool/steps/commit.py
index 7bf8b8a..9f93120 100644
--- a/WebKitTools/Scripts/webkitpy/tool/steps/commit.py
+++ b/WebKitTools/Scripts/webkitpy/tool/steps/commit.py
@@ -26,6 +26,9 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+from webkitpy.common.checkout.scm import AuthenticationError, AmbiguousCommitError
+from webkitpy.common.system.executive import ScriptError
+from webkitpy.common.system.user import User
from webkitpy.tool.steps.abstractstep import AbstractStep
from webkitpy.tool.steps.options import Options
@@ -35,13 +38,38 @@ class Commit(AbstractStep):
def options(cls):
return AbstractStep.options() + [
Options.git_commit,
- Options.no_squash,
- Options.squash,
]
+ def _commit_warning(self, error):
+ working_directory_message = "" if error.working_directory_is_clean else " and working copy changes"
+ return ('There are %s local commits%s. Everything will be committed as a single commit. '
+ 'To avoid this prompt, set "git config webkit-patch.squash true".' % (
+ error.num_local_commits, working_directory_message))
+
def run(self, state):
- commit_message = self._tool.checkout().commit_message_for_this_commit(self._options.git_commit, self._options.squash)
- if len(commit_message.message()) < 50:
+ self._commit_message = self._tool.checkout().commit_message_for_this_commit(self._options.git_commit).message()
+ if len(self._commit_message) < 50:
raise Exception("Attempted to commit with a commit message shorter than 50 characters. Either your patch is missing a ChangeLog or webkit-patch may have a bug.")
- state["commit_text"] = self._tool.scm().commit_with_message(commit_message.message(),
- git_commit=self._options.git_commit, squash=self._options.squash)
+
+ self._state = state
+
+ username = None
+ force_squash = False
+
+ num_tries = 0
+ while num_tries < 3:
+ num_tries += 1
+
+ try:
+ self._state["commit_text"] = self._tool.scm().commit_with_message(self._commit_message, git_commit=self._options.git_commit, username=username, force_squash=force_squash)
+ break;
+ except AmbiguousCommitError, e:
+ if self._tool.user.confirm(self._commit_warning(e)):
+ force_squash = True
+ else:
+ # This will correctly interrupt the rest of the commit process.
+ raise ScriptError(message="Did not commit")
+ except AuthenticationError, e:
+ username = self._tool.user.prompt("%s login: " % e.server_host, repeat=5)
+ if not username:
+ raise ScriptError("You need to specify the username on %s to perform the commit as." % self.svn_server_host)
diff --git a/WebKitTools/Scripts/webkitpy/tool/steps/createbug.py b/WebKitTools/Scripts/webkitpy/tool/steps/createbug.py
index cd043d6..0ab6f68 100644
--- a/WebKitTools/Scripts/webkitpy/tool/steps/createbug.py
+++ b/WebKitTools/Scripts/webkitpy/tool/steps/createbug.py
@@ -36,6 +36,7 @@ class CreateBug(AbstractStep):
return AbstractStep.options() + [
Options.cc,
Options.component,
+ Options.blocks,
]
def run(self, state):
@@ -45,4 +46,7 @@ class CreateBug(AbstractStep):
cc = self._options.cc
if not cc:
cc = state.get("bug_cc")
- state["bug_id"] = self._tool.bugs.create_bug(state["bug_title"], state["bug_description"], blocked=state.get("bug_blocked"), component=self._options.component, cc=cc)
+ blocks = self._options.blocks
+ if not blocks:
+ blocks = state.get("bug_blocked")
+ state["bug_id"] = self._tool.bugs.create_bug(state["bug_title"], state["bug_description"], blocked=blocks, component=self._options.component, cc=cc)
diff --git a/WebKitTools/Scripts/webkitpy/tool/steps/options.py b/WebKitTools/Scripts/webkitpy/tool/steps/options.py
index fa36f73..9c73f5a 100644
--- a/WebKitTools/Scripts/webkitpy/tool/steps/options.py
+++ b/WebKitTools/Scripts/webkitpy/tool/steps/options.py
@@ -29,6 +29,7 @@
from optparse import make_option
class Options(object):
+ blocks = make_option("--blocks", action="store", dest="blocks", default=None, help="Bug number which the created bug blocks.")
build = make_option("--build", action="store_true", dest="build", default=False, help="Build and run run-webkit-tests before committing.")
build_style = make_option("--build-style", action="store", dest="build_style", default=None, help="Whether to build debug, release, or both.")
cc = make_option("--cc", action="store", type="string", dest="cc", help="Comma-separated list of email addresses to carbon-copy.")
@@ -42,11 +43,11 @@ class Options(object):
description = make_option("-m", "--description", action="store", type="string", dest="description", help="Description string for the attachment (default: \"patch\")")
email = make_option("--email", action="store", type="string", dest="email", help="Email address to use in ChangeLogs.")
force_clean = make_option("--force-clean", action="store_true", dest="force_clean", default=False, help="Clean working directory before applying patches (removes local changes and commits)")
-# FIXME: Make commit ranges treat each commit separately instead of squashing them into one.
- git_commit = make_option("--git-commit", action="store", dest="git_commit", help="Local git commit to upload/land. If a range, the commits are squashed into one.")
+ git_commit = make_option("-g", "--git-commit", action="store", dest="git_commit", help="Operate on a local commit. If a range, the commits are squashed into one. HEAD.. operates on working copy changes only.")
local_commit = make_option("--local-commit", action="store_true", dest="local_commit", default=False, help="Make a local commit for each applied patch")
- no_squash = make_option("--no-squash", action="store_false", dest="squash", help="Don't squash local commits into one on upload/land (git-only).")
non_interactive = make_option("--non-interactive", action="store_true", dest="non_interactive", default=False, help="Never prompt the user, fail as fast as possible.")
+ # FIXME: Remove --no-squash, once people have adjusted to using --git-commit.
+ no_squash = make_option("--no-squash", action="store_true", dest="no_squash", default=False, help="Obsolete. Use --git-commit=HEAD.. instead.")
obsolete_patches = make_option("--no-obsolete", action="store_false", dest="obsolete_patches", default=True, help="Do not obsolete old patches before posting this one.")
open_bug = make_option("--open-bug", action="store_true", dest="open_bug", default=False, help="Opens the associated bug in a browser.")
parent_command = make_option("--parent-command", action="store", dest="parent_command", default=None, help="(Internal) The command that spawned this instance.")
@@ -55,6 +56,7 @@ class Options(object):
request_commit = make_option("--request-commit", action="store_true", dest="request_commit", default=False, help="Mark the patch as needing auto-commit after review.")
review = make_option("--no-review", action="store_false", dest="review", default=True, help="Do not mark the patch for review.")
reviewer = make_option("-r", "--reviewer", action="store", type="string", dest="reviewer", help="Update ChangeLogs to say Reviewed by REVIEWER.")
- squash = make_option("-s", "--squash", action="store_true", dest="squash", help="Squash all local commits into one on upload/land (git-only).")
+ # FIXME: Remove --squash, once people have adjusted to using --git-commit.
+ squash = make_option("-s", "--squash", action="store_true", dest="squash", default=False, help="Obsolete. This is now the default behavior.")
test = make_option("--test", action="store_true", dest="test", default=False, help="Run run-webkit-tests before committing.")
update = make_option("--no-update", action="store_false", dest="update", default=True, help="Don't update the working directory.")
diff --git a/WebKitTools/Scripts/webkitpy/tool/steps/preparechangelog.py b/WebKitTools/Scripts/webkitpy/tool/steps/preparechangelog.py
index 7f0c1a8..ce04024 100644
--- a/WebKitTools/Scripts/webkitpy/tool/steps/preparechangelog.py
+++ b/WebKitTools/Scripts/webkitpy/tool/steps/preparechangelog.py
@@ -43,8 +43,6 @@ class PrepareChangeLog(AbstractStep):
Options.quiet,
Options.email,
Options.git_commit,
- Options.no_squash,
- Options.squash,
]
def _ensure_bug_url(self, state):
@@ -69,10 +67,9 @@ class PrepareChangeLog(AbstractStep):
args.append("--bug=%s" % state["bug_id"])
if self._options.email:
args.append("--email=%s" % self._options.email)
- if self._tool.scm().should_squash(self._options.squash):
- args.append("--merge-base=%s" % self._tool.scm().remote_merge_base())
- if self._options.git_commit:
- args.append("--git-commit=%s" % self._options.git_commit)
+
+ if self._tool.scm().supports_local_commits():
+ args.append("--merge-base=%s" % self._tool.scm().merge_base(self._options.git_commit))
try:
self._tool.executive.run_and_throw_if_fail(args, self._options.quiet)
diff --git a/WebKitTools/Scripts/webkitpy/tool/steps/preparechangelog_unittest.py b/WebKitTools/Scripts/webkitpy/tool/steps/preparechangelog_unittest.py
index 1d0db75..eceffdf 100644
--- a/WebKitTools/Scripts/webkitpy/tool/steps/preparechangelog_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/tool/steps/preparechangelog_unittest.py
@@ -31,15 +31,14 @@ import unittest
from webkitpy.common.checkout.changelog_unittest import ChangeLogTest
from webkitpy.common.system.outputcapture import OutputCapture
-from webkitpy.thirdparty.mock import Mock
-from webkitpy.tool.mocktool import MockTool
+from webkitpy.tool.mocktool import MockOptions, MockTool
from webkitpy.tool.steps.preparechangelog import PrepareChangeLog
class PrepareChangeLogTest(ChangeLogTest):
def test_ensure_bug_url(self):
capture = OutputCapture()
- step = PrepareChangeLog(MockTool(), Mock())
+ step = PrepareChangeLog(MockTool(), MockOptions())
changelog_contents = u"%s\n%s" % (self._new_entry_boilerplate, self._example_changelog)
changelog_path = self._write_tmp_file_with_contents(changelog_contents.encode("utf-8"))
state = {
diff --git a/WebKitTools/Scripts/webkitpy/tool/steps/preparechangelogforrevert.py b/WebKitTools/Scripts/webkitpy/tool/steps/preparechangelogforrevert.py
index 4d299fa..0e78bc2 100644
--- a/WebKitTools/Scripts/webkitpy/tool/steps/preparechangelogforrevert.py
+++ b/WebKitTools/Scripts/webkitpy/tool/steps/preparechangelogforrevert.py
@@ -36,7 +36,7 @@ class PrepareChangeLogForRevert(AbstractStep):
def run(self, state):
# This could move to prepare-ChangeLog by adding a --revert= option.
self._run_script("prepare-ChangeLog")
- changelog_paths = self._tool.checkout().modified_changelogs(git_commit=None, squash=False)
+ changelog_paths = self._tool.checkout().modified_changelogs(git_commit=None)
bug_url = self._tool.bugs.bug_url_for_bug_id(state["bug_id"]) if state["bug_id"] else None
for changelog_path in changelog_paths:
# FIXME: Seems we should prepare the message outside of changelogs.py and then just pass in
diff --git a/WebKitTools/Scripts/webkitpy/tool/steps/steps_unittest.py b/WebKitTools/Scripts/webkitpy/tool/steps/steps_unittest.py
index 1fd2bad..766801b 100644
--- a/WebKitTools/Scripts/webkitpy/tool/steps/steps_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/tool/steps/steps_unittest.py
@@ -30,8 +30,7 @@ import unittest
from webkitpy.common.system.outputcapture import OutputCapture
from webkitpy.common.config.ports import WebKitPort
-from webkitpy.thirdparty.mock import Mock
-from webkitpy.tool.mocktool import MockTool
+from webkitpy.tool.mocktool import MockOptions, MockTool
from webkitpy.tool.steps.update import Update
from webkitpy.tool.steps.runtests import RunTests
from webkitpy.tool.steps.promptforbugortitle import PromptForBugOrTitle
@@ -42,13 +41,13 @@ class StepsTest(unittest.TestCase):
if not tool:
tool = MockTool()
if not options:
- options = Mock()
+ options = MockOptions()
if not state:
state = {}
step(tool, options).run(state)
def test_update_step(self):
- options = Mock()
+ options = MockOptions()
options.update = True
expected_stderr = "Updating working directory\n"
OutputCapture().assert_outputs(self, self._run_step, [Update, options], expected_stderr=expected_stderr)
@@ -63,7 +62,7 @@ class StepsTest(unittest.TestCase):
OutputCapture().assert_outputs(self, self._run_step, [RunTests], expected_stderr=expected_stderr)
def test_runtests_leopard_commit_queue_hack(self):
- mock_options = Mock()
+ mock_options = MockOptions()
mock_options.non_interactive = True
step = RunTests(MockTool(log_executive=True), mock_options)
# FIXME: We shouldn't use a real port-object here, but there is too much to mock at the moment.
diff --git a/WebKitTools/Scripts/webkitpy/tool/steps/updatechangelogswithreview_unittest.py b/WebKitTools/Scripts/webkitpy/tool/steps/updatechangelogswithreview_unittest.py
index 0534718..a037422 100644
--- a/WebKitTools/Scripts/webkitpy/tool/steps/updatechangelogswithreview_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/tool/steps/updatechangelogswithreview_unittest.py
@@ -29,18 +29,17 @@
import unittest
from webkitpy.common.system.outputcapture import OutputCapture
-from webkitpy.thirdparty.mock import Mock
-from webkitpy.tool.mocktool import MockTool
+from webkitpy.tool.mocktool import MockOptions, MockTool
from webkitpy.tool.steps.updatechangelogswithreviewer import UpdateChangeLogsWithReviewer
class UpdateChangeLogsWithReviewerTest(unittest.TestCase):
def test_guess_reviewer_from_bug(self):
capture = OutputCapture()
- step = UpdateChangeLogsWithReviewer(MockTool(), Mock())
+ step = UpdateChangeLogsWithReviewer(MockTool(), MockOptions())
expected_stderr = "0 reviewed patches on bug 75, cannot infer reviewer.\n"
capture.assert_outputs(self, step._guess_reviewer_from_bug, [75], expected_stderr=expected_stderr)
def test_empty_state(self):
capture = OutputCapture()
- step = UpdateChangeLogsWithReviewer(MockTool(), Mock())
+ step = UpdateChangeLogsWithReviewer(MockTool(), MockOptions())
capture.assert_outputs(self, step.run, [{}])
diff --git a/WebKitTools/Scripts/webkitpy/tool/steps/updatechangelogswithreviewer.py b/WebKitTools/Scripts/webkitpy/tool/steps/updatechangelogswithreviewer.py
index ef4baa2..e46b790 100644
--- a/WebKitTools/Scripts/webkitpy/tool/steps/updatechangelogswithreviewer.py
+++ b/WebKitTools/Scripts/webkitpy/tool/steps/updatechangelogswithreviewer.py
@@ -40,8 +40,6 @@ class UpdateChangeLogsWithReviewer(AbstractStep):
return AbstractStep.options() + [
Options.git_commit,
Options.reviewer,
- Options.no_squash,
- Options.squash,
]
def _guess_reviewer_from_bug(self, bug_id):
diff --git a/WebKitTools/Scripts/webkitpy/tool/steps/validatereviewer.py b/WebKitTools/Scripts/webkitpy/tool/steps/validatereviewer.py
index 9f4d44e..bdf729e 100644
--- a/WebKitTools/Scripts/webkitpy/tool/steps/validatereviewer.py
+++ b/WebKitTools/Scripts/webkitpy/tool/steps/validatereviewer.py
@@ -41,8 +41,6 @@ class ValidateReviewer(AbstractStep):
def options(cls):
return AbstractStep.options() + [
Options.git_commit,
- Options.no_squash,
- Options.squash,
]
# FIXME: This should probably move onto ChangeLogEntry
diff --git a/WebKitTools/Scripts/webkitpy/tool/steps/validatereviewer_unittest.py b/WebKitTools/Scripts/webkitpy/tool/steps/validatereviewer_unittest.py
index 9105102..d9b856a 100644
--- a/WebKitTools/Scripts/webkitpy/tool/steps/validatereviewer_unittest.py
+++ b/WebKitTools/Scripts/webkitpy/tool/steps/validatereviewer_unittest.py
@@ -30,8 +30,7 @@ import unittest
from webkitpy.common.checkout.changelog import ChangeLogEntry
from webkitpy.common.system.outputcapture import OutputCapture
-from webkitpy.thirdparty.mock import Mock
-from webkitpy.tool.mocktool import MockTool
+from webkitpy.tool.mocktool import MockOptions, MockTool
from webkitpy.tool.steps.validatereviewer import ValidateReviewer
class ValidateReviewerTest(unittest.TestCase):
@@ -48,7 +47,7 @@ class ValidateReviewerTest(unittest.TestCase):
self.assertEqual(step._has_valid_reviewer(entry), expected)
def test_has_valid_reviewer(self):
- step = ValidateReviewer(MockTool(), Mock())
+ step = ValidateReviewer(MockTool(), MockOptions())
self._test_review_text(step, "Reviewed by Eric Seidel.", True)
self._test_review_text(step, "Reviewed by Eric Seidel", True) # Not picky about the '.'
self._test_review_text(step, "Reviewed by Eric.", False)