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

Side by Side Diff: git_cl.py

Issue 2397773002: Do not commit. Bug issue in the form of a CL. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | no next file » | 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 (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 and Gerrit.""" 8 """A git-command for integrating reviews on Rietveld and Gerrit."""
9 9
10 from __future__ import print_function 10 from __future__ import print_function
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 print_text.append(' %s: %s' % (builder, tests)) 347 print_text.append(' %s: %s' % (builder, tests))
348 parameters = { 348 parameters = {
349 'builder_name': builder, 349 'builder_name': builder,
350 'changes': [{ 350 'changes': [{
351 'author': {'email': issue_props['owner_email']}, 351 'author': {'email': issue_props['owner_email']},
352 'revision': options.revision, 352 'revision': options.revision,
353 }], 353 }],
354 'properties': { 354 'properties': {
355 'category': category, 355 'category': category,
356 'issue': issue, 356 'issue': issue,
357 # Nodir, do even need this thing? Can it be removed?
357 'master': master, 358 'master': master,
tandrii(chromium) 2016/10/10 15:15:35 i mean this line.
nodir 2016/10/10 17:18:11 IDK. There may be recipes that rely on master prop
tandrii(chromium) 2016/10/10 17:25:45 I see. Well, these recipes will be broken with LUC
358 'patch_project': issue_props['project'], 359 'patch_project': issue_props['project'],
359 'patch_storage': 'rietveld', 360 'patch_storage': 'rietveld',
360 'patchset': patchset, 361 'patchset': patchset,
361 'reason': options.name, 362 'reason': options.name,
362 'rietveld': rietveld_url, 363 'rietveld': rietveld_url,
363 }, 364 },
364 } 365 }
365 if 'presubmit' in builder.lower(): 366 if 'presubmit' in builder.lower():
366 parameters['properties']['dry_run'] = 'true' 367 parameters['properties']['dry_run'] = 'true'
367 if tests: 368 if tests:
368 parameters['properties']['testfilter'] = tests 369 parameters['properties']['testfilter'] = tests
369 if properties: 370 if properties:
370 parameters['properties'].update(properties) 371 parameters['properties'].update(properties)
371 if options.clobber: 372 if options.clobber:
372 parameters['properties']['clobber'] = True 373 parameters['properties']['clobber'] = True
373 batch_req_body['builds'].append( 374 batch_req_body['builds'].append(
374 { 375 {
375 'bucket': bucket, 376 'bucket': bucket,
376 'parameters_json': json.dumps(parameters), 377 'parameters_json': json.dumps(parameters),
377 'client_operation_id': str(uuid.uuid4()), 378 'client_operation_id': str(uuid.uuid4()),
378 'tags': ['builder:%s' % builder, 379 'tags': ['builder:%s' % builder,
379 'buildset:%s' % buildset, 380 'buildset:%s' % buildset,
381 # Nodir, do even need this thing? Can it be removed?
380 'master:%s' % master, 382 'master:%s' % master,
tandrii(chromium) 2016/10/10 15:15:35 and this line.
nodir 2016/10/10 17:18:11 same
381 'user_agent:git_cl_try'] 383 'user_agent:git_cl_try']
382 } 384 }
383 ) 385 )
384 386
385 _buildbucket_retry( 387 _buildbucket_retry(
386 'triggering try jobs', 388 'triggering try jobs',
387 http, 389 http,
388 buildbucket_put_url, 390 buildbucket_put_url,
389 'PUT', 391 'PUT',
390 body=json.dumps(batch_req_body), 392 body=json.dumps(batch_req_body),
(...skipping 4908 matching lines...) Expand 10 before | Expand all | Expand 10 after
5299 if __name__ == '__main__': 5301 if __name__ == '__main__':
5300 # These affect sys.stdout so do it outside of main() to simplify mocks in 5302 # These affect sys.stdout so do it outside of main() to simplify mocks in
5301 # unit testing. 5303 # unit testing.
5302 fix_encoding.fix_encoding() 5304 fix_encoding.fix_encoding()
5303 setup_color.init() 5305 setup_color.init()
5304 try: 5306 try:
5305 sys.exit(main(sys.argv[1:])) 5307 sys.exit(main(sys.argv[1:]))
5306 except KeyboardInterrupt: 5308 except KeyboardInterrupt:
5307 sys.stderr.write('interrupted\n') 5309 sys.stderr.write('interrupted\n')
5308 sys.exit(1) 5310 sys.exit(1)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698