]> git.sur5r.net Git - u-boot/commitdiff
patman: Do not Cc addresses included in To list
authorOtavio Salvador <otavio@ossystems.com.br>
Sat, 18 Aug 2012 07:19:51 +0000 (07:19 +0000)
committerWolfgang Denk <wd@denx.de>
Sun, 2 Sep 2012 14:27:07 +0000 (16:27 +0200)
In case an address is listed in the To list, those will be skipped on
Cc list or user might end with a duplicated message.

This fixes the case when a tag points to same address used as series
destination thus avoiding duplicated sending.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
tools/patman/series.py

index 518834c8d16087c16ddbae67ee877c630dbba3b1..27528bf21dd73580a10d1bb1ca52155fbdb0f6a3 100644 (file)
@@ -114,6 +114,13 @@ class Series(dict):
                 cc_list += gitutil.BuildEmailList(commit.tags)
             cc_list += gitutil.BuildEmailList(commit.cc_list)
 
+            # Skip items in To list
+            if 'to' in self:
+                try:
+                    map(cc_list.remove, gitutil.BuildEmailList(self.to))
+                except ValueError:
+                    pass
+
             for email in cc_list:
                 if email == None:
                     email = col.Color(col.YELLOW, "<alias '%s' not found>"