Skip to content

Commit

Permalink
codereview: do not add defaultcc for private CLs
Browse files Browse the repository at this point in the history
LGTM=r
R=r, 0xjnml, bradfitz, iant
CC=golang-codereviews
https://golang.org/cl/103070046
  • Loading branch information
rsc committed Jun 5, 2014
1 parent c22ed12 commit 32a5c89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/codereview/codereview.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'):
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 32a5c89

Please sign in to comment.