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

Side by Side Diff: git_cl.py

Issue 2044663003: git cl try: clarify where the default set of bots is coming from. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 6 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 distutils.version import LooseVersion 10 from distutils.version import LooseVersion
(...skipping 4380 matching lines...) Expand 10 before | Expand all | Expand 10 after
4391 'infra', 'config', 'cq.cfg') 4391 'infra', 'config', 'cq.cfg')
4392 if os.path.exists(cq_cfg): 4392 if os.path.exists(cq_cfg):
4393 masters = {} 4393 masters = {}
4394 cq_masters = commit_queue.get_master_builder_map( 4394 cq_masters = commit_queue.get_master_builder_map(
4395 cq_cfg, include_experimental=False, include_triggered=False) 4395 cq_cfg, include_experimental=False, include_triggered=False)
4396 for master, builders in cq_masters.iteritems(): 4396 for master, builders in cq_masters.iteritems():
4397 for builder in builders: 4397 for builder in builders:
4398 # Skip presubmit builders, because these will fail without LGTM. 4398 # Skip presubmit builders, because these will fail without LGTM.
4399 masters.setdefault(master, {})[builder] = ['defaulttests'] 4399 masters.setdefault(master, {})[builder] = ['defaulttests']
4400 if masters: 4400 if masters:
4401 print('Loaded default bots from CQ config (%s)' % cq_cfg)
4401 return masters 4402 return masters
4403 else:
4404 print('CQ config exists (%s) but has no try bots listed' % cq_cfg)
Sergiy Byelozyorov 2016/06/07 14:58:14 It's not clear from the message what is used in th
4402 4405
4403 if not options.bot: 4406 if not options.bot:
4404 parser.error('No default try builder to try, use --bot') 4407 parser.error('No default try builder to try, use --bot')
4405 4408
4406 builders_and_tests = {} 4409 builders_and_tests = {}
4407 # TODO(machenbach): The old style command-line options don't support 4410 # TODO(machenbach): The old style command-line options don't support
4408 # multiple try masters yet. 4411 # multiple try masters yet.
4409 old_style = filter(lambda x: isinstance(x, basestring), options.bot) 4412 old_style = filter(lambda x: isinstance(x, basestring), options.bot)
4410 new_style = filter(lambda x: isinstance(x, tuple), options.bot) 4413 new_style = filter(lambda x: isinstance(x, tuple), options.bot)
4411 4414
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
4935 if __name__ == '__main__': 4938 if __name__ == '__main__':
4936 # These affect sys.stdout so do it outside of main() to simplify mocks in 4939 # These affect sys.stdout so do it outside of main() to simplify mocks in
4937 # unit testing. 4940 # unit testing.
4938 fix_encoding.fix_encoding() 4941 fix_encoding.fix_encoding()
4939 setup_color.init() 4942 setup_color.init()
4940 try: 4943 try:
4941 sys.exit(main(sys.argv[1:])) 4944 sys.exit(main(sys.argv[1:]))
4942 except KeyboardInterrupt: 4945 except KeyboardInterrupt:
4943 sys.stderr.write('interrupted\n') 4946 sys.stderr.write('interrupted\n')
4944 sys.exit(1) 4947 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