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):
# 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"))
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),