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

Side by Side Diff: trychange.py

Issue 7063004: Allowing project name to be used to select groups of bots. (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 9 years, 7 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 | « presubmit_support.py ('k') | 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) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 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 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 # Get try slaves from PRESUBMIT.py files if not specified. 707 # Get try slaves from PRESUBMIT.py files if not specified.
708 # Even if the diff comes from options.url, use the local checkout for bot 708 # Even if the diff comes from options.url, use the local checkout for bot
709 # selection. 709 # selection.
710 try: 710 try:
711 import presubmit_support 711 import presubmit_support
712 root_presubmit = checkouts[0].ReadRootFile('PRESUBMIT.py') 712 root_presubmit = checkouts[0].ReadRootFile('PRESUBMIT.py')
713 options.bot = presubmit_support.DoGetTrySlaves( 713 options.bot = presubmit_support.DoGetTrySlaves(
714 checkouts[0].GetFileNames(), 714 checkouts[0].GetFileNames(),
715 checkouts[0].checkout_root, 715 checkouts[0].checkout_root,
716 root_presubmit, 716 root_presubmit,
717 options.project,
717 False, 718 False,
718 sys.stdout) 719 sys.stdout)
719 except ImportError: 720 except ImportError:
720 pass 721 pass
721 # If no bot is specified, either the default pool will be selected or the 722 # If no bot is specified, either the default pool will be selected or the
722 # try server will refuse the job. Either case we don't need to interfere. 723 # try server will refuse the job. Either case we don't need to interfere.
723 724
724 if options.name is None: 725 if options.name is None:
725 if options.issue: 726 if options.issue:
726 options.name = 'Issue %s' % options.issue 727 options.name = 'Issue %s' % options.issue
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 return 1 763 return 1
763 except (gclient_utils.Error, subprocess2.CalledProcessError), e: 764 except (gclient_utils.Error, subprocess2.CalledProcessError), e:
764 print >> sys.stderr, e 765 print >> sys.stderr, e
765 return 1 766 return 1
766 return 0 767 return 0
767 768
768 769
769 if __name__ == "__main__": 770 if __name__ == "__main__":
770 fix_encoding.fix_encoding() 771 fix_encoding.fix_encoding()
771 sys.exit(TryChange(None, [], False)) 772 sys.exit(TryChange(None, [], False))
OLDNEW
« no previous file with comments | « presubmit_support.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698