diff options
author | Ryan Hitchman <hitchmanr@gmail.com> | 2011-01-19 14:46:06 -0500 |
---|---|---|
committer | Ryan Hitchman <hitchmanr@gmail.com> | 2011-01-19 14:46:06 -0500 |
commit | e60009f81d0083e0d54985240f1aadc6b5015334 (patch) | |
tree | aacde15166c4cdf3f086f6d340d8ad19afd24fee | |
parent | fcd894fb57e49ba394540688138c97240f0d145a (diff) | |
download | go-e60009f81d0083e0d54985240f1aadc6b5015334.tar.gz |
codereview: don't mail change lists with no files
R=rsc
CC=golang-dev
http://codereview.appspot.com/3561041
Committer: Russ Cox <rsc@golang.org>
-rw-r--r-- | lib/codereview/codereview.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py index e8c84abec..0a345d8f6 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)""" |