From patchwork Sun Feb 24 04:15:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 222755 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 5AB4E2C00DC for ; Sun, 24 Feb 2013 15:22:14 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CF3014A101; Sun, 24 Feb 2013 05:22:10 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id shEUTcFl6hWK; Sun, 24 Feb 2013 05:22:10 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 349194A102; Sun, 24 Feb 2013 05:22:09 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 885364A102 for ; Sun, 24 Feb 2013 05:22:05 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PcIMutxMAthI for ; Sun, 24 Feb 2013 05:22:02 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-vb0-f73.google.com (mail-vb0-f73.google.com [209.85.212.73]) by theia.denx.de (Postfix) with ESMTPS id B94AD4A101 for ; Sun, 24 Feb 2013 05:21:58 +0100 (CET) Received: by mail-vb0-f73.google.com with SMTP id fj18so193711vbb.4 for ; Sat, 23 Feb 2013 20:21:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=9T1Bov9ehhdmwPvMbij7VVYjUW+gWKYGktRMSFXT77E=; b=UkdJWOY3fXej6qIh0RehHK+RN/5m0HU1QneSUo0jlVVpJ8B4vSiQIRvCR6ZowPkNS+ syCnkF6YOw7bwkR9yUktERfQYoCgP1gDVAQf66hrD5x5MPieIm0qpBI67WLbTM2yuRuN s7i7Cg2zu+hax7uM5dyRLJ82fStS33CGkGB7Nu9XMvy7moF1PDuJBtpUwZNqHSdRijUC l91cGTo1FDlTn50cpGKGxuA+AljocT9zEnsYbCjiTJJudx9PF4Q0TljUKTfceSk7KV2x Lt/sgCWWXoFfOTTlm+UmIntRwYtm6oyQLauT8o30HFwThLakU6domjAloqGyzlbtDgCg d32Q== X-Received: by 10.236.130.141 with SMTP id k13mr4247676yhi.19.1361679306157; Sat, 23 Feb 2013 20:15:06 -0800 (PST) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id r31si339083ano.0.2013.02.23.20.15.06 (version=TLSv1.1 cipher=AES128-SHA bits=128/128); Sat, 23 Feb 2013 20:15:06 -0800 (PST) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id E2AE031C016; Sat, 23 Feb 2013 20:15:05 -0800 (PST) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 86752160773; Sat, 23 Feb 2013 20:15:05 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Date: Sat, 23 Feb 2013 20:15:01 -0800 Message-Id: <1361679301-19980-1-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.8.1.3 X-Gm-Message-State: ALoCoQlst3EOdee5KXBfOX2RKNwzEbJYbed8hdjyXcJvso2Rb3AOgtgMc/TS5ZK4TxpfHE2xToKSUnoeQkFOq8zq741bpKWb/lnVYhBNo3uyF2mXscI4g8gAjTiyiuNXTAbu++rU3UtmvwTNDt511htNltq8v8m+tnGD3byQnrHFigENZiTWj7x7ueWZdFIVk3W/abrfDURJ Cc: Tom Rini Subject: [U-Boot] [PATCH] patman: Add Cover-letter-cc tag to Cc cover letter to people X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 Reviewed-by: Doug Anderson --- tools/patman/README | 12 +++++++++++- tools/patman/patchstream.py | 8 ++++++++ tools/patman/series.py | 11 ++++++++--- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/tools/patman/README b/tools/patman/README index 1832ebd..4b0ac30 100644 --- a/tools/patman/README +++ b/tools/patman/README @@ -182,6 +182,10 @@ END Sets the cover letter contents for the series. The first line will become the subject of the cover letter +Cover-letter-cc: email / alias + Additional email addresses / aliases to send cover letter to (you + can add this multiple times) + Series-notes: blah blah blah blah @@ -263,7 +267,13 @@ will create a patch which is copied to x86, arm, sandbox, mikef, ag and afleming. If you have a cover letter it will get sent to the union of the CC lists of -all of the other patches. +all of the other patches. If you want to sent it to additional people you +can add a tag: + +Cover-letter-cc: + +These people will get the cover letter even if they are not on the To/Cc +list for any of the patches. Example Work Flow diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py index f7ee75a..09cb30b 100644 --- a/tools/patman/patchstream.py +++ b/tools/patman/patchstream.py @@ -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: diff --git a/tools/patman/series.py b/tools/patman/series.py index 6c5c570..44ad931 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