Commit 32a5c898 authored by Russ Cox's avatar Russ Cox

codereview: do not add defaultcc for private CLs

LGTM=r
R=r, 0xjnml, bradfitz, iant
CC=golang-codereviews
https://golang.org/cl/103070046
parent c22ed129
......@@ -846,7 +846,7 @@ def CommandLineCL(ui, repo, pats, opts, op="verb", defaultcc=None):
cl.reviewer = Add(cl.reviewer, SplitCommaSpace(opts.get('reviewer')))
if opts.get('cc'):
cl.cc = Add(cl.cc, SplitCommaSpace(opts.get('cc')))
if defaultcc:
if defaultcc and not cl.private:
cl.cc = Add(cl.cc, defaultcc)
if cl.name == "new":
if opts.get('message'):
......@@ -1845,7 +1845,7 @@ def mail(ui, repo, *pats, **opts):
# This makes sure that it appears in the
# codereview.appspot.com/user/defaultcc
# page, so that it doesn't get dropped on the floor.
if not defaultcc:
if not defaultcc or cl.private:
raise hg_util.Abort("no reviewers listed in CL")
cl.cc = Sub(cl.cc, defaultcc)
cl.reviewer = defaultcc
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment