From d0252b17ce16dfc9725a3945d9a1fa2fe3e507c2 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 10 Feb 2014 14:40:19 -0500 Subject: [PATCH] lib/codereview: allow addca CLs without LGTM LGTM=gri R=golang-codereviews, gri CC=golang-codereviews https://golang.org/cl/61610043 --- lib/codereview/codereview.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py index 2618ef9301..d171ef3e99 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 -- 2.48.1