From patchwork Wed Mar 30 17:40:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 1611442 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org; envelope-from=patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KTMdB3gfvz9sBy for ; Thu, 31 Mar 2022 10:11:42 +1100 (AEDT) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4KTMd963fCz2yHZ for ; Thu, 31 Mar 2022 10:11:41 +1100 (AEDT) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=209.85.210.45; helo=mail-ot1-f45.google.com; envelope-from=robherring2@gmail.com; receiver=) Received: from mail-ot1-f45.google.com (mail-ot1-f45.google.com [209.85.210.45]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4KTDH25PRTz2yb7 for ; Thu, 31 Mar 2022 04:40:28 +1100 (AEDT) Received: by mail-ot1-f45.google.com with SMTP id i11-20020a9d4a8b000000b005cda3b9754aso15384466otf.12 for ; Wed, 30 Mar 2022 10:40:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jtKiKcA6swGWm+oSihAKDLUttjNnI3uPc2CmCchnr9I=; b=K4ZtfESiRWQvCIl/EvhIw5DHJ0Y8VqL9y4yNd1lKbkp+Ej22QZeOKoiRWSw0nHkQmF dOXYFnc3ptou4k4nRjW/3FzCFQUYu7hdJZd+pgbzfSGbUL0/NI6JuUdgJD/+nDyNV+M9 5uFaRS9P1FMd+VA/PaOG6NNMS+lYHYPimSd1MJoD4tVz1SjaL+/YS20QOcI8i4FhJCAb 73VAhRio7iUmsYAZqPFHwnxvl+2Cs4SZ4tLMs3N17HZIsKmNEaOm3I9MdQ40FEuIB5TR xytHXvhW+M45PICej6GUUVMoSaniet/S7nPwdzfSVcoRx2YIvxHjFWNkjzgGLzVfH9Fv AMMg== X-Gm-Message-State: AOAM5321t9LVQZLhrYEvI+JG5z2MOemjnYox2zoiDe/U1XkupWgHz4tp 33jBN5e/7ZeSt6vO4U2lofNgmCjThg== X-Google-Smtp-Source: ABdhPJxyc8cFQH3g0a5ZDV4aY9etrlTXnbQcPXtXwe9KIJnGHSPbG3jeVMiLNi7FKvW8J5q3p1rEgw== X-Received: by 2002:a9d:454c:0:b0:5b2:3757:9fc6 with SMTP id p12-20020a9d454c000000b005b237579fc6mr3785288oti.314.1648662025549; Wed, 30 Mar 2022 10:40:25 -0700 (PDT) Received: from xps15.. (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.googlemail.com with ESMTPSA id s10-20020a4a3b0a000000b0032486bc11d0sm10637042oos.39.2022.03.30.10.40.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 10:40:25 -0700 (PDT) From: Rob Herring To: patchwork@lists.ozlabs.org Subject: [PATCH] Align check-get with other commands operating on patch IDs Date: Wed, 30 Mar 2022 12:40:24 -0500 Message-Id: <20220330174024.3315089-1-robh@kernel.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 31 Mar 2022 10:11:40 +1100 X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" check-get doesn't support specifying the project and doesn't support more than one patch ID like other commands which take patch ID as an argument. Align check-get with other commands like view and get. Cc: Olof Johansson Signed-off-by: Rob Herring Reviewed-by: Stephen Finucane --- man/pwclient.1 | 2 +- pwclient/parser.py | 5 +---- pwclient/shell.py | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/man/pwclient.1 b/man/pwclient.1 index 63bf78e10442..1ff784f0a3e4 100644 --- a/man/pwclient.1 +++ b/man/pwclient.1 @@ -130,7 +130,7 @@ usage: pwclient projects [-h] .SH OPTIONS 'pwclient check-get' -usage: pwclient check-get [-f FORMAT] PATCH_ID +usage: pwclient check-get [--help] [-h] [-p PROJECT] [-f FORMAT] PATCH_ID [PATCH_ID ...] .TP \fBPATCH_ID\fR diff --git a/pwclient/parser.py b/pwclient/parser.py index 54c9bdd22ff7..1efedd233766 100644 --- a/pwclient/parser.py +++ b/pwclient/parser.py @@ -112,12 +112,9 @@ installed locales. projects_parser.set_defaults(subcmd='projects') check_get_parser = subparsers.add_parser( - 'check-get', add_help=False, + 'check-get', parents=[hash_parser], conflict_handler='resolve', help="get checks for a patch" ) - check_get_parser.add_argument( - 'patch_id', metavar='PATCH_ID', action='store', type=int, - help="patch ID") check_get_parser.add_argument( '-f', '--format', metavar='FORMAT', help=("print output in the given format. You can use tags matching " diff --git a/pwclient/shell.py b/pwclient/shell.py index 02165badcfa8..762836c3c417 100644 --- a/pwclient/shell.py +++ b/pwclient/shell.py @@ -212,9 +212,9 @@ def main(argv=sys.argv[1:]): commit=args.commit_ref) elif action == 'check_get': - patch_id = args.patch_id format_str = args.format - checks.action_get(rpc, patch_id, format_str) + for patch_id in patch_ids: + checks.action_get(rpc, patch_id, format_str) elif action == 'check_list': checks.action_list(rpc)