patman: Rename check_patchwork_status()

This function actually shows the status and does some other things.

Rename it to better reflect its purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2025-04-29 07:22:16 -06:00
parent d65490650f
commit e2a991398d
3 changed files with 12 additions and 12 deletions

View File

@ -99,8 +99,8 @@ def patchwork_status(branch, count, start, end, dest_branch, force,
# Import this here to avoid failing on other commands if the dependencies
# are not present
from patman import status
status.check_patchwork_status(series, found[0], branch, dest_branch, force,
show_comments, url)
status.check_and_show_status(series, found[0], branch, dest_branch, force,
show_comments, url)
def do_patman(args):

View File

@ -1045,8 +1045,8 @@ diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
series = Series()
series.commits = [commit1, commit2]
terminal.set_print_test_mode()
status.check_patchwork_status(series, '1234', None, None, False, False,
None, self._fake_patchwork2)
status.check_and_show_status(series, '1234', None, None, False, False,
None, self._fake_patchwork2)
lines = iter(terminal.get_print_test_lines())
col = terminal.Color()
self.assertEqual(terminal.PrintLine(' 1 Subject 1', col.BLUE),
@ -1159,9 +1159,9 @@ diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
# <unittest.result.TestResult run=8 errors=0 failures=0>
terminal.set_print_test_mode()
status.check_patchwork_status(series, '1234', branch, dest_branch,
False, False, None, self._fake_patchwork3,
repo)
status.check_and_show_status(series, '1234', branch, dest_branch,
False, False, None, self._fake_patchwork3,
repo)
lines = terminal.get_print_test_lines()
self.assertEqual(12, len(lines))
self.assertEqual(
@ -1361,8 +1361,8 @@ Reviewed-by: %s
series = Series()
series.commits = [commit1, commit2]
terminal.set_print_test_mode()
status.check_patchwork_status(series, '1234', None, None, False, True,
None, self._fake_patchwork2)
status.check_and_show_status(series, '1234', None, None, False, True,
None, self._fake_patchwork2)
lines = iter(terminal.get_print_test_lines())
col = terminal.Color()
self.assertEqual(terminal.PrintLine(' 1 Subject 1', col.BLUE),

View File

@ -300,9 +300,9 @@ def create_branch(series, new_rtag_list, branch, dest_branch, overwrite,
[parent.target])
return num_added
def check_patchwork_status(series, series_id, branch, dest_branch, force,
show_comments, url, rest_api=call_rest_api,
test_repo=None):
def check_and_show_status(series, series_id, branch, dest_branch, force,
show_comments, url, rest_api=call_rest_api,
test_repo=None):
"""Check the status of a series on Patchwork
This finds review tags and comments for a series in Patchwork, displaying