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}
This commit is contained in:
Michael Achenbach 2014-11-14 09:38:57 +01:00
parent 1503d0e78c
commit dcfb8628cf
3 changed files with 1 additions and 14 deletions

View File

@ -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):

View File

@ -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"))

View File

@ -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),