Revision: 20482
Author: [email protected]
Date: Thu Apr 3 12:57:33 2014 UTC
Log: 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=
[email protected]
Review URL: https://codereview.chromium.org/223753002
http://code.google.com/p/v8/source/detail?r=20482
Modified:
/branches/bleeding_edge/tools/push-to-trunk/merge_to_branch.py
/branches/bleeding_edge/tools/push-to-trunk/test_scripts.py
=======================================
--- /branches/bleeding_edge/tools/push-to-trunk/merge_to_branch.py Thu Apr
3 09:42:18 2014 UTC
+++ /branches/bleeding_edge/tools/push-to-trunk/merge_to_branch.py Thu Apr
3 12:57:33 2014 UTC
@@ -134,16 +134,8 @@
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 @@
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))
=======================================
--- /branches/bleeding_edge/tools/push-to-trunk/test_scripts.py Thu Apr 3
09:42:18 2014 UTC
+++ /branches/bleeding_edge/tools/push-to-trunk/test_scripts.py Thu Apr 3
12:57:33 2014 UTC
@@ -985,9 +985,7 @@
return lambda: self.assertEquals(patch,
FileToText(TEST_CONFIG[TEMPORARY_PATCH_FILE]))
- msg = """Version 3.22.5.1
-
-Merged r12345, r23456, r34567, r45678, r56789 into trunk branch.
+ msg = """Version 3.22.5.1 (merged r12345, r23456, r34567, r45678,
r56789)
Title4
--
--
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.