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>
This commit is contained in:
Simon Glass
2013-04-04 14:04:34 -07:00
parent 6d819925d0
commit fe2f8d9e2f
3 changed files with 27 additions and 4 deletions
+8
View File
@@ -42,6 +42,9 @@ re_signoff = re.compile('^Signed-off-by:')
# The start of the cover letter
re_cover = re.compile('^Cover-letter:')
# A cover letter Cc
re_cover_cc = re.compile('^Cover-letter-cc: *(.*)')
# Patch series tag
re_series = re.compile('^Series-(\w*): *(.*)')
@@ -153,6 +156,7 @@ class PatchStream:
# Handle state transition and skipping blank lines
series_match = re_series.match(line)
commit_match = re_commit.match(line) if self.is_log else None
cover_cc_match = re_cover_cc.match(line)
tag_match = None
if self.state == STATE_PATCH_HEADER:
tag_match = re_tag.match(line)
@@ -205,6 +209,10 @@ class PatchStream:
self.in_section = 'cover'
self.skip_blank = False
elif cover_cc_match:
value = cover_cc_match.group(1)
self.AddToSeries(line, 'cover-cc', value)
# If we are in a change list, key collected lines until a blank one
elif self.in_change:
if is_blank: