git cl upload: cc + reviewers in git push for chromium host.
For other hosts, behavior is not changed.
Tested on this very CL:
To https://chromium.googlesource.com/chromium/tools/depot_tools.git
* [new branch] 9057c2235b096f1feae61d65569641fc7c08a0e2 ->
refs/for/refs/heads/master%ready,notify=ALL,m=Initial_upload,r=ehmaldonado,cc=chromium-reviews@chromium.org,cc=iannucci+depot_tools@chromium.org,hashtag=git-cl-upload
R=ehmaldonado
Bug: 877717
Change-Id: I951fc576105211590c6c303ce0ed2fe142628224
Reviewed-on: https://chromium-review.googlesource.com/c/1307051
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
diff --git a/git_cl.py b/git_cl.py
index 3d96e6a..a46509c 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -2872,8 +2872,12 @@
cc = filter(None, [email.strip() for email in cc])
if change_desc.get_cced():
cc.extend(change_desc.get_cced())
- valid_accounts = gerrit_util.ValidAccounts(
- self._GetGerritHost(), reviewers + cc)
+ if self._GetGerritHost() == 'chromium-review.googlesource.com':
+ valid_accounts = set(reviewers + cc)
+ # TODO(crbug/877717): relax this for all hosts.
+ else:
+ valid_accounts = gerrit_util.ValidAccounts(
+ self._GetGerritHost(), reviewers + cc)
logging.info('accounts %s are recognized, %s invalid',
sorted(valid_accounts),
set(reviewers + cc).difference(set(valid_accounts)))
@@ -2918,7 +2922,6 @@
refspec_opts.append('cc=%s' % c)
cc.remove(c)
-
if options.topic:
# Documentation on Gerrit topics is here:
# https://gerrit-review.googlesource.com/Documentation/user-upload.html#topic