Chromium Code Reviews| Index: git_cl.py |
| diff --git a/git_cl.py b/git_cl.py |
| index 6a43b3d051e092173255fb74e14bca2472f3975f..997c940922ebf8cb4fe16233be8a83ea84acbe34 100755 |
| --- a/git_cl.py |
| +++ b/git_cl.py |
| @@ -1552,7 +1552,7 @@ def GerritUpload(options, args, cl): |
| return 0 |
| -def RietveldUpload(options, args, cl): |
| +def RietveldUpload(options, args, cl, change): |
| """upload the patch to rietveld.""" |
| upload_args = ['--assume_yes'] # Don't ask about untracked files. |
| upload_args.extend(['--server', cl.GetRietveldServer()]) |
| @@ -1579,6 +1579,22 @@ def RietveldUpload(options, args, cl): |
| change_desc = ChangeDescription(message) |
| if options.reviewers: |
| change_desc.update_reviewers(options.reviewers) |
| + if options.auto_bots: #dpranke, iannucci |
|
iannucci
2014/06/24 23:23:59
do not want the comment :)
martiniss
2014/06/24 23:55:55
Done.
|
| + masters = presubmit_support.DoGetTryMasters( |
| + change, |
| + change.LocalPaths(), |
| + settings.GetRoot(), |
| + None, |
| + None, |
| + options.verbose, |
| + sys.stdout |
| + ) |
|
iannucci
2014/06/24 23:23:59
paren should wrap up here
martiniss
2014/06/24 23:55:55
Done.
|
| + |
| + if masters: |
| + change_description = change_desc.description + '\n\nCQ_TRYBOTS=' |
|
iannucci
2014/06/24 23:23:59
I think you only want one newline here
martiniss
2014/06/24 23:55:55
Done.
|
| + for master, mapping in masters.iteritems(): |
| + change_description += master + ':' + ','.join(mapping.keys()) + ';' |
|
iannucci
2014/06/24 23:23:59
I think you'll want to do a ';'.join of these line
martiniss
2014/06/24 23:55:55
Done.
|
| + change_desc.set_description(change_description) |
| if not options.force: |
| change_desc.prompt() |
| @@ -1709,6 +1725,8 @@ def CMDupload(parser, args): |
| 'use for CL. Default: master') |
| parser.add_option('--email', default=None, |
| help='email address to use to connect to Rietveld') |
| + parser.add_option('--auto-bots', default=False, action='store_true', |
| + help='Autogenerate which trybots to use for this CL') |
| add_git_similarity(parser) |
| (options, args) = parser.parse_args(args) |
| @@ -1768,7 +1786,7 @@ def CMDupload(parser, args): |
| print_stats(options.similarity, options.find_copies, args) |
| if settings.GetIsGerrit(): |
| return GerritUpload(options, args, cl) |
| - ret = RietveldUpload(options, args, cl) |
| + ret = RietveldUpload(options, args, cl, change) |
| if not ret: |
| git_set_branch_value('last-upload-hash', |
| RunGit(['rev-parse', 'HEAD']).strip()) |