From: Otavio Salvador Date: Sat, 18 Aug 2012 07:19:51 +0000 (+0000) Subject: patman: Do not Cc addresses included in To list X-Git-Tag: v2012.10-rc1~97 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=43de0244c133b6cb9041ae6e7e4ae79839f22c44;p=oweals%2Fu-boot.git patman: Do not Cc addresses included in To list 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 --- diff --git a/tools/patman/series.py b/tools/patman/series.py index 518834c8d1..27528bf21d 100644 --- a/tools/patman/series.py +++ b/tools/patman/series.py @@ -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, ""