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

Unified Diff: tools/push-to-trunk/push_to_trunk.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 | « no previous file | tools/push-to-trunk/test_scripts.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a8c131f8c37cd2281473d5fe79401208baf38978..9cea6d9bcfb7b6e5fbeea782f2f2277c5fa69811 100755
--- a/tools/push-to-trunk/push_to_trunk.py
+++ b/tools/push-to-trunk/push_to_trunk.py
@@ -287,6 +287,28 @@ class ApplyChanges(Step):
os.remove(self.Config("PATCH_FILE"))
+class CommitSquash(Step):
+ MESSAGE = "Commit to local candidates branch."
+
+ def RunStep(self):
+ # Make a first commit with a slightly different title to not confuse
+ # the tagging.
+ msg = FileToText(self.Config("COMMITMSG_FILE")).splitlines()
+ msg[0] = msg[0].replace("(based on", "(squashed - based on")
+ self.GitCommit(message = "\n".join(msg))
+
+
+class PrepareVersionBranch(Step):
+ MESSAGE = "Prepare new branch to commit version and changelog file."
+
+ def RunStep(self):
+ self.GitCheckout("master")
+ self.Git("fetch")
+ self.GitDeleteBranch(self.Config("TRUNKBRANCH"))
+ self.GitCreateBranch(self.Config("TRUNKBRANCH"),
+ self.vc.RemoteCandidateBranch())
+
+
class AddChangeLog(Step):
MESSAGE = "Add ChangeLog changes to trunk branch."
@@ -312,8 +334,8 @@ class SetVersion(Step):
self.SetVersion(os.path.join(self.default_cwd, VERSION_FILE), "new_")
-class CommitTrunk(Step):
- MESSAGE = "Commit to local trunk branch."
+class CommitCandidate(Step):
+ MESSAGE = "Commit version and changelog to local candidates branch."
def RunStep(self):
self.GitCommit(file_name = self.Config("COMMITMSG_FILE"))
@@ -413,10 +435,13 @@ class PushToTrunk(ScriptsBase):
SquashCommits,
NewBranch,
ApplyChanges,
+ CommitSquash,
+ SanityCheck,
+ Land,
+ PrepareVersionBranch,
AddChangeLog,
SetVersion,
- CommitTrunk,
- SanityCheck,
+ CommitCandidate,
Land,
TagRevision,
CleanUp,
« no previous file with comments | « no previous file | tools/push-to-trunk/test_scripts.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698