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

Unified Diff: git_cl.py

Issue 1885883002: Gerrit git cl upload: implement setting cc and reviewers. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@R400
Patch Set: review Created 4 years, 8 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 c8153dbec35573f0fae698244d94964e9e2ce22c..0470a2ceb735cf9fa2e36b607448af60246e125e 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -2391,35 +2391,27 @@ class _GerritChangelistImpl(_ChangelistCodereviewBase):
print('WARNING: underscores in title will be converted to spaces.')
refspec_opts.append('m=' + options.title.replace(' ', '_'))
- receive_options = []
cc = self.GetCCList().split(',')
if options.cc:
cc.extend(options.cc)
cc = filter(None, cc)
if cc:
- receive_options += ['--cc=' + email for email in cc]
+ refspec_opts.extend('cc=' + email.strip() for email in cc)
+
if change_desc.get_reviewers():
- receive_options.extend(
- '--reviewer=' + email for email in change_desc.get_reviewers())
+ refspec_opts.extend('r=' + email.strip()
+ for email in change_desc.get_reviewers())
- git_command = ['git', 'push']
- if receive_options:
- # TODO(tandrii): clean this up in follow up. This doesn't work, as it gets
- # totally ignored by Gerrit.
- git_command.append('--receive-pack=git receive-pack %s' %
- ' '.join(receive_options))
refspec_suffix = ''
if refspec_opts:
refspec_suffix = '%' + ','.join(refspec_opts)
assert ' ' not in refspec_suffix, (
'spaces not allowed in refspec: "%s"' % refspec_suffix)
-
refspec = '%s:refs/for/%s%s' % (ref_to_push, branch, refspec_suffix)
- git_command += [gerrit_remote, refspec]
push_stdout = gclient_utils.CheckCallAndFilter(
- git_command,
+ ['git', 'push', gerrit_remote, refspec],
print_stdout=True,
# Flush after every line: useful for seeing progress when running as
# recipe.
« 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