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

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

Issue 223753002: Add merged patches to commit title in merge-to-branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/merge_to_branch.py
diff --git a/tools/push-to-trunk/merge_to_branch.py b/tools/push-to-trunk/merge_to_branch.py
index 87ba02b5b32552a6fec3355f9c91a77c96f30dd4..713768926b39c15df887c989132f3052c4e3ad29 100755
--- a/tools/push-to-trunk/merge_to_branch.py
+++ b/tools/push-to-trunk/merge_to_branch.py
@@ -134,16 +134,8 @@ class FindGitRevisions(Step):
if not self["revision_list"]: # pragma: no cover
self.Die("Revision list is empty.")
- if self._options.revert:
- if not self._options.revert_bleeding_edge:
- self["new_commit_msg"] = ("Rollback of %s in %s branch."
- % (self["revision_list"], self["merge_to_branch"]))
- else:
- self["new_commit_msg"] = "Revert %s." % self["revision_list"]
- else:
- self["new_commit_msg"] = ("Merged %s into %s branch."
- % (self["revision_list"], self["merge_to_branch"]))
- self["new_commit_msg"] += "\n\n"
+ # The commit message title is added below after the version is specified.
+ self["new_commit_msg"] = ""
for commit_hash in self["patch_commit_hashes"]:
patch_merge_desc = self.GitLog(n=1, format="%s", git_hash=commit_hash)
@@ -213,9 +205,17 @@ class CommitLocal(Step):
MESSAGE = "Commit to local branch."
def RunStep(self):
- if not self._options.revert_bleeding_edge:
- self["new_commit_msg"] = "Version %s\n\n%s" % (self["version"],
- self["new_commit_msg"])
+ # Add a commit message title.
+ if self._options.revert:
+ if not self._options.revert_bleeding_edge:
+ title = ("Version %s (rollback of %s)"
+ % (self["version"], self["revision_list"]))
+ else:
+ title = "Revert %s." % self["revision_list"]
+ else:
+ title = ("Version %s (merged %s)"
+ % (self["version"], self["revision_list"]))
+ self["new_commit_msg"] = "%s\n\n%s" % (title, self["new_commit_msg"])
TextToFile(self["new_commit_msg"], self.Config(COMMITMSG_FILE))
self.GitCommit(file_name=self.Config(COMMITMSG_FILE))
« 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