]> Cypherpunks.ru repositories - gostls13.git/commitdiff
codereview: do not add defaultcc for private CLs
authorRuss Cox <rsc@golang.org>
Thu, 5 Jun 2014 20:40:09 +0000 (16:40 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 5 Jun 2014 20:40:09 +0000 (16:40 -0400)
LGTM=r
R=r, 0xjnml, bradfitz, iant
CC=golang-codereviews
https://golang.org/cl/103070046

lib/codereview/codereview.py

index 67341ebc37285c73d1eb317eaffabb22885d4721..936e0b685af70a999857f17439568cc3a8b83e95 100644 (file)
@@ -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