Module: Mesa Branch: main Commit: c6ef161bc14894b0622a659e73893e997c61dd47 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c6ef161bc14894b0622a659e73893e997c61dd47
Author: Eric Engestrom <[email protected]> Date: Mon Nov 6 18:10:57 2023 +0000 bin/gitlab_gql: only allow a single `--print-*` argument per invocation Printing multiple things as the same time is not really usable, so let's be explicit and only allow one at a time, which allows a few cleanups in the code. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26143> --- bin/ci/gitlab_gql.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/bin/ci/gitlab_gql.py b/bin/ci/gitlab_gql.py index f4c76a947fc..211f9bc3ee2 100755 --- a/bin/ci/gitlab_gql.py +++ b/bin/ci/gitlab_gql.py @@ -482,13 +482,18 @@ def parse_args() -> Namespace: required=False, help="Regex pattern for the job name to be considered", ) - parser.add_argument("--print-dag", action="store_true", help="Print job needs DAG") - parser.add_argument( + mutex_group_print = parser.add_mutually_exclusive_group() + mutex_group_print.add_argument( + "--print-dag", + action="store_true", + help="Print job needs DAG", + ) + mutex_group_print.add_argument( "--print-merged-yaml", action="store_true", help="Print the resulting YAML for the specific SHA", ) - parser.add_argument( + mutex_group_print.add_argument( "--print-job-manifest", type=str, help="Print the resulting job data" ) parser.add_argument(
