From 3b871cb76078df20409f7fb55d9a13fbd3d1f698 Mon Sep 17 00:00:00 2001 From: "jrg@chromium.org" Date: Fri, 10 Feb 2012 05:45:02 +0000 Subject: [PATCH] --print_bots arg to 'gcl try' for debugging PRESUBMIT.py changes. Prints the bots a tryjob would use if sent out. (Does not send out the job.) Review URL: http://codereview.chromium.org/9348068 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@121409 0039d316-1c4b-4281-b951-d872f2087c98 --- trychange.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/trychange.py b/trychange.py index d6df5ba74..07af901af 100755 --- a/trychange.py +++ b/trychange.py @@ -539,6 +539,10 @@ def TryChange(argv, help="Only use specifics build slaves, ex: " "'--bot win,layout_mac'; see the try " "server waterfall for the slave's name") + group.add_option("-B", "--print_bots", action="store_true", + help="Print bots we would use (e.g. from PRESUBMIT.py)" + " and exit. Do not send patch. Like --dry_run" + " but less verbose.") group.add_option("-r", "--revision", help="Revision to use for the try job; default: the " "revision will be determined by the try server; see " @@ -788,6 +792,12 @@ def TryChange(argv, # If no bot is specified, either the default pool will be selected or the # try server will refuse the job. Either case we don't need to interfere. + if options.print_bots: + print 'Bots which would be used:' + for bot in options.bot: + print ' %s' % bot + return 0 + # Send the patch. if options.send_patch: # If forced.