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

Unified Diff: git_cl.py

Issue 2007873002: Gerrit git cl upload: obey -s --send-mail option. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: shorter Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/git_cl_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl.py
diff --git a/git_cl.py b/git_cl.py
index eaaed167aff5f4121c58a9aaf0814339ac337371..c6df2b26dbe1448b990bc429490a3255c863620a 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -2468,6 +2468,13 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
print('WARNING: underscores in title will be converted to spaces.')
refspec_opts.append('m=' + options.title.replace(' ', '_'))
+ if options.send_mail:
+ if not change_desc.get_reviewers():
+ DieWithError('Must specify reviewers to send email.')
+ refspec_opts.append('notify=ALL')
+ else:
+ refspec_opts.append('notify=NONE')
+
cc = self.GetCCList().split(',')
if options.cc:
cc.extend(options.cc)
@@ -2482,7 +2489,6 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
refspec_opts.extend('r=' + email.strip()
for email in change_desc.get_reviewers())
-
refspec_suffix = ''
if refspec_opts:
refspec_suffix = '%' + ','.join(refspec_opts)
« no previous file with comments | « no previous file | tests/git_cl_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698