| Index: third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/auto_rebaseline.py
|
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/auto_rebaseline.py b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/auto_rebaseline.py
|
| index 0e553dfbecd160c08eb6680c940ffeffc9992886..1d773f3bf7920c95c9fb1206f4b0058a292b01bc 100644
|
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/auto_rebaseline.py
|
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/auto_rebaseline.py
|
| @@ -62,7 +62,7 @@ class AutoRebaseline(AbstractParallelRebaselineCommand):
|
| [^[]*$ # Prevents matching previous [ for version specifiers instead of expectation specifiers
|
| ''', re.VERBOSE)
|
|
|
| - def bot_revision_data(self, scm):
|
| + def bot_revision_data(self, git):
|
| revisions = []
|
| for builder_name in self._release_builders():
|
| result = self._tool.buildbot.fetch_results(Build(builder_name))
|
| @@ -71,7 +71,7 @@ class AutoRebaseline(AbstractParallelRebaselineCommand):
|
| return []
|
| revisions.append({
|
| "builder": result.builder_name(),
|
| - "revision": result.chromium_revision(scm),
|
| + "revision": result.chromium_revision(git),
|
| })
|
| return revisions
|
|
|
| @@ -93,7 +93,7 @@ class AutoRebaseline(AbstractParallelRebaselineCommand):
|
| bugs = set()
|
| has_any_needs_rebaseline_lines = False
|
|
|
| - for line in tool.scm().blame(expectations_file_path).split("\n"):
|
| + for line in tool.git().blame(expectations_file_path).split("\n"):
|
| line = self._strip_comments(line)
|
| if "NeedsRebaseline" not in line:
|
| continue
|
| @@ -109,7 +109,7 @@ class AutoRebaseline(AbstractParallelRebaselineCommand):
|
| continue
|
|
|
| commit_hash = parsed_line.group(1)
|
| - commit_position = tool.scm().commit_position_from_git_commit(commit_hash)
|
| + commit_position = tool.git().commit_position_from_git_commit(commit_hash)
|
|
|
| test = parsed_line.group(3)
|
| if print_revisions:
|
| @@ -210,15 +210,15 @@ class AutoRebaseline(AbstractParallelRebaselineCommand):
|
|
|
| def execute(self, options, args, tool):
|
| self._tool = tool
|
| - if tool.scm().executable_name == "svn":
|
| + if tool.git().executable_name == "svn":
|
| _log.error("Auto rebaseline only works with a git checkout.")
|
| return
|
|
|
| - if not options.dry_run and tool.scm().has_working_directory_changes():
|
| + if not options.dry_run and tool.git().has_working_directory_changes():
|
| _log.error("Cannot proceed with working directory changes. Clean working directory first.")
|
| return
|
|
|
| - revision_data = self.bot_revision_data(tool.scm())
|
| + revision_data = self.bot_revision_data(tool.git())
|
| if not revision_data:
|
| return
|
|
|
| @@ -249,12 +249,12 @@ class AutoRebaseline(AbstractParallelRebaselineCommand):
|
| rebaseline_branch_name = self.AUTO_REBASELINE_BRANCH_NAME
|
| try:
|
| # Save the current branch name and check out a clean branch for the patch.
|
| - old_branch_name_or_ref = tool.scm().current_branch_or_ref()
|
| + old_branch_name_or_ref = tool.git().current_branch_or_ref()
|
| if old_branch_name_or_ref == self.AUTO_REBASELINE_BRANCH_NAME:
|
| rebaseline_branch_name = self.AUTO_REBASELINE_ALT_BRANCH_NAME
|
| if not options.dry_run:
|
| - tool.scm().delete_branch(rebaseline_branch_name)
|
| - tool.scm().create_clean_branch(rebaseline_branch_name)
|
| + tool.git().delete_branch(rebaseline_branch_name)
|
| + tool.git().create_clean_branch(rebaseline_branch_name)
|
| did_switch_branches = True
|
|
|
| if test_prefix_list:
|
| @@ -263,7 +263,7 @@ class AutoRebaseline(AbstractParallelRebaselineCommand):
|
| if options.dry_run:
|
| return
|
|
|
| - tool.scm().commit_locally_with_message(
|
| + tool.git().commit_locally_with_message(
|
| self.commit_message(author, revision, commit, bugs))
|
|
|
| # FIXME: It would be nice if we could dcommit the patch without uploading, but still
|
| @@ -291,7 +291,7 @@ class AutoRebaseline(AbstractParallelRebaselineCommand):
|
| if not issue_already_closed:
|
| self._run_git_cl_command(options, ['set_close'])
|
|
|
| - tool.scm().ensure_cleanly_tracking_remote_master()
|
| + tool.git().ensure_cleanly_tracking_remote_master()
|
| if old_branch_name_or_ref:
|
| - tool.scm().checkout_branch(old_branch_name_or_ref)
|
| - tool.scm().delete_branch(rebaseline_branch_name)
|
| + tool.git().checkout_branch(old_branch_name_or_ref)
|
| + tool.git().delete_branch(rebaseline_branch_name)
|
|
|