GNU bug report logs - #60218
[PATCH 0/2] New teams.scm 'get-maintainer' command (for integration with patman)

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Tue, 20 Dec 2022 13:59:01 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: Josselin Poiret <dev <at> jpoiret.xyz>, Tobias Geerinckx-Rice <me <at> tobias.gr>, Simon Tournier <zimon.toutoune <at> gmail.com>, Mathieu Othacehe <othacehe <at> gnu.org>, Ludovic Courtès <ludo <at> gnu.org>, Christopher Baines <mail <at> cbaines.net>, 60218 <at> debbugs.gnu.org
Subject: [bug#60218] [PATCH 1/2] teams: Add a "get-maintainer" command.
Date: Mon, 26 Dec 2022 22:19:43 -0500
Hi Ricardo,

Ricardo Wurmus <rekado <at> elephly.net> writes:

> 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.

Yes!  The get-maintainer.pl script expects a single patch file rather
than two git refspecs.

>> +       (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.

Thanks, that's better.  Adjusted locally.

> I haven’t used get_maintainer.pl before, but I don’t object to this
> change if it’s useful to you.

It's useful in conjunction with patman (which is patch 2/2 of this
series), which can be configured to use a get-maintainer like script to
retrieve the people it should CC based on the patches it can 'git
send-email' for you.  If nobody else has a say, I'll push in about a
week.

Thanks for taking a look!

-- 
Maxim




This bug report was last modified 2 years and 132 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.