| 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 """Client-side script to send a try job to the try server. It communicates to | 6 """Client-side script to send a try job to the try server. It communicates to |
| 7 the try server by either writting to a svn repository or by directly connecting | 7 the try server by either writting to a svn repository or by directly connecting |
| 8 to the server by HTTP. | 8 to the server by HTTP. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 assert ',' not in bot | 829 assert ',' not in bot |
| 830 if bot.endswith(':compile'): | 830 if bot.endswith(':compile'): |
| 831 # Skip over compile-only builders for now. | 831 # Skip over compile-only builders for now. |
| 832 continue | 832 continue |
| 833 bots.add(bot.split(':', 1)[0]) | 833 bots.add(bot.split(':', 1)[0]) |
| 834 options.bot = list(bots) | 834 options.bot = list(bots) |
| 835 | 835 |
| 836 # If no bot is specified, either the default pool will be selected or the | 836 # If no bot is specified, either the default pool will be selected or the |
| 837 # try server will refuse the job. Either case we don't need to interfere. | 837 # try server will refuse the job. Either case we don't need to interfere. |
| 838 | 838 |
| 839 if any('triggered' in b.split(':', 1)[0] for b in options.bot): |
| 840 print >> sys.stderr, ( |
| 841 'ERROR You are trying to send a job to a triggered bot. This type of' |
| 842 ' bot requires an\ninitial job from a parent (usually a builder). ' |
| 843 'Instead send your job to the parent.\nBot list: %s' % options.bot) |
| 844 return 1 |
| 845 |
| 839 if options.print_bots: | 846 if options.print_bots: |
| 840 print 'Bots which would be used:' | 847 print 'Bots which would be used:' |
| 841 for bot in options.bot: | 848 for bot in options.bot: |
| 842 print ' %s' % bot | 849 print ' %s' % bot |
| 843 return 0 | 850 return 0 |
| 844 | 851 |
| 845 # Send the patch. | 852 # Send the patch. |
| 846 if options.send_patch: | 853 if options.send_patch: |
| 847 # If forced. | 854 # If forced. |
| 848 options.send_patch(options) | 855 options.send_patch(options) |
| (...skipping 17 matching lines...) Expand all Loading... |
| 866 return 1 | 873 return 1 |
| 867 except (gclient_utils.Error, subprocess2.CalledProcessError), e: | 874 except (gclient_utils.Error, subprocess2.CalledProcessError), e: |
| 868 print >> sys.stderr, e | 875 print >> sys.stderr, e |
| 869 return 1 | 876 return 1 |
| 870 return 0 | 877 return 0 |
| 871 | 878 |
| 872 | 879 |
| 873 if __name__ == "__main__": | 880 if __name__ == "__main__": |
| 874 fix_encoding.fix_encoding() | 881 fix_encoding.fix_encoding() |
| 875 sys.exit(TryChange(None, None, False)) | 882 sys.exit(TryChange(None, None, False)) |
| OLD | NEW |