summaryrefslogtreecommitdiff
path: root/tools/patman/commit.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-10-29 21:46:24 -0600
committerSimon Glass <sjg@chromium.org>2020-11-05 09:11:31 -0700
commit313ef5f897f15bc7ec2ca8054f4e4871a2f6be93 (patch)
treebe3546d33bf076ab8363d1e073a38c3dd97eb484 /tools/patman/commit.py
parentb5cc39905343312d1b7064ede72561394049be21 (diff)
patman: Attach warnings to individual patches
At present warnings are produced across the whole set of patches when parsing them. It is more useful to associate each warning with the patch (or commit) that generated it. Attach warnings to the Commit object and move them out of PatchStream. Also avoid generating duplicate warnings for the same commit. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/commit.py')
-rw-r--r--tools/patman/commit.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/patman/commit.py b/tools/patman/commit.py
index 8d583c4ed39..e49bf87dfc8 100644
--- a/tools/patman/commit.py
+++ b/tools/patman/commit.py
@@ -27,6 +27,7 @@ class Commit:
rtags: Response tags (e.g. Reviewed-by) collected by the commit, dict:
key: rtag type (e.g. 'Reviewed-by')
value: Set of people who gave that rtag, each a name/email string
+ warn: List of warnings for this commit, each a str
"""
def __init__(self, hash):
self.hash = hash
@@ -38,6 +39,7 @@ class Commit:
self.notes = []
self.change_id = None
self.rtags = collections.defaultdict(set)
+ self.warn = []
def AddChange(self, version, info):
"""Add a new change line to the change list for a version.