Reviewers: jarin,
Message:
PTAL
Description:
Fix automatic version update.
This fixes two things:
1. Guarantee that versions are bumped up also when presubmit errors exists.
Those errors originate from other CLs and should not stop the automatic
versioning.
2. Calculate the last bleeding edge version when pushing to trunk based on
remote branch svn/bleeding_edge and not on local branch master. The master
branch is not kept up-to-date by the script.
BUG=
Please review this at https://codereview.chromium.org/404093002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+11, -6 lines):
M tools/push-to-trunk/bump_up_version.py
M tools/push-to-trunk/git_recipes.py
M tools/push-to-trunk/push_to_trunk.py
M tools/push-to-trunk/test_scripts.py
Index: tools/push-to-trunk/bump_up_version.py
diff --git a/tools/push-to-trunk/bump_up_version.py
b/tools/push-to-trunk/bump_up_version.py
index
31d834fe4a27c6e3b2304d61b2faf1322ff1deaf..af5f73a600d03d461db2f0f4777c8622b87fe340
100755
--- a/tools/push-to-trunk/bump_up_version.py
+++ b/tools/push-to-trunk/bump_up_version.py
@@ -199,7 +199,8 @@ class ChangeVersion(Step):
self.GitCommit("[Auto-roll] Bump up version to %s\n\nTBR=%s" %
(self["new_version"], self._options.author))
self.GitUpload(author=self._options.author,
- force=self._options.force_upload)
+ force=self._options.force_upload,
+ bypass_hooks=True)
self.GitDCommit()
print "Successfully changed the version."
finally:
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
094a5b0abff5acdf0b02bc4a5239c2c6dc03857e..6ffb2da83405d85322471607e126624021d1abbb
100644
--- a/tools/push-to-trunk/git_recipes.py
+++ b/tools/push-to-trunk/git_recipes.py
@@ -147,7 +147,8 @@ class GitRecipesMixin(object):
args.append(Quoted(patch_file))
self.Git(MakeArgs(args))
- def GitUpload(self, reviewer="", author="", force=False, cq=False):
+ def GitUpload(self, reviewer="", author="", force=False, cq=False,
+ bypass_hooks=False):
args = ["cl upload --send-mail"]
if author:
args += ["--email", Quoted(author)]
@@ -157,6 +158,8 @@ class GitRecipesMixin(object):
args.append("-f")
if cq:
args.append("--use-commit-queue")
+ if bypass_hooks:
+ args.append("--bypass-hooks")
# TODO(machenbach): Check output in forced mode. Verify that all
required
# base files were uploaded, if not retry.
self.Git(MakeArgs(args), pipe=False)
Index: tools/push-to-trunk/push_to_trunk.py
diff --git a/tools/push-to-trunk/push_to_trunk.py
b/tools/push-to-trunk/push_to_trunk.py
index
f6dcf2e277f4b10311e7b6681afeb2c25db70d38..c05f7489a2bd201be92511ee111cc3f2029df87d
100755
--- a/tools/push-to-trunk/push_to_trunk.py
+++ b/tools/push-to-trunk/push_to_trunk.py
@@ -130,7 +130,7 @@ class GetCurrentBleedingEdgeVersion(Step):
MESSAGE = "Get latest bleeding edge version."
def RunStep(self):
- self.GitCheckoutFile(self.Config(VERSION_FILE), "master")
+ self.GitCheckoutFile(self.Config(VERSION_FILE), "svn/bleeding_edge")
# Store latest version.
self.ReadAndPersistVersion("latest_")
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
abb2992d0cb47619de164a84fb5919fb5bcb1a17..5f0fa194b8e13802deb74e9be8058a9e70846de2
100644
--- a/tools/push-to-trunk/test_scripts.py
+++ b/tools/push-to-trunk/test_scripts.py
@@ -755,8 +755,8 @@ Performance and stability improvements on all
platforms.""", commit)
Git("log -1 --format=%s hash2",
"Version 3.4.5 (based on bleeding_edge revision r1234)\n"),
Git("svn find-rev r1234", "hash3\n"),
- Git("checkout -f master -- %s" % TEST_CONFIG[VERSION_FILE], "",
- cb=self.WriteFakeVersionFile),
+ Git("checkout -f svn/bleeding_edge -- %s" %
TEST_CONFIG[VERSION_FILE],
+ "", cb=self.WriteFakeVersionFile),
Git("checkout -f hash2 -- %s" % TEST_CONFIG[VERSION_FILE], "",
cb=self.WriteFakeVersionFile),
Git("log --format=%H hash3..push_hash", "rev1\n"),
@@ -1312,7 +1312,8 @@ LOG=N
cb=ResetVersion(11, 4)),
Git("commit -am \"[Auto-roll] Bump up version to 3.11.6.0\n\n"
"[email protected]\"", ""),
- Git("cl upload --send-mail --email \"[email protected]\" -f", ""),
+ Git("cl upload --send-mail --email \"[email protected]\" -f "
+ "--bypass-hooks", ""),
Git("cl dcommit -f --bypass-hooks", ""),
Git("checkout -f bleeding_edge", ""),
Git("branch", "auto-bump-up-version\n* bleeding_edge"),
--
--
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.