summaryrefslogtreecommitdiff
path: root/tools/patman/patchwork.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2025-05-10 13:05:05 +0200
committerSimon Glass <sjg@chromium.org>2025-05-27 10:07:42 +0100
commit2610699420052f4f5fb21577c8181e79475a9086 (patch)
tree2f7e6539b6455369e69ba7ff32f47274a0c6e22b /tools/patman/patchwork.py
parentce785fd9b7d6b1176349ba7717576548c95a3e2b (diff)
patman: Update status command support cover-letter info
Add support to the status module for reading and supporting cover letters, including comments. Plumb this through to the patchwork module. The actual support in the latter is not yet integrated. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/patchwork.py')
-rw-r--r--tools/patman/patchwork.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/patman/patchwork.py b/tools/patman/patchwork.py
index 47d7be28fdf..afafb97ffed 100644
--- a/tools/patman/patchwork.py
+++ b/tools/patman/patchwork.py
@@ -388,16 +388,20 @@ class Patchwork:
return Patch(patch_id, state, data, comment_data)
- async def series_get_state(self, client, link, read_comments):
+ async def series_get_state(self, client, link, read_comments,
+ read_cover_comments):
"""Sync the series information against patchwork, to find patch status
Args:
client (aiohttp.ClientSession): Session to use
link (str): Patchwork series ID
read_comments (bool): True to read the comments on the patches
+ read_cover_comments (bool): True to read the comments on the cover
+ letter
Return: tuple:
- list of Patch objects
+ COVER object, or None if none or not read_cover_comments
+ list of PATCH objects
"""
data = await self.get_series(client, link)
patch_list = list(data['patches'])
@@ -407,7 +411,7 @@ class Patchwork:
if read_comments:
# Returns a list of Patch objects
tasks = [self._get_patch_status(client, patch_list[i]['id'])
- for i in range(count)]
+ for i in range(count)]
patch_status = await asyncio.gather(*tasks)
for patch_data, status in zip(patch_list, patch_status):
@@ -422,4 +426,7 @@ class Patchwork:
if self._show_progress:
terminal.print_clear()
- return patches
+ # TODO: Implement this
+ cover = None
+
+ return cover, patches