Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(906)

Unified Diff: tools/push-to-trunk/test_scripts.py

Issue 870923003: Push version and changelog as a separate commit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/push-to-trunk/push_to_trunk.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1fde75ec91c4c874bb06944b60908e0978a03555..958c2672c897584ed7dafbee1f69e800d5e006cc 100644
--- a/tools/push-to-trunk/test_scripts.py
+++ b/tools/push-to-trunk/test_scripts.py
@@ -719,6 +719,18 @@ Performance and stability improvements on all platforms."""
os.path.join(TEST_CONFIG["DEFAULT_CWD"], CHANGELOG_FILE))
os.environ["EDITOR"] = "vi"
+ commit_msg_squashed = """Version 3.22.5 (squashed - based on push_hash)
+
+Log text 1 (issue 321).
+
+Performance and stability improvements on all platforms."""
+
+ commit_msg = """Version 3.22.5 (based on push_hash)
+
+Log text 1 (issue 321).
+
+Performance and stability improvements on all platforms."""
+
def ResetChangeLog():
"""On 'git co -b new_branch svn/trunk', and 'git checkout -- ChangeLog',
the ChangLog will be reset to its content on trunk."""
@@ -732,14 +744,9 @@ Performance and stability improvements on all platforms."""
ResetChangeLog()
self.WriteFakeVersionFile()
- def CheckSVNCommit():
+ def CheckVersionCommit():
commit = FileToText(TEST_CONFIG["COMMITMSG_FILE"])
- self.assertEquals(
-"""Version 3.22.5 (based on push_hash)
-
-Log text 1 (issue 321).
-
-Performance and stability improvements on all platforms.""", commit)
+ self.assertEquals(commit_msg, commit)
version = FileToText(
os.path.join(TEST_CONFIG["DEFAULT_CWD"], VERSION_FILE))
self.assertTrue(re.search(r"#define MINOR_VERSION\s+22", version))
@@ -808,16 +815,23 @@ Performance and stability improvements on all platforms.""", commit)
Cmd(("git new-branch %s --upstream origin/candidates" %
TEST_CONFIG["TRUNKBRANCH"]), "", cb=ResetToTrunk),
Cmd("git apply --index --reject \"%s\"" % TEST_CONFIG["PATCH_FILE"], ""),
+ Cmd("git commit -am \"%s\"" % commit_msg_squashed, ""),
+ ]
+ if manual:
+ expectations.append(RL("Y")) # Sanity check.
+ expectations += [
+ Cmd("git cl land -f --bypass-hooks", ""),
+ Cmd("git checkout -f master", ""),
+ Cmd("git fetch", ""),
+ Cmd("git branch -D %s" % TEST_CONFIG["TRUNKBRANCH"], ""),
+ Cmd(("git new-branch %s --upstream origin/candidates" %
+ TEST_CONFIG["TRUNKBRANCH"]), "", cb=ResetToTrunk),
Cmd("git checkout -f origin/candidates -- ChangeLog", "",
cb=ResetChangeLog),
Cmd("git checkout -f origin/candidates -- src/version.cc", "",
cb=self.WriteFakeVersionFile),
Cmd("git commit -aF \"%s\"" % TEST_CONFIG["COMMITMSG_FILE"], "",
- cb=CheckSVNCommit),
- ]
- if manual:
- expectations.append(RL("Y")) # Sanity check.
- expectations += [
+ cb=CheckVersionCommit),
Cmd("git cl land -f --bypass-hooks", ""),
Cmd("git fetch", ""),
Cmd("git log -1 --format=%H --grep="
« no previous file with comments | « tools/push-to-trunk/push_to_trunk.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698