Reviewers: jarin,
Message:
PTAL
Description:
Fix bug entry and quotation marks in merge-to-branch.
This fixes usage of quotation marks inside titles of merged patches.
This also fixes aggregation of empty or "none" BUG entries.
BUG=
Please review this at https://codereview.chromium.org/223463003/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+8, -7 lines):
M tools/push-to-trunk/git_recipes.py
M tools/push-to-trunk/merge_to_branch.py
M tools/push-to-trunk/test_scripts.py
Index: tools/push-to-trunk/git_recipes.py
diff --git a/tools/push-to-trunk/git_recipes.py
b/tools/push-to-trunk/git_recipes.py
index
8e84d4533b230814ac80bf4c66eef03cab40e04c..c0f0afbede5c17ba122ef1c56ab8a0afe81242b3
100644
--- a/tools/push-to-trunk/git_recipes.py
+++ b/tools/push-to-trunk/git_recipes.py
@@ -85,7 +85,7 @@ class GitRecipesMixin(object):
if format:
args.append("--format=%s" % format)
if grep:
- args.append("--grep=\"%s\"" % grep)
+ args.append("--grep=\"%s\"" % grep.replace("\"", "\\\""))
if reverse:
args.append("--reverse")
if git_hash:
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..02df5d8d61544c8d12397f04b11841094a218438
100755
--- a/tools/push-to-trunk/merge_to_branch.py
+++ b/tools/push-to-trunk/merge_to_branch.py
@@ -155,7 +155,7 @@ class FindGitRevisions(Step):
for bug in re.findall(r"^[ \t]*BUG[ \t]*=[ \t]*(.*?)[ \t]*$", msg,
re.M):
bugs.extend(map(lambda s: s.strip(), bug.split(",")))
- bug_aggregate = ",".join(sorted(bugs))
+ bug_aggregate = ",".join(sorted(filter(lambda s: s and s != "none",
bugs)))
if bug_aggregate:
self["new_commit_msg"] += "BUG=%s\nLOG=N\n" % bug_aggregate
Index: tools/push-to-trunk/test_scripts.py
diff --git a/tools/push-to-trunk/test_scripts.py
b/tools/push-to-trunk/test_scripts.py
index
0e70afdc84708034cdf0c75d271e5c99519cf01c..f241c8091b77de9901abca259b55a1dd11886fae
100644
--- a/tools/push-to-trunk/test_scripts.py
+++ b/tools/push-to-trunk/test_scripts.py
@@ -997,7 +997,7 @@ Title3
Title1
-Title5
+Revert "Somthing"
BUG=123,234,345,456,567,v8:123
LOG=N
@@ -1045,12 +1045,12 @@ LOG=N
Git("log -1 --format=%s hash2", "Title2"),
Git("log -1 --format=%s hash3", "Title3"),
Git("log -1 --format=%s hash1", "Title1"),
- Git("log -1 --format=%s hash5", "Title5"),
+ Git("log -1 --format=%s hash5", "Revert \"Somthing\""),
Git("log -1 hash4", "Title4\nBUG=123\nBUG=234"),
Git("log -1 hash2", "Title2\n BUG = v8:123,345"),
Git("log -1 hash3", "Title3\nLOG=n\nBUG=567, 456"),
- Git("log -1 hash1", "Title1"),
- Git("log -1 hash5", "Title5"),
+ Git("log -1 hash1", "Title1\nBUG="),
+ Git("log -1 hash5", "Revert \"Somthing\"\nBUG=none"),
Git("log -1 -p hash4", "patch4"),
Git("apply --index --reject \"%s\"" %
TEST_CONFIG[TEMPORARY_PATCH_FILE],
"", cb=VerifyPatch("patch4")),
@@ -1073,7 +1073,8 @@ LOG=N
Git("cl presubmit", "Presubmit successfull\n"),
Git("cl dcommit -f --bypass-hooks", "Closing issue\n",
cb=VerifySVNCommit),
Git("svn fetch", ""),
- Git("log -1 --format=%%H --grep=\"%s\" svn/trunk" % msg, "hash6"),
+ Git(("log -1 --format=%%H --grep=\"%s\" svn/trunk"
+ % msg.replace("\"", "\\\"")), "hash6"),
Git("svn find-rev hash6", "1324"),
Git(("copy -r 1324 https://v8.googlecode.com/svn/trunk "
"https://v8.googlecode.com/svn/tags/3.22.5.1 -m "
--
--
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.