diff options
Diffstat (limited to 'tools/patman')
-rw-r--r-- | tools/patman/func_test.py | 8 | ||||
-rw-r--r-- | tools/patman/status.py | 15 |
2 files changed, 12 insertions, 11 deletions
diff --git a/tools/patman/func_test.py b/tools/patman/func_test.py index 3f7573a41a8..47fbbe0cc3f 100644 --- a/tools/patman/func_test.py +++ b/tools/patman/func_test.py @@ -1043,7 +1043,7 @@ diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c pwork) lines = iter(terminal.get_print_test_lines()) col = terminal.Color() - self.assertEqual(terminal.PrintLine(' 1 Subject 1', col.BLUE), + self.assertEqual(terminal.PrintLine(' 1 Subject 1', col.YELLOW), next(lines)) self.assertEqual( terminal.PrintLine(' Reviewed-by: ', col.GREEN, newline=False, @@ -1052,7 +1052,7 @@ diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c self.assertEqual(terminal.PrintLine(self.joe, col.WHITE, bright=False), next(lines)) - self.assertEqual(terminal.PrintLine(' 2 Subject 2', col.BLUE), + self.assertEqual(terminal.PrintLine(' 2 Subject 2', col.YELLOW), next(lines)) self.assertEqual( terminal.PrintLine(' Reviewed-by: ', col.GREEN, newline=False, @@ -1359,7 +1359,7 @@ Reviewed-by: %s pwork) lines = iter(terminal.get_print_test_lines()) col = terminal.Color() - self.assertEqual(terminal.PrintLine(' 1 Subject 1', col.BLUE), + self.assertEqual(terminal.PrintLine(' 1 Subject 1', col.YELLOW), next(lines)) self.assertEqual( terminal.PrintLine(' + Reviewed-by: ', col.GREEN, newline=False), @@ -1380,7 +1380,7 @@ Reviewed-by: %s ' Here is my comment above the above...', None), next(lines)) self.assertEqual(terminal.PrintLine('', None), next(lines)) - self.assertEqual(terminal.PrintLine(' 2 Subject 2', col.BLUE), + self.assertEqual(terminal.PrintLine(' 2 Subject 2', col.YELLOW), next(lines)) self.assertEqual( terminal.PrintLine(' + Reviewed-by: ', col.GREEN, newline=False), diff --git a/tools/patman/status.py b/tools/patman/status.py index 5c75d7b10c6..c114a432bf3 100644 --- a/tools/patman/status.py +++ b/tools/patman/status.py @@ -203,10 +203,11 @@ def find_new_responses(new_rtag_list, review_list, seq, cmt, patch, pwork): new_rtag_list[seq] = new_rtags review_list[seq] = reviews -def show_responses(rtags, indent, is_new): +def show_responses(col, rtags, indent, is_new): """Show rtags collected Args: + col (terminal.Colour): Colour object to use rtags (dict): review tags to show key: Response tag (e.g. 'Reviewed-by') value: Set of people who gave that response, each a name/email string @@ -216,14 +217,14 @@ def show_responses(rtags, indent, is_new): Returns: int: Number of review tags displayed """ - col = terminal.Color() count = 0 for tag in sorted(rtags.keys()): people = rtags[tag] for who in sorted(people): terminal.tprint(indent + '%s %s: ' % ('+' if is_new else ' ', tag), - newline=False, colour=col.GREEN, bright=is_new) - terminal.tprint(who, colour=col.WHITE, bright=is_new) + newline=False, colour=col.GREEN, bright=is_new, + col=col) + terminal.tprint(who, colour=col.WHITE, bright=is_new, col=col) count += 1 return count @@ -357,14 +358,14 @@ def do_show_status(series, patch_for_commit, show_comments, new_rtag_list, if not patch: continue terminal.tprint('%3d %s' % (patch.seq, patch.subject[:50]), - colour=col.BLUE) + colour=col.YELLOW, col=col) cmt = series.commits[seq] base_rtags = cmt.rtags new_rtags = new_rtag_list[seq] indent = ' ' * 2 - show_responses(base_rtags, indent, False) - num_to_add += show_responses(new_rtags, indent, True) + show_responses(col, base_rtags, indent, False) + num_to_add += show_responses(col, new_rtags, indent, True) if show_comments: for review in review_list[seq]: terminal.tprint('Review: %s' % review.meta, colour=col.RED) |