Index: tools/auto_bisect/source_control.py |
diff --git a/tools/auto_bisect/source_control.py b/tools/auto_bisect/source_control.py |
index 718a68101ab0f22b6f48b8dcd3793db5703d7ecf..e1d7dad7014026cf087566e0393641b328cde51d 100644 |
--- a/tools/auto_bisect/source_control.py |
+++ b/tools/auto_bisect/source_control.py |
@@ -4,12 +4,8 @@ |
"""This module contains functions for performing source control operations.""" |
-import os |
- |
import bisect_utils |
-CROS_VERSION_PATTERN = 'new version number from %s' |
- |
def IsInGitRepository(): |
output, _ = bisect_utils.RunGit(['rev-parse', '--is-inside-work-tree']) |
@@ -32,10 +28,6 @@ def SyncToRevisionWithGClient(revision): |
'--delete_unversioned_trees', '--nohooks', '--revision', revision]) |
-def SyncToRevisionWithRepo(timestamp): |
- return bisect_utils.RunRepoSyncAtTimestamp(timestamp) |
- |
- |
def GetRevisionList(end_revision_hash, start_revision_hash, cwd=None): |
"""Retrieves a list of git commit hashes in a range. |
@@ -62,8 +54,6 @@ def SyncToRevision(revision, sync_client=None): |
_, return_code = bisect_utils.RunGit(['checkout', revision]) |
elif sync_client == 'gclient': |
return_code = SyncToRevisionWithGClient(revision) |
- elif sync_client == 'repo': |
- return_code = SyncToRevisionWithRepo(revision) |
else: |
raise NotImplementedError('Unsupported sync_client: "%s"' % sync_client) |
@@ -91,9 +81,6 @@ def ResolveToRevision(revision_to_check, depot, depot_deps_dict, |
if depot == 'android-chrome': |
return revision_to_check |
- if depot == 'cros': |
- return ResolveToRevisionCrOS(revision_to_check, cwd) |
- |
# If the given revision can't be parsed as an integer, then it may already |
# be a git commit hash. |
if not bisect_utils.IsStringInt(revision_to_check): |
@@ -129,31 +116,6 @@ def ResolveToRevision(revision_to_check, depot, depot_deps_dict, |
return git_revision |
-def ResolveToRevisionCrOS(revision_to_check, cwd=None): |
- """Return a git commit hash corresponding to the give version or revision. |
- |
- TODO(qyearsley): Either verify that this works or delete it. |
- """ |
- if bisect_utils.IsStringInt(revision_to_check): |
- return int(revision_to_check) |
- |
- cwd = os.getcwd() |
- os.chdir(os.path.join(os.getcwd(), 'src', 'third_party', |
- 'chromiumos-overlay')) |
- pattern = CROS_VERSION_PATTERN % revision_to_check |
- cmd = ['log', '--format=%ct', '-1', '--grep', pattern] |
- |
- git_revision = None |
- |
- log_output = bisect_utils.CheckRunGit(cmd, cwd=cwd) |
- if log_output: |
- git_revision = log_output |
- git_revision = int(log_output.strip()) |
- os.chdir(cwd) |
- |
- return git_revision |
- |
- |
def IsInProperBranch(): |
"""Checks whether the current branch is "master".""" |
cmd = ['rev-parse', '--abbrev-ref', 'HEAD'] |