mirror of
https://github.com/golang/go
synced 2024-11-22 22:20:03 -07:00
codereview: do not add defaultcc for private CLs
LGTM=r R=r, 0xjnml, bradfitz, iant CC=golang-codereviews https://golang.org/cl/103070046
This commit is contained in:
parent
c22ed1290c
commit
32a5c898e3
@ -846,7 +846,7 @@ def CommandLineCL(ui, repo, pats, opts, op="verb", defaultcc=None):
|
|||||||
cl.reviewer = Add(cl.reviewer, SplitCommaSpace(opts.get('reviewer')))
|
cl.reviewer = Add(cl.reviewer, SplitCommaSpace(opts.get('reviewer')))
|
||||||
if opts.get('cc'):
|
if opts.get('cc'):
|
||||||
cl.cc = Add(cl.cc, SplitCommaSpace(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)
|
cl.cc = Add(cl.cc, defaultcc)
|
||||||
if cl.name == "new":
|
if cl.name == "new":
|
||||||
if opts.get('message'):
|
if opts.get('message'):
|
||||||
@ -1845,7 +1845,7 @@ def mail(ui, repo, *pats, **opts):
|
|||||||
# This makes sure that it appears in the
|
# This makes sure that it appears in the
|
||||||
# codereview.appspot.com/user/defaultcc
|
# codereview.appspot.com/user/defaultcc
|
||||||
# page, so that it doesn't get dropped on the floor.
|
# 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")
|
raise hg_util.Abort("no reviewers listed in CL")
|
||||||
cl.cc = Sub(cl.cc, defaultcc)
|
cl.cc = Sub(cl.cc, defaultcc)
|
||||||
cl.reviewer = defaultcc
|
cl.reviewer = defaultcc
|
||||||
|
Loading…
Reference in New Issue
Block a user