Diff
Modified: trunk/Tools/ChangeLog (148179 => 148180)
--- trunk/Tools/ChangeLog 2013-04-11 07:20:28 UTC (rev 148179)
+++ trunk/Tools/ChangeLog 2013-04-11 07:40:29 UTC (rev 148180)
@@ -1,3 +1,37 @@
+2013-04-11 Ryosuke Niwa <[email protected]>
+
+ Remove webkitpy code to roll Chromium DEPS
+ https://bugs.webkit.org/show_bug.cgi?id=114415
+
+ Reviewed by Benjamin Poulain.
+
+ Removed the code to roll Chromium DEPS in WebKit.
+
+ * Scripts/webkitpy/common/checkout/checkout.py:
+ (Checkout.bug_id_for_this_commit):
+ * Scripts/webkitpy/common/checkout/checkout_mock.py:
+ (MockCheckout.commit_message_for_this_commit):
+ * Scripts/webkitpy/common/checkout/checkout_unittest.py:
+ (CheckoutTest.test_suggested_reviewers):
+ * Scripts/webkitpy/common/checkout/deps.py: Removed.
+ * Scripts/webkitpy/common/checkout/deps_mock.py: Removed.
+ * Scripts/webkitpy/tool/bot/irc_command.py:
+ (RollChromiumDEPS): Teach webkitbot a sense of humor.
+ (RollChromiumDEPS.execute):
+ * Scripts/webkitpy/tool/bot/irc_command_unittest.py:
+ (IRCCommandTest.test_create_bug):
+ * Scripts/webkitpy/tool/bot/ircbot_unittest.py:
+ (IRCBotTest.test_revert):
+ * Scripts/webkitpy/tool/bot/sheriff.py:
+ (Sheriff.post_rollout_patch):
+ * Scripts/webkitpy/tool/commands/__init__.py:
+ * Scripts/webkitpy/tool/commands/roll.py: Removed.
+ * Scripts/webkitpy/tool/commands/roll_unittest.py: Removed.
+ * Scripts/webkitpy/tool/steps/__init__.py:
+ * Scripts/webkitpy/tool/steps/preparechangelogfordepsroll.py: Removed.
+ * Scripts/webkitpy/tool/steps/updatechromiumdeps.py: Removed.
+ * Scripts/webkitpy/tool/steps/updatechromiumdeps_unittest.py: Removed.
+
2013-04-11 Glenn Adams <[email protected]>
[webkitpy] SVNTest fails four tests when using subversion client 1.7 or later
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py (148179 => 148180)
--- trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py 2013-04-11 07:20:28 UTC (rev 148179)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/checkout.py 2013-04-11 07:40:29 UTC (rev 148180)
@@ -32,7 +32,6 @@
from webkitpy.common.checkout.changelog import ChangeLog, parse_bug_id_from_changelog
from webkitpy.common.checkout.commitinfo import CommitInfo
from webkitpy.common.checkout.scm import CommitMessage
-from webkitpy.common.checkout.deps import DEPS
from webkitpy.common.memoized import memoized
from webkitpy.common.system.executive import ScriptError
@@ -146,9 +145,6 @@
except ScriptError, e:
pass # We might not have ChangeLogs.
- def chromium_deps(self):
- return DEPS(self._scm.absolute_path(self._filesystem.join("Source", "WebKit", "chromium", "DEPS")))
-
def apply_patch(self, patch):
# It's possible that the patch was not made from the root directory.
# We should detect and handle that case.
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/checkout_mock.py (148179 => 148180)
--- trunk/Tools/Scripts/webkitpy/common/checkout/checkout_mock.py 2013-04-11 07:20:28 UTC (rev 148179)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/checkout_mock.py 2013-04-11 07:40:29 UTC (rev 148180)
@@ -26,7 +26,6 @@
# (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 .deps_mock import MockDEPS
from .commitinfo import CommitInfo
# FIXME: These imports are wrong, we should use a shared MockCommittersList.
@@ -103,9 +102,6 @@
def commit_message_for_this_commit(self, git_commit, changed_files=None):
return MockCommitMessage()
- def chromium_deps(self):
- return MockDEPS()
-
def apply_patch(self, patch):
pass
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py (148179 => 148180)
--- trunk/Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py 2013-04-11 07:20:28 UTC (rev 148179)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/checkout_unittest.py 2013-04-11 07:40:29 UTC (rev 148180)
@@ -247,11 +247,6 @@
reviewer_names = [reviewer.full_name for reviewer in reviewers]
self.assertEqual(reviewer_names, [u'Tor Arne Vestb\xf8'])
- def test_chromium_deps(self):
- checkout = self._make_checkout()
- checkout._scm.checkout_root = "/foo/bar"
- self.assertEqual(checkout.chromium_deps()._path, '/foo/bar/Source/WebKit/chromium/DEPS')
-
def test_apply_patch(self):
checkout = self._make_checkout()
checkout._executive = MockExecutive(should_log=True)
Deleted: trunk/Tools/Scripts/webkitpy/common/checkout/deps.py (148179 => 148180)
--- trunk/Tools/Scripts/webkitpy/common/checkout/deps.py 2013-04-11 07:20:28 UTC (rev 148179)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/deps.py 2013-04-11 07:40:29 UTC (rev 148180)
@@ -1,61 +0,0 @@
-# Copyright (C) 2011, 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.
-#
-# WebKit's Python module for parsing and modifying ChangeLog files
-
-import codecs
-import fileinput
-import re
-import textwrap
-
-
-class DEPS(object):
-
- _variable_regexp = r"\s+'%s':\s+'(?P<value>\d+)'"
-
- def __init__(self, path):
- # FIXME: This should take a FileSystem object.
- self._path = path
-
- def read_variable(self, name):
- pattern = re.compile(self._variable_regexp % name)
- for line in fileinput.FileInput(self._path):
- match = pattern.match(line)
- if match:
- return int(match.group("value"))
-
- def write_variable(self, name, value):
- pattern = re.compile(self._variable_regexp % name)
- replacement_line = " '%s': '%s'" % (name, value)
- # inplace=1 creates a backup file and re-directs stdout to the file
- for line in fileinput.FileInput(self._path, inplace=1):
- if pattern.match(line):
- print replacement_line
- continue
- # Trailing comma suppresses printing newline
- print line,
Deleted: trunk/Tools/Scripts/webkitpy/common/checkout/deps_mock.py (148179 => 148180)
--- trunk/Tools/Scripts/webkitpy/common/checkout/deps_mock.py 2013-04-11 07:20:28 UTC (rev 148179)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/deps_mock.py 2013-04-11 07:40:29 UTC (rev 148180)
@@ -1,39 +0,0 @@
-# Copyright (C) 2011 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 logging
-
-_log = logging.getLogger(__name__)
-
-
-class MockDEPS(object):
- def read_variable(self, name):
- return 6564
-
- def write_variable(self, name, value):
- _log.info("MOCK: MockDEPS.write_variable(%s, %s)" % (name, value))
Modified: trunk/Tools/Scripts/webkitpy/tool/bot/irc_command.py (148179 => 148180)
--- trunk/Tools/Scripts/webkitpy/tool/bot/irc_command.py 2013-04-11 07:20:28 UTC (rev 148179)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/irc_command.py 2013-04-11 07:40:29 UTC (rev 148180)
@@ -130,51 +130,16 @@
class RollChromiumDEPS(IRCCommand):
usage_string = "roll-chromium-deps REVISION"
- help_string = "Rolls WebKit's Chromium DEPS to the given revision. Give LKGR as the revision number to use the last known good revision. This lands an unreviewed patch and provides the bug URL."
+ help_string = "Rolls WebKit's Chromium DEPS to the given revision???"
- def _parse_args(self, args):
- if not args:
- return None
- revision = args[0].lstrip("r")
- if revision == "LKGR" or revision.isdigit():
- return revision
- return None
-
- def _expand_irc_nickname(self, nick):
- contributor = CommitterList().contributor_by_irc_nickname(nick)
- if contributor:
- return str(contributor)
- return nick
-
def execute(self, nick, args, tool, sheriff):
revision = self._parse_args(args)
if not revision:
return self.usage(nick)
- roll_target = "r%s" % revision if revision.isdigit() else "last-known good revision"
- tool.irc().post("%s: Rolling Chromium DEPS to %s" % (nick, roll_target))
- changelog_message = "Unreviewed. Rolled Chromium DEPS to %s. Requested by %s via %s.\n\n" % (roll_target, self._expand_irc_nickname(nick), sheriff.name())
+ tool.irc().post("%s: Thank You." % nick)
- try:
- bug_id = sheriff.post_chromium_deps_roll(revision, roll_target, changelog_message)
- bug_url = tool.bugs.bug_url_for_bug_id(bug_id)
- return "%s: Created DEPS roll: %s" % (nick, bug_url)
- except ScriptError, e:
- tool.irc().post("%s: Failed to create DEPS roll:" % nick)
- pre_bug_error_messages = [
- r"Current Chromium DEPS revision \d+ is newer than \d+\.",
- r"Unable to update Chromium DEPS\.",
- r"Unable to parse LKGR from: .*",
- r"Unable to reach LKGR source: .*",
- r"Invalid revision number\.",
- ]
- for message in pre_bug_error_messages:
- match = re.search(message, e.output)
- if match:
- return "%s: %s" % (nick, match.group(0))
- _post_error_and_check_for_bug_url(tool, nick, e)
-
class Rollout(IRCCommand):
usage_string = "rollout SVN_REVISION [SVN_REVISIONS] REASON"
help_string = "Opens a rollout bug, CCing author + reviewer, and attaching the reverse-diff of the given revisions marked as commit-queue=?."
Modified: trunk/Tools/Scripts/webkitpy/tool/bot/irc_command_unittest.py (148179 => 148180)
--- trunk/Tools/Scripts/webkitpy/tool/bot/irc_command_unittest.py 2013-04-11 07:20:28 UTC (rev 148179)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/irc_command_unittest.py 2013-04-11 07:40:29 UTC (rev 148180)
@@ -103,16 +103,6 @@
self.assertEqual("tom: Failed to create bug:\nException from bugzilla!",
create_bug.execute("tom", example_args, tool, None))
- def test_roll_chromium_deps(self):
- roll = RollChromiumDEPS()
- self.assertIsNone(roll._parse_args([]))
- self.assertIsNone(roll._parse_args(["invalid"]))
- self.assertEqual("1234", roll._parse_args(["1234"]))
- self.assertEqual("1234", roll._parse_args(["r1234"]))
- self.assertEqual("LKGR", roll._parse_args(["LKGR"]))
- self.assertEqual('"Alan Cutter" <[email protected]>', roll._expand_irc_nickname("alancutter"))
- self.assertEqual("unknown_irc_nickname", roll._expand_irc_nickname("unknown_irc_nickname"))
-
def test_rollout_updates_working_copy(self):
rollout = Rollout()
tool = MockTool()
Modified: trunk/Tools/Scripts/webkitpy/tool/bot/ircbot_unittest.py (148179 => 148180)
--- trunk/Tools/Scripts/webkitpy/tool/bot/ircbot_unittest.py 2013-04-11 07:20:28 UTC (rev 148179)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/ircbot_unittest.py 2013-04-11 07:40:29 UTC (rev 148180)
@@ -106,14 +106,6 @@
expected_logs = "MOCK: irc.post: mock_nick: Preparing rollout for http://trac.webkit.org/changeset/21654 ...\nMOCK: irc.post: mock_nick, abarth, darin, eseidel: Created rollout: http://example.com/36936\n"
OutputCapture().assert_outputs(self, run, args=["revert 21654 This patch broke the world"], expected_logs=expected_logs)
- def test_roll_chromium_deps(self):
- expected_logs = "MOCK: irc.post: mock_nick: Rolling Chromium DEPS to r21654\nMOCK: irc.post: mock_nick: Created DEPS roll: http://example.com/36936\n"
- OutputCapture().assert_outputs(self, run, args=["roll-chromium-deps 21654"], expected_logs=expected_logs)
-
- def test_roll_chromium_deps_to_lkgr(self):
- expected_logs = "MOCK: irc.post: mock_nick: Rolling Chromium DEPS to last-known good revision\nMOCK: irc.post: mock_nick: Created DEPS roll: http://example.com/36936\n"
- OutputCapture().assert_outputs(self, run, args=["roll-chromium-deps LKGR"], expected_logs=expected_logs)
-
def test_multi_rollout(self):
expected_logs = "MOCK: irc.post: mock_nick: Preparing rollout for http://trac.webkit.org/changeset/21654, http://trac.webkit.org/changeset/21655, and http://trac.webkit.org/changeset/21656 ...\nMOCK: irc.post: mock_nick, abarth, darin, eseidel: Created rollout: http://example.com/36936\n"
OutputCapture().assert_outputs(self, run, args=["rollout 21654 21655 21656 This 21654 patch broke the world"], expected_logs=expected_logs)
Modified: trunk/Tools/Scripts/webkitpy/tool/bot/sheriff.py (148179 => 148180)
--- trunk/Tools/Scripts/webkitpy/tool/bot/sheriff.py 2013-04-11 07:20:28 UTC (rev 148179)
+++ trunk/Tools/Scripts/webkitpy/tool/bot/sheriff.py 2013-04-11 07:40:29 UTC (rev 148180)
@@ -91,18 +91,6 @@
])
return urls.parse_bug_id(output)
- def post_chromium_deps_roll(self, revision, revision_name, changelog_message):
- args = [
- "post-chromium-deps-roll",
- "--force-clean",
- "--non-interactive",
- "--parent-command=sheriff-bot",
- ]
- # revision can be None, but revision_name is always something meaningful.
- args += [revision, revision_name, changelog_message]
- output = self._sheriffbot.run_webkit_patch(args)
- return urls.parse_bug_id(output)
-
def post_blame_comment_on_bug(self, commit_info, builders, tests):
if not commit_info.bug_id():
return
Modified: trunk/Tools/Scripts/webkitpy/tool/commands/__init__.py (148179 => 148180)
--- trunk/Tools/Scripts/webkitpy/tool/commands/__init__.py 2013-04-11 07:20:28 UTC (rev 148179)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/__init__.py 2013-04-11 07:40:29 UTC (rev 148180)
@@ -18,7 +18,6 @@
from webkitpy.tool.commands.queues import *
from webkitpy.tool.commands.rebaseline import Rebaseline
from webkitpy.tool.commands.rebaselineserver import RebaselineServer
-from webkitpy.tool.commands.roll import *
from webkitpy.tool.commands.sheriffbot import *
from webkitpy.tool.commands.upload import *
from webkitpy.tool.commands.suggestnominations import *
Deleted: trunk/Tools/Scripts/webkitpy/tool/commands/roll.py (148179 => 148180)
--- trunk/Tools/Scripts/webkitpy/tool/commands/roll.py 2013-04-11 07:20:28 UTC (rev 148179)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/roll.py 2013-04-11 07:40:29 UTC (rev 148180)
@@ -1,79 +0,0 @@
-# Copyright (c) 2011 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.
-
-from webkitpy.tool.commands.abstractsequencedcommand import AbstractSequencedCommand
-
-from webkitpy.tool import steps
-
-
-default_changelog_message = "Unreviewed. Rolled DEPS.\n\n"
-
-class RollChromiumDEPS(AbstractSequencedCommand):
- name = "roll-chromium-deps"
- help_text = "Updates Chromium DEPS (LKGR as the revision will use the last-known good revision of Chromium)"
- argument_names = "CHROMIUM_REVISION"
- steps = [
- steps.UpdateChromiumDEPS,
- steps.PrepareChangeLogForDEPSRoll,
- steps.ConfirmDiff,
- steps.Commit,
- ]
-
- def _prepare_state(self, options, args, tool):
- return {
- "chromium_revision": (args and args[0]),
- "changelog_message": default_changelog_message,
- }
-
-
-class PostChromiumDEPSRoll(AbstractSequencedCommand):
- name = "post-chromium-deps-roll"
- help_text = "Posts a patch to update Chromium DEPS (LKGR as the revision will use the last-known good revision of Chromium)"
- argument_names = "CHROMIUM_REVISION CHROMIUM_REVISION_NAME [CHANGELOG_MESSAGE]"
- steps = [
- steps.CleanWorkingDirectory,
- steps.Update,
- steps.UpdateChromiumDEPS,
- steps.PrepareChangeLogForDEPSRoll,
- steps.CreateBug,
- steps.PostDiff,
- ]
-
- def _prepare_state(self, options, args, tool):
- options.review = False
- options.request_commit = True
-
- chromium_revision = args[0]
- chromium_revision_name = args[1]
- changelog_message = args[2] if len(args) >= 3 else default_changelog_message
- return {
- "chromium_revision": chromium_revision,
- "changelog_message": changelog_message,
- "bug_title": "Roll Chromium DEPS to %s" % chromium_revision_name,
- "bug_description": "A DEPS roll a day keeps the build break away.",
- }
Deleted: trunk/Tools/Scripts/webkitpy/tool/commands/roll_unittest.py (148179 => 148180)
--- trunk/Tools/Scripts/webkitpy/tool/commands/roll_unittest.py 2013-04-11 07:20:28 UTC (rev 148179)
+++ trunk/Tools/Scripts/webkitpy/tool/commands/roll_unittest.py 2013-04-11 07:40:29 UTC (rev 148180)
@@ -1,66 +0,0 @@
-# Copyright (C) 2011 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.
-
-from webkitpy.thirdparty.mock import Mock
-from webkitpy.tool.commands.commandtest import CommandsTest
-from webkitpy.tool.commands.roll import *
-from webkitpy.tool.mocktool import MockOptions, MockTool
-
-
-class RollCommandsTest(CommandsTest):
- def test_update_chromium_deps(self):
- expected_logs = """Updating Chromium DEPS to 6764
-MOCK: MockDEPS.write_variable(chromium_rev, 6764)
-MOCK: user.open_url: file://...
-Was that diff correct?
-Committed r49824: <http://trac.webkit.org/changeset/49824>
-"""
- options = MockOptions(non_interactive=False)
- self.assert_execute_outputs(RollChromiumDEPS(), [6764], options=options, expected_logs=expected_logs)
-
- def test_update_chromium_deps_older_revision(self):
- options = MockOptions(non_interactive=False)
- expected_logs = """Current Chromium DEPS revision 6564 is newer than 5764.
-Unable to update Chromium DEPS.
-"""
- self.assert_execute_outputs(RollChromiumDEPS(), [5764], options=options, expected_logs=expected_logs, expected_exception=SystemExit)
-
-
-class PostRollCommandsTest(CommandsTest):
- def test_prepare_state(self):
- postroll = PostChromiumDEPSRoll()
- options = MockOptions()
- tool = MockTool()
- lkgr_state = postroll._prepare_state(options, [None, "last-known good revision"], tool)
- self.assertIsNone(lkgr_state["chromium_revision"])
- self.assertEqual("Roll Chromium DEPS to last-known good revision", lkgr_state["bug_title"])
- self.assertEqual("Unreviewed. Rolled DEPS.\n\n", lkgr_state["changelog_message"])
- revision_state = postroll._prepare_state(options, ["1234", "r1234", "test message"], tool)
- self.assertEqual("1234", revision_state["chromium_revision"])
- self.assertEqual("Roll Chromium DEPS to r1234", revision_state["bug_title"])
- self.assertEqual("test message", revision_state["changelog_message"])
Modified: trunk/Tools/Scripts/webkitpy/tool/steps/__init__.py (148179 => 148180)
--- trunk/Tools/Scripts/webkitpy/tool/steps/__init__.py 2013-04-11 07:20:28 UTC (rev 148179)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/__init__.py 2013-04-11 07:40:29 UTC (rev 148180)
@@ -52,7 +52,6 @@
from webkitpy.tool.steps.postdiffforcommit import PostDiffForCommit
from webkitpy.tool.steps.postdiffforrevert import PostDiffForRevert
from webkitpy.tool.steps.preparechangelog import PrepareChangeLog
-from webkitpy.tool.steps.preparechangelogfordepsroll import PrepareChangeLogForDEPSRoll
from webkitpy.tool.steps.preparechangelogforrevert import PrepareChangeLogForRevert
from webkitpy.tool.steps.promptforbugortitle import PromptForBugOrTitle
from webkitpy.tool.steps.reopenbugafterrollout import ReopenBugAfterRollout
@@ -61,6 +60,5 @@
from webkitpy.tool.steps.suggestreviewers import SuggestReviewers
from webkitpy.tool.steps.update import Update
from webkitpy.tool.steps.updatechangelogswithreviewer import UpdateChangeLogsWithReviewer
-from webkitpy.tool.steps.updatechromiumdeps import UpdateChromiumDEPS
from webkitpy.tool.steps.validatechangelogs import ValidateChangeLogs
from webkitpy.tool.steps.validatereviewer import ValidateReviewer
Deleted: trunk/Tools/Scripts/webkitpy/tool/steps/preparechangelogfordepsroll.py (148179 => 148180)
--- trunk/Tools/Scripts/webkitpy/tool/steps/preparechangelogfordepsroll.py 2013-04-11 07:20:28 UTC (rev 148179)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/preparechangelogfordepsroll.py 2013-04-11 07:40:29 UTC (rev 148180)
@@ -1,38 +0,0 @@
-# Copyright (C) 2011 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.
-
-from webkitpy.common.checkout.changelog import ChangeLog
-from webkitpy.tool.steps.abstractstep import AbstractStep
-
-
-class PrepareChangeLogForDEPSRoll(AbstractStep):
- def run(self, state):
- self._tool.executive.run_and_throw_if_fail(self._tool.deprecated_port().prepare_changelog_command())
- changelog_paths = self._tool.checkout().modified_changelogs(git_commit=None)
- for changelog_path in changelog_paths:
- ChangeLog(changelog_path).update_with_unreviewed_message(state["changelog_message"])
Deleted: trunk/Tools/Scripts/webkitpy/tool/steps/updatechromiumdeps.py (148179 => 148180)
--- trunk/Tools/Scripts/webkitpy/tool/steps/updatechromiumdeps.py 2013-04-11 07:20:28 UTC (rev 148179)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/updatechromiumdeps.py 2013-04-11 07:40:29 UTC (rev 148180)
@@ -1,100 +0,0 @@
-# Copyright (C) 2011 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 logging
-import sys
-import urllib2
-
-from webkitpy.tool.steps.abstractstep import AbstractStep
-from webkitpy.tool.steps.options import Options
-from webkitpy.common.config import urls
-from webkitpy.common.net.networktransaction import NetworkTimeout
-
-_log = logging.getLogger(__name__)
-
-
-class UpdateChromiumDEPS(AbstractStep):
- @classmethod
- def options(cls):
- return AbstractStep.options() + [
- Options.non_interactive,
- ]
-
- # Notice that this method throws lots of exciting exceptions!
- def _fetch_last_known_good_revision(self):
- return int(self._tool.web.get_binary(urls.chromium_lkgr_url))
-
- @classmethod
- def _parse_revision_number(cls, revision):
- try:
- if isinstance(revision, int):
- return revision
- if isinstance(revision, str):
- return int(revision.lstrip('r'))
- return None
- except ValueError:
- return None
-
- def _validate_revisions(self, current_chromium_revision, new_chromium_revision):
- if new_chromium_revision < current_chromium_revision:
- message = "Current Chromium DEPS revision %s is newer than %s." % (current_chromium_revision, new_chromium_revision)
- if self._options.non_interactive:
- _log.error(message)
- sys.exit(1)
- _log.info(message)
- new_chromium_revision = self._tool.user.prompt("Enter new chromium revision (enter nothing to cancel):\n")
- try:
- new_chromium_revision = int(new_chromium_revision)
- except ValueError, TypeError:
- new_chromium_revision = None
- if not new_chromium_revision:
- _log.error("Unable to update Chromium DEPS.")
- sys.exit(1)
-
- def run(self, state):
- new_chromium_revision = state["chromium_revision"]
- if new_chromium_revision == "LKGR":
- try:
- new_chromium_revision = self._fetch_last_known_good_revision()
- except ValueError:
- _log.error("Unable to parse LKGR from: ", urls.chromium_lkgr_url)
- sys.exit(1)
- except NetworkTimeout:
- _log.error("Unable to reach LKGR source: ", urls.chromium_lkgr_url)
- sys.exit(1)
- else:
- new_chromium_revision = self._parse_revision_number(new_chromium_revision)
- if not new_chromium_revision:
- _log.error("Invalid revision number.")
- sys.exit(1)
-
- deps = self._tool.checkout().chromium_deps()
- current_chromium_revision = deps.read_variable("chromium_rev")
- self._validate_revisions(current_chromium_revision, new_chromium_revision)
- _log.info("Updating Chromium DEPS to %s" % new_chromium_revision)
- deps.write_variable("chromium_rev", new_chromium_revision)
Deleted: trunk/Tools/Scripts/webkitpy/tool/steps/updatechromiumdeps_unittest.py (148179 => 148180)
--- trunk/Tools/Scripts/webkitpy/tool/steps/updatechromiumdeps_unittest.py 2013-04-11 07:20:28 UTC (rev 148179)
+++ trunk/Tools/Scripts/webkitpy/tool/steps/updatechromiumdeps_unittest.py 2013-04-11 07:40:29 UTC (rev 148180)
@@ -1,39 +0,0 @@
-# Copyright (C) 2013 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 unittest2 as unittest
-
-from webkitpy.tool.steps.updatechromiumdeps import UpdateChromiumDEPS
-
-
-class UpdateChromiumDEPSTest(unittest.TestCase):
- def test_parse_revision_number(self):
- self.assertIsNone(UpdateChromiumDEPS._parse_revision_number(None))
- self.assertIsNone(UpdateChromiumDEPS._parse_revision_number("invalid"))
- self.assertEqual(1234, UpdateChromiumDEPS._parse_revision_number("1234"))
- self.assertEqual(1234, UpdateChromiumDEPS._parse_revision_number("r1234"))