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

Side by Side Diff: git_cl.py

Issue 199723003: Add an error message when explicitly specifying bots without specifying the master (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 6 years, 9 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 | « 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.""" 8 """A git-command for integrating reviews on Rietveld."""
9 9
10 from distutils.version import LooseVersion 10 from distutils.version import LooseVersion
(...skipping 2166 matching lines...) Expand 10 before | Expand all | Expand 10 after
2177 if args: 2177 if args:
2178 parser.error('Unknown arguments: %s' % args) 2178 parser.error('Unknown arguments: %s' % args)
2179 2179
2180 cl = Changelist() 2180 cl = Changelist()
2181 if not cl.GetIssue(): 2181 if not cl.GetIssue():
2182 parser.error('Need to upload first') 2182 parser.error('Need to upload first')
2183 2183
2184 if not options.name: 2184 if not options.name:
2185 options.name = cl.GetBranch() 2185 options.name = cl.GetBranch()
2186 2186
2187 if options.bot and not options.master:
2188 parser.error('For manually specified bots please also specify the '
2189 'tryserver master, e.g. "-m tryserver.chromium".')
2190
2187 def GetMasterMap(): 2191 def GetMasterMap():
2188 # Process --bot and --testfilter. 2192 # Process --bot and --testfilter.
2189 if not options.bot: 2193 if not options.bot:
2190 change = cl.GetChange(cl.GetCommonAncestorWithUpstream(), None) 2194 change = cl.GetChange(cl.GetCommonAncestorWithUpstream(), None)
2191 2195
2192 # Get try masters from PRESUBMIT.py files. 2196 # Get try masters from PRESUBMIT.py files.
2193 masters = presubmit_support.DoGetTryMasters( 2197 masters = presubmit_support.DoGetTryMasters(
2194 change, 2198 change,
2195 change.LocalPaths(), 2199 change.LocalPaths(),
2196 settings.GetRoot(), 2200 settings.GetRoot(),
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
2531 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' 2535 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith '
2532 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) 2536 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e)))
2533 2537
2534 2538
2535 if __name__ == '__main__': 2539 if __name__ == '__main__':
2536 # These affect sys.stdout so do it outside of main() to simplify mocks in 2540 # These affect sys.stdout so do it outside of main() to simplify mocks in
2537 # unit testing. 2541 # unit testing.
2538 fix_encoding.fix_encoding() 2542 fix_encoding.fix_encoding()
2539 colorama.init() 2543 colorama.init()
2540 sys.exit(main(sys.argv[1:])) 2544 sys.exit(main(sys.argv[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