summaryrefslogtreecommitdiff
path: root/tools/patman/series.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2013-03-26 13:09:44 +0000
committerSimon Glass <sjg@chromium.org>2013-04-08 15:21:22 -0700
commit645b271a6039e79b368f027a5624dc0820441733 (patch)
tree5b10b2f88f4fc87a21fbb31a2a5c64593c0dcfef /tools/patman/series.py
parent902a9715eaef60e75f842381df485b76e5082c4f (diff)
patman: Add Series-process-log tag to sort/uniq change logs
For some series with lots of changes it is annoying that duplicate change log items are not caught. It is also helpful sometimes to sort the change logs. Add a Series-process-log tag to enable this, which can be placed in a commit to control this. The change to the Cc: line is to fix a checkpatch warning. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Doug Anderson <dianders@chromium.org>
Diffstat (limited to 'tools/patman/series.py')
-rw-r--r--tools/patman/series.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/patman/series.py b/tools/patman/series.py
index eb5a00c37a..783b3dd133 100644
--- a/tools/patman/series.py
+++ b/tools/patman/series.py
@@ -28,7 +28,7 @@ import terminal
# Series-xxx tags that we understand
valid_series = ['to', 'cc', 'version', 'changes', 'prefix', 'notes', 'name',
- 'cover-cc']
+ 'cover-cc', 'process_log']
class Series(dict):
"""Holds information about a patch series, including all tags.
@@ -167,15 +167,20 @@ class Series(dict):
etc.
"""
final = []
+ process_it = self.get('process_log', '').split(',')
+ process_it = [item.strip() for item in process_it]
need_blank = False
for change in sorted(self.changes, reverse=True):
out = []
for this_commit, text in self.changes[change]:
if commit and this_commit != commit:
continue
- out.append(text)
+ if 'uniq' not in process_it or text not in out:
+ out.append(text)
line = 'Changes in v%d:' % change
have_changes = len(out) > 0
+ if 'sort' in process_it:
+ out = sorted(out)
if have_changes:
out.insert(0, line)
else: