From e1555a609d50999bd43600f22647aaa1daf16dfb Mon Sep 17 00:00:00 2001 From: "finnur@chromium.org" Date: Mon, 9 Nov 2009 17:05:54 +0000 Subject: [PATCH] Use TRYBOT_RESULTS_EMAIL_ADDRESS environment variable for the try servers and fallback on EMAIL_ADDRESS, since WebKit uses that. The reason is that some people have WebKit emails that predate Chromium emails so some separation is warranted so that people don't have to fix up emails all the time. BUG=None TEST=None Original review: http://codereview.chromium.org/372048 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31437 0039d316-1c4b-4281-b951-d872f2087c98 --- trychange.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/trychange.py b/trychange.py index f44b0c96a..9e7bf78fc 100755 --- a/trychange.py +++ b/trychange.py @@ -452,10 +452,13 @@ def TryChange(argv, group = optparse.OptionGroup(parser, "Result and status") group.add_option("-u", "--user", default=getpass.getuser(), help="Owner user name [default: %default]") - group.add_option("-e", "--email", default=os.environ.get('EMAIL_ADDRESS'), - help="Email address where to send the results. Use the " - "EMAIL_ADDRESS environment variable to set the default " - "email address [default: %default]") + group.add_option("-e", "--email", + default=os.environ.get('TRYBOT_RESULTS_EMAIL_ADDRESS', + os.environ.get('EMAIL_ADDRESS')), + help="Email address where to send the results. Use either " + "the TRYBOT_RESULTS_EMAIL_ADDRESS environment " + "variable or EMAIL_ADDRESS to set the email address " + "the try bots report results to [default: %default]") group.add_option("-n", "--name", help="Descriptive name of the try job") group.add_option("--issue", type='int', @@ -590,9 +593,10 @@ def TryChange(argv, options.name = 'Unnamed' print('Note: use --name NAME to change the try job name.') if not options.email: - print('Warning: try job email will be sent to %s@google.com or ' - 'something like that. Who knows? Set EMAIL_ADDRESS to override.' - % options.user) + print('Warning: TRYBOT_RESULTS_EMAIL_ADDRESS is not set. Try server ' + 'results might\ngo to: %s@google.com.\n' % options.user) + else: + print('Results will be emailed to: ' + options.email) # Send the patch. options.send_patch(options)