[PATCH 29/30] patman: Use a pager when outputting status
Simon Glass
sjg at chromium.org
Tue Apr 29 15:22:26 CEST 2025
The pager makes it easier to review large number of comments. Add it
around the output.
Patman normally sends multiple concurrent requests to the patchwork
server, as this is faster. Provide an option to disable this.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
tools/patman/status.py | 35 +++++++++++++++++++----------------
1 file changed, 19 insertions(+), 16 deletions(-)
diff --git a/tools/patman/status.py b/tools/patman/status.py
index f5be51461e7..dfc0f29faa4 100644
--- a/tools/patman/status.py
+++ b/tools/patman/status.py
@@ -382,22 +382,25 @@ def do_show_status(patches, series, branch, show_comments, col,
new_rtag_list = [None] * count
review_list = [None] * count
- patch_for_commit, _, warnings = compare_with_series(series, compare)
- for warn in warnings:
- tout.do_output(tout.WARNING if warnings_on_stderr else tout.INFO, warn)
-
- for seq, pw_patch in enumerate(patches):
- compare[seq].patch = pw_patch
-
- for i in range(count):
- pat = patch_for_commit.get(i)
- if pat:
- patch_data = pat.patch.data
- comment_data = pat.patch.comments
- new_rtag_list[i], review_list[i] = process_reviews(
- patch_data['content'], comment_data, series.commits[i].rtags)
- num_to_add = _do_show_status(series, patch_for_commit, show_comments, new_rtag_list,
- review_list, col)
+ with terminal.pager():
+ patch_for_commit, _, warnings = compare_with_series(series, compare)
+ for warn in warnings:
+ tout.do_output(tout.WARNING if warnings_on_stderr else tout.INFO,
+ warn)
+
+ for seq, pw_patch in enumerate(patches):
+ compare[seq].patch = pw_patch
+
+ for i in range(count):
+ pat = patch_for_commit.get(i)
+ if pat:
+ patch_data = pat.patch.data
+ comment_data = pat.patch.comments
+ new_rtag_list[i], review_list[i] = process_reviews(
+ patch_data['content'], comment_data,
+ series.commits[i].rtags)
+ num_to_add = _do_show_status(series, patch_for_commit, show_comments, new_rtag_list,
+ review_list, col)
return num_to_add, new_rtag_list, patches
--
2.43.0
More information about the U-Boot
mailing list