diff options
author | Chris Packham <judge.packham@gmail.com> | 2018-06-07 20:45:06 +1200 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-06-23 08:03:43 -0600 |
commit | 4fb3502972db0faeb278f62effc0a4b07a355531 (patch) | |
tree | f25fc073a3230bc8f7b3b35eafa5577cd2537e06 /tools/patman/series.py | |
parent | 77b5ba5d2b94c5b028991c82782493f64bd4f392 (diff) | |
download | u-boot-4fb3502972db0faeb278f62effc0a4b07a355531.tar.gz |
patman: add option for limiting the Cc list
Many mailing-lists consider a long Cc list a sign of spam and will
either drop the message or mark it for moderation. Because patman
automatically invokes get_maintainer.pl the Cc list can expand
unexpectedly. Allow the user to specify a limit for the Cc list.
This limit is applied after removing any known bouncing addresses. By
default no limit is applied.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/series.py')
-rw-r--r-- | tools/patman/series.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/patman/series.py b/tools/patman/series.py index d526d4ee91..2735afaf88 100644 --- a/tools/patman/series.py +++ b/tools/patman/series.py @@ -202,7 +202,7 @@ class Series(dict): print(col.Color(col.RED, str)) def MakeCcFile(self, process_tags, cover_fname, raise_on_error, - add_maintainers): + add_maintainers, limit): """Make a cc file for us to use for per-commit Cc automation Also stores in self._generated_cc to make ShowActions() faster. @@ -215,6 +215,7 @@ class Series(dict): add_maintainers: Either: True/False to call the get_maintainers to CC maintainers List of maintainers to include (for testing) + limit: Limit the length of the Cc list Return: Filename of temp file created """ @@ -238,6 +239,8 @@ class Series(dict): print(col.Color(col.YELLOW, 'Skipping "%s"' % x)) cc = set(cc) - set(settings.bounces) cc = [m.encode('utf-8') if type(m) != str else m for m in cc] + if limit is not None: + cc = cc[:limit] all_ccs += cc print(commit.patch, ', '.join(set(cc)), file=fd) self._generated_cc[commit.patch] = cc |