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

Unified Diff: git_cl/git_cl.py

Issue 6575036: Add support for git cl upload --cc foo@example.com (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/git_cl
Patch Set: Created 9 years, 10 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: git_cl/git_cl.py
diff --git a/git_cl/git_cl.py b/git_cl/git_cl.py
index 1be555b66a32ad3519af09e5d31d4eb7068e02f4..945f48f141421dac3b8371a9825519e555492d8b 100644
--- a/git_cl/git_cl.py
+++ b/git_cl/git_cl.py
@@ -137,10 +137,9 @@ class Settings(object):
Return is a string suitable for passing to gcl with the --cc flag.
"""
if self.cc is None:
- self.cc = self._GetConfig('rietveld.cc', error_ok=True)
+ base_cc = self._GetConfig('rietveld.cc', error_ok=True)
more_cc = self._GetConfig('rietveld.extracc', error_ok=True)
- if more_cc is not None:
- self.cc += ',' + more_cc
+ self.cc = ','.join(filter(None, (base_cc, more_cc))) or ''
return self.cc
def GetRoot(self):
@@ -710,6 +709,8 @@ def CMDupload(parser, args):
parser.add_option('-m', dest='message', help='message for patch')
parser.add_option('-r', '--reviewers',
help='reviewer email addresses')
+ parser.add_option('--cc',
+ help='cc email addresses')
parser.add_option('--send-mail', action='store_true',
help='send email to reviewer immediately')
parser.add_option("--emulate_svn_auto_props", action="store_true",
@@ -793,7 +794,9 @@ def CMDupload(parser, args):
return 1
upload_args.extend(['--message', subject])
upload_args.extend(['--description', change_desc])
- upload_args.extend(['--cc', settings.GetCCList()])
+ cc = ','.join(filter(None, (settings.GetCCList(), options.cc)))
+ if cc:
+ upload_args.extend(['--cc', cc])
# Include the upstream repo's URL in the change -- this is useful for
# projects that have their source spread across multiple repos.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698