Add merged patches to commit title in merge-to-branch.

This makes it easier to grep for patches in title in the revision history.

This also removes the redundant information into which branch was merged, as this can be derived from the version number in the title now.

BUG=
R=jarin@chromium.org

Review URL: https://codereview.chromium.org/223753002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20482 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent eedc4c01
...@@ -134,16 +134,8 @@ class FindGitRevisions(Step): ...@@ -134,16 +134,8 @@ class FindGitRevisions(Step):
if not self["revision_list"]: # pragma: no cover if not self["revision_list"]: # pragma: no cover
self.Die("Revision list is empty.") self.Die("Revision list is empty.")
if self._options.revert: # The commit message title is added below after the version is specified.
if not self._options.revert_bleeding_edge: self["new_commit_msg"] = ""
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"
for commit_hash in self["patch_commit_hashes"]: for commit_hash in self["patch_commit_hashes"]:
patch_merge_desc = self.GitLog(n=1, format="%s", git_hash=commit_hash) patch_merge_desc = self.GitLog(n=1, format="%s", git_hash=commit_hash)
...@@ -213,9 +205,17 @@ class CommitLocal(Step): ...@@ -213,9 +205,17 @@ class CommitLocal(Step):
MESSAGE = "Commit to local branch." MESSAGE = "Commit to local branch."
def RunStep(self): def RunStep(self):
# Add a commit message title.
if self._options.revert:
if not self._options.revert_bleeding_edge: if not self._options.revert_bleeding_edge:
self["new_commit_msg"] = "Version %s\n\n%s" % (self["version"], title = ("Version %s (rollback of %s)"
self["new_commit_msg"]) % (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)) TextToFile(self["new_commit_msg"], self.Config(COMMITMSG_FILE))
self.GitCommit(file_name=self.Config(COMMITMSG_FILE)) self.GitCommit(file_name=self.Config(COMMITMSG_FILE))
......
...@@ -985,9 +985,7 @@ deps = { ...@@ -985,9 +985,7 @@ deps = {
return lambda: self.assertEquals(patch, return lambda: self.assertEquals(patch,
FileToText(TEST_CONFIG[TEMPORARY_PATCH_FILE])) FileToText(TEST_CONFIG[TEMPORARY_PATCH_FILE]))
msg = """Version 3.22.5.1 msg = """Version 3.22.5.1 (merged r12345, r23456, r34567, r45678, r56789)
Merged r12345, r23456, r34567, r45678, r56789 into trunk branch.
Title4 Title4
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment