summaryrefslogtreecommitdiff
path: root/tools/patman/main.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-10-29 21:46:36 -0600
committerSimon Glass <sjg@chromium.org>2020-11-05 09:11:31 -0700
commit8f9ba3ab56c49880fb13fc483493b635f787627c (patch)
treeb83166cab86194a61fa68b982a31e73309e42a8b /tools/patman/main.py
parentdc6df972c9ee2afefd937bee3771865012daccef (diff)
patman: Support updating a branch with review tags
It is tedious to add review tags into the local branch and errors can sometimes be made. Add an option to create a new branch with the review tags obtained from patchwork. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/main.py')
-rwxr-xr-xtools/patman/main.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/patman/main.py b/tools/patman/main.py
index 7f4ae1125a1..8f139a6e3ba 100755
--- a/tools/patman/main.py
+++ b/tools/patman/main.py
@@ -92,6 +92,10 @@ AddCommonArgs(test_parser)
status = subparsers.add_parser('status',
help='Check status of patches in patchwork')
+status.add_argument('-d', '--dest-branch', type=str,
+ help='Name of branch to create with collected responses')
+status.add_argument('-f', '--force', action='store_true',
+ help='Force overwriting an existing branch')
AddCommonArgs(status)
# Parse options twice: first to get the project and second to handle
@@ -166,7 +170,8 @@ elif args.cmd == 'send':
elif args.cmd == 'status':
ret_code = 0
try:
- control.patchwork_status(args.branch, args.count, args.start, args.end)
+ control.patchwork_status(args.branch, args.count, args.start, args.end,
+ args.dest_branch, args.force)
except Exception as e:
terminal.Print('patman: %s: %s' % (type(e).__name__, e),
colour=terminal.Color.RED)