summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-02-10 14:40:19 -0500
committerRuss Cox <rsc@golang.org>2014-02-10 14:40:19 -0500
commit5fd3147ab17eb0324d54e2d6b52f786d7f759331 (patch)
treeb15ae888d499833f5c1cf140d15595aff35df7d3 /lib
parent38941b418bcc628ed7db72a20c9258ae94c73395 (diff)
downloadgo-5fd3147ab17eb0324d54e2d6b52f786d7f759331.tar.gz
lib/codereview: allow addca CLs without LGTM
LGTM=gri R=golang-codereviews, gri CC=golang-codereviews https://codereview.appspot.com/61610043
Diffstat (limited to 'lib')
-rw-r--r--lib/codereview/codereview.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py
index 2618ef930..d171ef3e9 100644
--- a/lib/codereview/codereview.py
+++ b/lib/codereview/codereview.py
@@ -1935,7 +1935,7 @@ def submit(ui, repo, *pats, **opts):
about = ""
- if not cl.lgtm and not opts.get('tbr'):
+ if not cl.lgtm and not opts.get('tbr') and not isAddca(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"
@@ -2050,6 +2050,11 @@ def submit(ui, repo, *pats, **opts):
return err
return 0
+def isAddca(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
+
#######################################################################
# hg sync