From: Ryan Hitchman Date: Wed, 19 Jan 2011 19:46:06 +0000 (-0500) Subject: codereview: don't mail change lists with no files X-Git-Tag: weekly.2011-01-19~21 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=30c85bf14c32a836e666542b78a961e1e8fdc346;p=gostls13.git codereview: don't mail change lists with no files R=rsc CC=golang-dev https://golang.org/cl/3561041 --- diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py index e8c84abec2..0a345d8f66 100644 --- a/lib/codereview/codereview.py +++ b/lib/codereview/codereview.py @@ -1134,8 +1134,12 @@ def mail(ui, repo, *pats, **opts): return "no reviewers listed in CL" cl.cc = Sub(cl.cc, defaultcc) cl.reviewer = defaultcc - cl.Flush(ui, repo) - cl.Mail(ui, repo) + cl.Flush(ui, repo) + + if cl.files == []: + return "no changed files, not sending mail" + + cl.Mail(ui, repo) def nocommit(ui, repo, *pats, **opts): """(disabled when using this extension)"""