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

Side by Side Diff: tools/push-to-trunk/merge_to_branch.py

Issue 223463003: Fix bug entry and quotation marks in merge-to-branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase + review Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/push-to-trunk/git_recipes.py ('k') | tools/push-to-trunk/test_scripts.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 the V8 project authors. All rights reserved. 2 # Copyright 2014 the V8 project authors. All rights reserved.
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following 10 # copyright notice, this list of conditions and the following
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 for commit_hash in self["patch_commit_hashes"]: 140 for commit_hash in self["patch_commit_hashes"]:
141 patch_merge_desc = self.GitLog(n=1, format="%s", git_hash=commit_hash) 141 patch_merge_desc = self.GitLog(n=1, format="%s", git_hash=commit_hash)
142 self["new_commit_msg"] += "%s\n\n" % patch_merge_desc 142 self["new_commit_msg"] += "%s\n\n" % patch_merge_desc
143 143
144 bugs = [] 144 bugs = []
145 for commit_hash in self["patch_commit_hashes"]: 145 for commit_hash in self["patch_commit_hashes"]:
146 msg = self.GitLog(n=1, git_hash=commit_hash) 146 msg = self.GitLog(n=1, git_hash=commit_hash)
147 for bug in re.findall(r"^[ \t]*BUG[ \t]*=[ \t]*(.*?)[ \t]*$", msg, 147 for bug in re.findall(r"^[ \t]*BUG[ \t]*=[ \t]*(.*?)[ \t]*$", msg,
148 re.M): 148 re.M):
149 bugs.extend(map(lambda s: s.strip(), bug.split(","))) 149 bugs.extend(map(lambda s: s.strip(), bug.split(",")))
150 bug_aggregate = ",".join(sorted(bugs)) 150 bug_aggregate = ",".join(sorted(filter(lambda s: s and s != "none", bugs)))
151 if bug_aggregate: 151 if bug_aggregate:
152 self["new_commit_msg"] += "BUG=%s\nLOG=N\n" % bug_aggregate 152 self["new_commit_msg"] += "BUG=%s\nLOG=N\n" % bug_aggregate
153 153
154 154
155 class ApplyPatches(Step): 155 class ApplyPatches(Step):
156 MESSAGE = "Apply patches for selected revisions." 156 MESSAGE = "Apply patches for selected revisions."
157 157
158 def RunStep(self): 158 def RunStep(self):
159 for commit_hash in self["patch_commit_hashes"]: 159 for commit_hash in self["patch_commit_hashes"]:
160 print("Applying patch for %s to %s..." 160 print("Applying patch for %s to %s..."
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 UploadStep, 325 UploadStep,
326 CommitRepository, 326 CommitRepository,
327 PrepareSVN, 327 PrepareSVN,
328 TagRevision, 328 TagRevision,
329 CleanUp, 329 CleanUp,
330 ] 330 ]
331 331
332 332
333 if __name__ == "__main__": # pragma: no cover 333 if __name__ == "__main__": # pragma: no cover
334 sys.exit(MergeToBranch(CONFIG).Run()) 334 sys.exit(MergeToBranch(CONFIG).Run())
OLDNEW
« no previous file with comments | « tools/push-to-trunk/git_recipes.py ('k') | tools/push-to-trunk/test_scripts.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698