From 73fe07a79a65600acce3d96c0b0d6ad1ca3e8551 Mon Sep 17 00:00:00 2001 From: Ilya Yanok Date: Mon, 6 Aug 2012 23:46:07 +0000 Subject: patman: don't mess with changelog Don't try to sort and uniq changelog entries as this breaks multiline entries. It will be better to add some real multi-line support but for now just preserve the entries as is. Signed-off-by: Ilya Yanok --- tools/patman/series.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tools/patman/series.py') diff --git a/tools/patman/series.py b/tools/patman/series.py index 05d9e73..4e7cb71 100644 --- a/tools/patman/series.py +++ b/tools/patman/series.py @@ -154,10 +154,9 @@ class Series(dict): for this_commit, text in self.changes[change]: if commit and this_commit != commit: continue - if text not in out: - out.append(text) + out.append(text) if out: - out = ['Changes in v%d:' % change] + sorted(out) + out = ['Changes in v%d:' % change] + out if need_blank: out = [''] + out final += out -- cgit v1.1 From d5f81d8acd14329095722879cf17a9b5295111dd Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Mon, 13 Aug 2012 10:08:22 +0000 Subject: patman: Allow for changelog use in first version of a series When a patchset had a RFC series, a v1 might have a changelog of changes done since the RFC. The patch changes the range checked for changelog and allow it to start for version 1. Signed-off-by: Otavio Salvador Acked-by: Simon Glass --- tools/patman/series.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tools/patman/series.py') diff --git a/tools/patman/series.py b/tools/patman/series.py index 4e7cb71..518834c 100644 --- a/tools/patman/series.py +++ b/tools/patman/series.py @@ -173,12 +173,13 @@ class Series(dict): col = terminal.Color() if self.get('version'): changes_copy = dict(self.changes) - for version in range(2, int(self.version) + 1): + for version in range(1, int(self.version) + 1): if self.changes.get(version): del changes_copy[version] else: - str = 'Change log missing for v%d' % version - print col.Color(col.RED, str) + if version > 1: + str = 'Change log missing for v%d' % version + print col.Color(col.RED, str) for version in changes_copy: str = 'Change log for unknown version v%d' % version print col.Color(col.RED, str) -- cgit v1.1 From 43de0244c133b6cb9041ae6e7e4ae79839f22c44 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Sat, 18 Aug 2012 07:19:51 +0000 Subject: 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 --- tools/patman/series.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/patman/series.py') diff --git a/tools/patman/series.py b/tools/patman/series.py index 518834c..27528bf 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, "" -- cgit v1.1 From 244e6f97055aa86e446ed3a925fdfa3f2b8f8207 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Sat, 18 Aug 2012 07:46:04 +0000 Subject: patman: Use reverse order for changelog Specially when many revisions are need for a patchset, the most interesting information is about the last set of changes so we output the changelog in reverse order to easy identification of most recent change set. Signed-off-by: Otavio Salvador Acked-by: Simon Glass --- tools/patman/series.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tools/patman/series.py') diff --git a/tools/patman/series.py b/tools/patman/series.py index 27528bf..ce36b23 100644 --- a/tools/patman/series.py +++ b/tools/patman/series.py @@ -145,18 +145,18 @@ class Series(dict): Return: The change log as a list of strings, one per line + Changes in v2: + - Jog the dial back closer to the widget + Changes in v1: - Fix the widget - Jog the dial - Changes in v2: - - Jog the dial back closer to the widget - etc. """ final = [] need_blank = False - for change in sorted(self.changes): + for change in sorted(self.changes, reverse=True): out = [] for this_commit, text in self.changes[change]: if commit and this_commit != commit: -- cgit v1.1