Gerrit git cl upload: implement setting cc and reviewers.
R=machenbach@chromium.org,andybons@chromium.org
BUG=323819
Review URL: https://codereview.chromium.org/1885883002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299887 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index cbeec08..4797288 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -801,16 +801,16 @@
expected_upstream_ref + '..' + ref_to_push],), ''),
((['git', 'config', 'rietveld.cc'],), '')
]
- receive_pack = '--receive-pack=git receive-pack '
- receive_pack += '--cc=joe@example.com' # from watch list
+ # Add cc from watch list.
+ if ref_suffix == '':
+ ref_suffix = '%cc=joe@example.com'
+ else:
+ ref_suffix += ',cc=joe@example.com'
if reviewers:
- receive_pack += ' '
- receive_pack += ' '.join(
- '--reviewer=' + email for email in sorted(reviewers))
- receive_pack += ''
+ ref_suffix += ',' + ','.join('r=%s' % email
+ for email in sorted(reviewers))
calls += [
- ((['git',
- 'push', receive_pack, 'origin',
+ ((['git', 'push', 'origin',
ref_to_push + ':refs/for/refs/heads/master' + ref_suffix],),
('remote:\n'
'remote: Processing changes: (\)\n'