OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # Copyright (C) 2008 Evan Martin <martine@danga.com> | 6 # Copyright (C) 2008 Evan Martin <martine@danga.com> |
7 | 7 |
8 """A git-command for integrating reviews on Rietveld.""" | 8 """A git-command for integrating reviews on Rietveld.""" |
9 | 9 |
10 from distutils.version import LooseVersion | 10 from distutils.version import LooseVersion |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 batch_req_body = {'builds': []} | 260 batch_req_body = {'builds': []} |
261 print_text = [] | 261 print_text = [] |
262 print_text.append('Tried jobs on:') | 262 print_text.append('Tried jobs on:') |
263 for master, builders_and_tests in sorted(masters.iteritems()): | 263 for master, builders_and_tests in sorted(masters.iteritems()): |
264 print_text.append('Master: %s' % master) | 264 print_text.append('Master: %s' % master) |
265 bucket = _prefix_master(master) | 265 bucket = _prefix_master(master) |
266 for builder, tests in sorted(builders_and_tests.iteritems()): | 266 for builder, tests in sorted(builders_and_tests.iteritems()): |
267 print_text.append(' %s: %s' % (builder, tests)) | 267 print_text.append(' %s: %s' % (builder, tests)) |
268 parameters = { | 268 parameters = { |
269 'builder_name': builder, | 269 'builder_name': builder, |
270 'changes': [ | 270 'changes': [{ |
271 {'author': {'email': issue_props['owner_email']}}, | 271 'author': {'email': issue_props['owner_email']}, |
272 ], | 272 'revision': options.revision, |
| 273 }], |
273 'properties': { | 274 'properties': { |
274 'category': category, | 275 'category': category, |
275 'issue': issue, | 276 'issue': issue, |
276 'master': master, | 277 'master': master, |
277 'patch_project': issue_props['project'], | 278 'patch_project': issue_props['project'], |
278 'patch_storage': 'rietveld', | 279 'patch_storage': 'rietveld', |
279 'patchset': patchset, | 280 'patchset': patchset, |
280 'reason': options.name, | 281 'reason': options.name, |
281 'revision': options.revision, | |
282 'rietveld': rietveld_url, | 282 'rietveld': rietveld_url, |
283 'testfilter': tests, | 283 'testfilter': tests, |
284 }, | 284 }, |
285 } | 285 } |
286 if properties: | 286 if properties: |
287 parameters['properties'].update(properties) | 287 parameters['properties'].update(properties) |
288 if options.clobber: | 288 if options.clobber: |
289 parameters['properties']['clobber'] = True | 289 parameters['properties']['clobber'] = True |
290 batch_req_body['builds'].append( | 290 batch_req_body['builds'].append( |
291 { | 291 { |
(...skipping 3304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3596 if __name__ == '__main__': | 3596 if __name__ == '__main__': |
3597 # These affect sys.stdout so do it outside of main() to simplify mocks in | 3597 # These affect sys.stdout so do it outside of main() to simplify mocks in |
3598 # unit testing. | 3598 # unit testing. |
3599 fix_encoding.fix_encoding() | 3599 fix_encoding.fix_encoding() |
3600 colorama.init() | 3600 colorama.init() |
3601 try: | 3601 try: |
3602 sys.exit(main(sys.argv[1:])) | 3602 sys.exit(main(sys.argv[1:])) |
3603 except KeyboardInterrupt: | 3603 except KeyboardInterrupt: |
3604 sys.stderr.write('interrupted\n') | 3604 sys.stderr.write('interrupted\n') |
3605 sys.exit(1) | 3605 sys.exit(1) |
OLD | NEW |