Commit dcfb8628 authored by Michael Achenbach's avatar Michael Achenbach

Fix releases script after git migration.

BUG=chromium:410721
LOG=n
TBR=tandrii@chromium.org
TEST=script_test.py

Review URL: https://codereview.chromium.org/725073002

Cr-Commit-Position: refs/heads/master@{#25349}
parent 1503d0e7
...@@ -244,17 +244,6 @@ class GitRecipesMixin(object): ...@@ -244,17 +244,6 @@ class GitRecipesMixin(object):
def GitFetchOrigin(self, **kwargs): def GitFetchOrigin(self, **kwargs):
self.Git("fetch origin", **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 @Strip
# Copied from bot_update.py and modified for svn-like numbers only. # Copied from bot_update.py and modified for svn-like numbers only.
def GetCommitPositionNumber(self, git_hash, **kwargs): def GetCommitPositionNumber(self, git_hash, **kwargs):
......
...@@ -322,7 +322,7 @@ def ConvertToCommitNumber(step, revision): ...@@ -322,7 +322,7 @@ def ConvertToCommitNumber(step, revision):
# Simple check for git hashes. # Simple check for git hashes.
if revision.isdigit() and len(revision) < 8: if revision.isdigit() and len(revision) < 8:
return revision return revision
return step.GitConvertToSVNRevision( return step.GetCommitPositionNumber(
revision, cwd=os.path.join(step._options.chromium, "v8")) revision, cwd=os.path.join(step._options.chromium, "v8"))
......
...@@ -1320,8 +1320,6 @@ Cr-Commit-Position: refs/heads/candidates@{#345} ...@@ -1320,8 +1320,6 @@ Cr-Commit-Position: refs/heads/candidates@{#345}
cwd=chrome_dir), cwd=chrome_dir),
Cmd("git log -1 --format=%B c_hash2", c_hash2_commit_log, Cmd("git log -1 --format=%B c_hash2", c_hash2_commit_log,
cwd=chrome_dir), cwd=chrome_dir),
Cmd("git rev-list -n 1 0123456789012345678901234567890123456789",
"0123456789012345678901234567890123456789", cwd=chrome_v8_dir),
Cmd("git log -1 --format=%B 0123456789012345678901234567890123456789", Cmd("git log -1 --format=%B 0123456789012345678901234567890123456789",
self.C_V8_22624_LOG, cwd=chrome_v8_dir), self.C_V8_22624_LOG, cwd=chrome_v8_dir),
Cmd("git diff --name-only c_hash3 c_hash3^", "DEPS", cwd=chrome_dir), Cmd("git diff --name-only c_hash3 c_hash3^", "DEPS", cwd=chrome_dir),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment