[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#60218] [PATCH 1/2] teams: Add a "get-maintainer" command.
From: |
Ricardo Wurmus |
Subject: |
[bug#60218] [PATCH 1/2] teams: Add a "get-maintainer" command. |
Date: |
Sun, 25 Dec 2022 00:15:39 +0100 |
User-agent: |
mu4e 1.8.13; emacs 28.2 |
Hi Maxim,
> This can be used as a compatibility mode with the get_maintainer.pl Perl
> script included in the Linux (or U-Boot) source tree.
>
> * etc/teams.scm.in (git-patch->commit-id): New procedure.
> (main) <get-maintainer>: Register new command. Document it.
Interesting.
> @@ -616,6 +627,14 @@ (define (main . args)
> (("cc-members" rev-start rev-end)
> (apply cc (find-team-by-scope
> (diff-revisions rev-start rev-end))))
> + (("get-maintainer" patch-file)
> + (let* ((rev-end (git-patch->commit-id patch-file))
> + (rev-start (string-append rev-end "^")))
This is to get the changes introduced by this patch-file right? In a
format that allows you to use “diff-revisions” below, which you need to
run find-team-by-scope.
> + (apply main "list-members"
> + (map symbol->string
> + (map team-id
> + (find-team-by-scope
> + (diff-revisions rev-start rev-end)))))))
Here I’d do
(map (compose symbol->string team-id) …)
instead of mapping twice.
I haven’t used get_maintainer.pl before, but I don’t object to this
change if it’s useful to you.
--
Ricardo
[bug#60218] [PATCH v2 1/3] teams: Add a "get-maintainer" command., Maxim Cournoyer, 2022/12/27