summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2025-04-29 07:22:26 -0600
committerSimon Glass <[email protected]>2025-05-27 10:07:41 +0100
commit605717405fce4e73ea12479d60098fa7da1e8bf3 (patch)
treea3a3a018025dfdc9b82ae0beefe8f6a2b7fe0e66
parent52aef33f953b5864dc015448783ecd2d9415e52f (diff)
patman: Use a pager when outputting status
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 <[email protected]>
-rw-r--r--tools/patman/status.py35
1 files 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