summaryrefslogtreecommitdiff
path: root/tools/patman/control.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/control.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/control.py')
-rw-r--r--tools/patman/control.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/patman/control.py b/tools/patman/control.py
index 7a5469add1b..6ac258d41d7 100644
--- a/tools/patman/control.py
+++ b/tools/patman/control.py
@@ -176,11 +176,11 @@ def send(args):
args.limit, args.dry_run, args.in_reply_to, args.thread,
args.smtp_server)
-def patchwork_status(branch, count, start, end):
+def patchwork_status(branch, count, start, end, dest_branch, force):
"""Check the status of patches in patchwork
This finds the series in patchwork using the Series-link tag, checks for new
- comments / review tags and displays them
+ review tags, displays then and creates a new branch with the review tags.
Args:
branch (str): Branch to create patches from (None = current)
@@ -189,6 +189,9 @@ def patchwork_status(branch, count, start, end):
start (int): Start partch to use (0=first / top of branch)
end (int): End patch to use (0=last one in series, 1=one before that,
etc.)
+ dest_branch (str): Name of new branch to create with the updated tags
+ (None to not create a branch)
+ force (bool): With dest_branch, force overwriting an existing branch
Raises:
ValueError: if the branch has no Series-link value
@@ -220,4 +223,4 @@ def patchwork_status(branch, count, start, end):
# 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])
+ status.check_patchwork_status(series, found[0], branch, dest_branch, force)