diff --git a/tools/push-to-trunk/git_recipes.py b/tools/push-to-trunk/git_recipes.py index cabb78a42d..3d2a9ef87d 100644 --- a/tools/push-to-trunk/git_recipes.py +++ b/tools/push-to-trunk/git_recipes.py @@ -244,17 +244,6 @@ class GitRecipesMixin(object): def GitFetchOrigin(self, **kwargs): self.Git("fetch origin", **kwargs) - def GitConvertToSVNRevision(self, git_hash, **kwargs): - result = self.Git(MakeArgs(["rev-list", "-n", "1", git_hash]), **kwargs) - if not result or not SHA1_RE.match(result): - raise GitFailedException("Git hash %s is unknown." % git_hash) - log = self.GitLog(n=1, format="%B", git_hash=git_hash, **kwargs) - for line in reversed(log.splitlines()): - match = ROLL_DEPS_GIT_SVN_ID_RE.match(line.strip()) - if match: - return match.group(1) - raise GitFailedException("Couldn't convert %s to SVN." % git_hash) - @Strip # Copied from bot_update.py and modified for svn-like numbers only. def GetCommitPositionNumber(self, git_hash, **kwargs): diff --git a/tools/push-to-trunk/releases.py b/tools/push-to-trunk/releases.py index 3e34e65f6a..1a5b15ca82 100755 --- a/tools/push-to-trunk/releases.py +++ b/tools/push-to-trunk/releases.py @@ -322,7 +322,7 @@ def ConvertToCommitNumber(step, revision): # Simple check for git hashes. if revision.isdigit() and len(revision) < 8: return revision - return step.GitConvertToSVNRevision( + return step.GetCommitPositionNumber( revision, cwd=os.path.join(step._options.chromium, "v8")) diff --git a/tools/push-to-trunk/test_scripts.py b/tools/push-to-trunk/test_scripts.py index bea8f3caad..f6d0f1a96b 100644 --- a/tools/push-to-trunk/test_scripts.py +++ b/tools/push-to-trunk/test_scripts.py @@ -1320,8 +1320,6 @@ Cr-Commit-Position: refs/heads/candidates@{#345} cwd=chrome_dir), Cmd("git log -1 --format=%B c_hash2", c_hash2_commit_log, cwd=chrome_dir), - Cmd("git rev-list -n 1 0123456789012345678901234567890123456789", - "0123456789012345678901234567890123456789", cwd=chrome_v8_dir), Cmd("git log -1 --format=%B 0123456789012345678901234567890123456789", self.C_V8_22624_LOG, cwd=chrome_v8_dir), Cmd("git diff --name-only c_hash3 c_hash3^", "DEPS", cwd=chrome_dir),