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 import datetime | 10 import datetime |
(...skipping 2275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2286 | 2286 |
2287 props = cl.GetIssueProperties() | 2287 props = cl.GetIssueProperties() |
2288 if props.get('private'): | 2288 if props.get('private'): |
2289 parser.error('Cannot use trybots with private issue') | 2289 parser.error('Cannot use trybots with private issue') |
2290 | 2290 |
2291 if not options.name: | 2291 if not options.name: |
2292 options.name = cl.GetBranch() | 2292 options.name = cl.GetBranch() |
2293 | 2293 |
2294 if options.bot and not options.master: | 2294 if options.bot and not options.master: |
2295 parser.error('For manually specified bots please also specify the ' | 2295 parser.error('For manually specified bots please also specify the ' |
2296 'tryserver master, e.g. "-m tryserver.chromium".') | 2296 'tryserver master, e.g. "-m tryserver.chromium.linux".') |
James Cook
2014/07/25 16:27:40
drive-by: Can this list the names of all the avail
| |
2297 | 2297 |
2298 def GetMasterMap(): | 2298 def GetMasterMap(): |
2299 # Process --bot and --testfilter. | 2299 # Process --bot and --testfilter. |
2300 if not options.bot: | 2300 if not options.bot: |
2301 change = cl.GetChange(cl.GetCommonAncestorWithUpstream(), None) | 2301 change = cl.GetChange(cl.GetCommonAncestorWithUpstream(), None) |
2302 | 2302 |
2303 # Get try masters from PRESUBMIT.py files. | 2303 # Get try masters from PRESUBMIT.py files. |
2304 masters = presubmit_support.DoGetTryMasters( | 2304 masters = presubmit_support.DoGetTryMasters( |
2305 change, | 2305 change, |
2306 change.LocalPaths(), | 2306 change.LocalPaths(), |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2649 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' | 2649 ('AppEngine is misbehaving and returned HTTP %d, again. Keep faith ' |
2650 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) | 2650 'and retry or visit go/isgaeup.\n%s') % (e.code, str(e))) |
2651 | 2651 |
2652 | 2652 |
2653 if __name__ == '__main__': | 2653 if __name__ == '__main__': |
2654 # These affect sys.stdout so do it outside of main() to simplify mocks in | 2654 # These affect sys.stdout so do it outside of main() to simplify mocks in |
2655 # unit testing. | 2655 # unit testing. |
2656 fix_encoding.fix_encoding() | 2656 fix_encoding.fix_encoding() |
2657 colorama.init() | 2657 colorama.init() |
2658 sys.exit(main(sys.argv[1:])) | 2658 sys.exit(main(sys.argv[1:])) |
OLD | NEW |