aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-06-12 16:35:12 -0400
committerRuss Cox <rsc@golang.org>2014-06-12 16:35:12 -0400
commitff9af906f6a45fb97119a3a53b7df6d1638cc1c6 (patch)
tree577db43764b482efe84094bf7fc80a6ef65179e3 /lib
parent597f87c997dcaa86227725e227f5eb59721a0129 (diff)
downloadgo-ff9af906f6a45fb97119a3a53b7df6d1638cc1c6.tar.gz
go-ff9af906f6a45fb97119a3a53b7df6d1638cc1c6.zip
codereview: no LGTM needed for doc/go1.x.txt
Rob asked for this change to make maintaining go1.4.txt easier. If you are not sure of a change, it is still okay to send for review. LGTM=r R=r CC=golang-codereviews https://golang.org/cl/109880044
Diffstat (limited to 'lib')
-rw-r--r--lib/codereview/codereview.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py
index 936e0b685a..e8d3e20146 100644
--- a/lib/codereview/codereview.py
+++ b/lib/codereview/codereview.py
@@ -1937,7 +1937,7 @@ def submit(ui, repo, *pats, **opts):
about = ""
- if not cl.lgtm and not opts.get('tbr') and not isAddca(cl):
+ if not cl.lgtm and not opts.get('tbr') and needLGTM(cl):
raise hg_util.Abort("this CL has not been LGTM'ed")
if cl.lgtm:
about += "LGTM=" + JoinComma([CutDomain(who) for (who, line, approval) in cl.lgtm if approval]) + "\n"
@@ -2052,10 +2052,20 @@ def submit(ui, repo, *pats, **opts):
return err
return 0
-def isAddca(cl):
+def needLGTM(cl):
rev = cl.reviewer
isGobot = 'gobot' in rev or 'gobot@swtch.com' in rev or 'gobot@golang.org' in rev
- return cl.desc.startswith('A+C:') and 'Generated by addca.' in cl.desc and isGobot
+
+ # A+C CLs generated by addca do not need LGTM
+ if cl.desc.startswith('A+C:') and 'Generated by addca.' in cl.desc and isGobot:
+ return False
+
+ # CLs modifying only go1.x.txt do not need LGTM
+ if len(cl.files) == 1 and cl.files[0].startswith('doc/go1.') and cl.files[0].endswith('.txt'):
+ return False
+
+ # Other CLs need LGTM
+ return True
#######################################################################
# hg sync