Reviewers: tandrii,
Message:
PTAL. Somehow forgot this corner.
Description:
Fix releases script after git migration.
BUG=chromium:410721
LOG=n
[email protected]
TEST=script_test.py
Please review this at https://codereview.chromium.org/725073002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+1, -14 lines):
M tools/push-to-trunk/git_recipes.py
M tools/push-to-trunk/releases.py
M tools/push-to-trunk/test_scripts.py
Index: tools/push-to-trunk/git_recipes.py
diff --git a/tools/push-to-trunk/git_recipes.py
b/tools/push-to-trunk/git_recipes.py
index
cabb78a42d54dee69254a5fc729065c545694edf..3d2a9ef87d7fd14400ec6c96c3ef18bbcbb4b64b
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):
Index: tools/push-to-trunk/releases.py
diff --git a/tools/push-to-trunk/releases.py
b/tools/push-to-trunk/releases.py
index
3e34e65f6a6d43dad24658a1a46fca3959ad6ccd..1a5b15ca82663ccba873c10a15f9faeddf2f8339
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"))
Index: tools/push-to-trunk/test_scripts.py
diff --git a/tools/push-to-trunk/test_scripts.py
b/tools/push-to-trunk/test_scripts.py
index
bea8f3caadcb0902da5936e64b34da22ad98e4eb..f6d0f1a96bebb5c3e4353d9c5f90df0c12aba9d4
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),
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.