aboutsummaryrefslogtreecommitdiff
path: root/tools/patman/series.py
diff options
context:
space:
mode:
authorSimon Glass2013-03-20 16:43:00 +0000
committerSimon Glass2013-04-04 14:04:34 -0700
commitfe2f8d9e2f1bc00f143a22191a1d7076667ff436 (patch)
tree1a090f463c9136d9ae2a5f622e8d548e07ba32e8 /tools/patman/series.py
parent6d819925d0781b1fa8e5526f73cd277449dc08e1 (diff)
patman: Add Cover-letter-cc tag to Cc cover letter to people
The cover letter is sent to everyone who is on the Cc list for any of the patches in the series. Sometimes it is useful to send just the cover letter to additional people, so that they are aware of the series, but don't need to wade through all the individual patches. Add a new Cover-letter-cc tag for this purpose. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Doug Anderson <dianders@chromium.org>
Diffstat (limited to 'tools/patman/series.py')
-rw-r--r--tools/patman/series.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/patman/series.py b/tools/patman/series.py
index 6c5c5702e84..44ad931cf87 100644
--- a/tools/patman/series.py
+++ b/tools/patman/series.py
@@ -27,7 +27,8 @@ import gitutil
import terminal
# Series-xxx tags that we understand
-valid_series = ['to', 'cc', 'version', 'changes', 'prefix', 'notes', 'name'];
+valid_series = ['to', 'cc', 'version', 'changes', 'prefix', 'notes', 'name',
+ 'cover-cc']
class Series(dict):
"""Holds information about a patch series, including all tags.
@@ -43,6 +44,7 @@ class Series(dict):
def __init__(self):
self.cc = []
self.to = []
+ self.cover_cc = []
self.commits = []
self.cover = None
self.notes = []
@@ -69,6 +71,7 @@ class Series(dict):
value: Tag value (part after 'Series-xxx: ')
"""
# If we already have it, then add to our list
+ name = name.replace('-', '_')
if name in self:
values = value.split(',')
values = [str.strip() for str in values]
@@ -140,7 +143,8 @@ class Series(dict):
print 'Prefix:\t ', self.get('prefix')
if self.cover:
print 'Cover: %d lines' % len(self.cover)
- all_ccs = itertools.chain(*self._generated_cc.values())
+ cover_cc = gitutil.BuildEmailList(self.get('cover_cc', ''))
+ all_ccs = itertools.chain(cover_cc, *self._generated_cc.values())
for email in set(all_ccs):
print ' Cc: ',email
if cmd:
@@ -232,7 +236,8 @@ class Series(dict):
self._generated_cc[commit.patch] = list
if cover_fname:
- print >>fd, cover_fname, ', '.join(set(all_ccs))
+ cover_cc = gitutil.BuildEmailList(self.get('cover_cc', ''))
+ print >>fd, cover_fname, ', '.join(set(cover_cc + all_ccs))
fd.close()
return fname