Fix change log generation in push-to-trunk script.

Fixed missing parenthesis in regular expression. The log checker matched on the word "true" and included a wrong change log entry.

TEST=python -m unittest test_scripts.ToplevelTest.testRegressWrongLogEntryOnTrue
R=ulan@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 738c15f6
......@@ -105,7 +105,7 @@ def MakeChangeLogBody(commit_messages, auto_format=False):
title = title.strip()
if auto_format:
# Only add commits that set the LOG flag correctly.
log_exp = r"^[ \t]*LOG[ \t]*=[ \t]*(?:Y(?:ES)?)|TRUE"
log_exp = r"^[ \t]*LOG[ \t]*=[ \t]*(?:(?:Y(?:ES)?)|TRUE)"
if not re.search(log_exp, body, flags=re.I | re.M):
continue
# Never include reverts.
......
......@@ -103,6 +103,17 @@ class ToplevelTest(unittest.TestCase):
" Title text 3 (Chromium issue 1234).\n\n",
MakeChangeLogBody(commits, True))
def testRegressWrongLogEntryOnTrue(self):
body = """
Check elimination: Learn from if(CompareMap(x)) on true branch.
BUG=
R=verwaest@chromium.org
Committed: https://code.google.com/p/v8/source/detail?r=18210
"""
self.assertEquals("", MakeChangeLogBody([["title", body, "author"]], True))
def testMakeChangeLogBugReferenceEmpty(self):
self.assertEquals("", MakeChangeLogBugReference(""))
self.assertEquals("", MakeChangeLogBugReference("LOG="))
......
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