Make --send-mail more useful by not requiring -r
Previously, --send-mail required -r to pass. Now it uses the R=|TBR= lines from
the description, which is much more useful.
R=dpranke@chromium.org
BUG=
TEST=
Review URL: http://codereview.chromium.org/8735018
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@112221 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/git_cl.py b/git_cl.py
index aff809e..c0d9c94 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -920,10 +920,6 @@
upload_args.extend(['--server', cl.GetRietveldServer()])
if options.emulate_svn_auto_props:
upload_args.append('--emulate_svn_auto_props')
- if options.send_mail:
- if not options.reviewers:
- DieWithError("Must specify reviewers to send email.")
- upload_args.append('--send_mail')
if options.from_logs and not options.message:
print 'Must set message for subject line if using desc_from_logs'
return 1
@@ -951,6 +947,10 @@
upload_args.extend(['--description', change_desc.description])
if change_desc.reviewers:
upload_args.extend(['--reviewers', change_desc.reviewers])
+ if options.send_mail:
+ if not change_desc.reviewers:
+ DieWithError("Must specify reviewers to send email.")
+ upload_args.append('--send_mail')
cc = ','.join(filter(None, (cl.GetCCList(), options.cc)))
if cc:
upload_args.extend(['--cc', cc])