From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uBNdEyeKp2OdPQAAbAwnHQ (envelope-from ) for ; Sun, 25 Dec 2022 00:24:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id WFaZEieKp2MiogAAG6o9tA (envelope-from ) for ; Sun, 25 Dec 2022 00:24:23 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 15283B20B for ; Sun, 25 Dec 2022 00:24:23 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p9Ds3-0004oO-Mp; Sat, 24 Dec 2022 18:24:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p9Ds2-0004o9-IH for guix-patches@gnu.org; Sat, 24 Dec 2022 18:24:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p9Ds2-000787-7H for guix-patches@gnu.org; Sat, 24 Dec 2022 18:24:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p9Ds1-0001ad-Vb for guix-patches@gnu.org; Sat, 24 Dec 2022 18:24:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60218] [PATCH 1/2] teams: Add a "get-maintainer" command. Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 24 Dec 2022 23:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60218 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: Josselin Poiret , Tobias Geerinckx-Rice , Simon Tournier , Mathieu Othacehe , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Christopher Baines , 60218@debbugs.gnu.org Received: via spool by 60218-submit@debbugs.gnu.org id=B60218.16719242066032 (code B ref 60218); Sat, 24 Dec 2022 23:24:01 +0000 Received: (at 60218) by debbugs.gnu.org; 24 Dec 2022 23:23:26 +0000 Received: from localhost ([127.0.0.1]:47308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p9DrS-0001ZD-1F for submit@debbugs.gnu.org; Sat, 24 Dec 2022 18:23:26 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21157) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p9DrQ-0001Z1-A7 for 60218@debbugs.gnu.org; Sat, 24 Dec 2022 18:23:24 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1671924193; cv=none; d=zohomail.com; s=zohoarc; b=lZAc7/KTgb/XYyPyD9WpDREnTWZO7nnOQ58FPH4AjxbKQ3sKxwbhhEJCgDdFn/8kue0YcdhIlbP+wYy6PveEPrvZIYh7Ielh5Xi6uXCs39MdISt3w18tcDrpcVit3njXZ38w2WXmZtDQjDD7ehj1o3Xag3VmbOmUfKLlhX5OzO0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1671924193; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=3Rh9v4ovj5CQIYdtMwgi97xSbSnYfGmZF1N2fwYQiHw=; b=Oh85d23F9tpZnc7R8/uMOWojZ+h42Eb04qylFIUREAtKUziP2HvJ+ONzDfEw6GH5d6qJIborQSXVoD9uMPXlMq15s9UXD6s+TpQlNKoARXusjUYjbJynka4P4pHF7W6QF0f267Iha34zXrhZRo29t58WqZYrc+QFqakO9+pc9pI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1671924193; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=3Rh9v4ovj5CQIYdtMwgi97xSbSnYfGmZF1N2fwYQiHw=; b=TwYm6eYhIgRpJteo7wuqTl328kMR7zbAxarFAIhmyvY0lEzob+DdFU4/suSXxXn6 6gttagj6I8sYypYM+zmr24riBQzOVDhIXyEClE60c+QgN/8yDctMbpFkNxDwtaP6QCP BPEqeo0C2bK0Hn2yD2b7oL609f4nTJ0OwihrvwO0= Received: from localhost (48-111-142-46.pool.kielnet.net [46.142.111.48]) by mx.zohomail.com with SMTPS id 1671924192504176.84511553363586; Sat, 24 Dec 2022 15:23:12 -0800 (PST) References: <20221220141330.30372-1-maxim.cournoyer@gmail.com> User-agent: mu4e 1.8.13; emacs 28.2 From: Ricardo Wurmus Date: Sun, 25 Dec 2022 00:15:39 +0100 In-reply-to: <20221220141330.30372-1-maxim.cournoyer@gmail.com> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Message-ID: <87tu1kbd43.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=2; s=key1; d=yhetil.org; t=1671924263; a=rsa-sha256; cv=fail; b=Q+dAIBwtKKfQoVTuT7dwiVGHlPnGNI2C2B8rrLe4CnLLo1/ZDJGOr1hoO9FYBGINxPED7k m+6hi22zXUgseqCZCVJDa3jqlLGI0iezRGBBAA6wDxjmNqx5YskmIN6RIAGKrP4hroqQPM q898RsV7mbAwV1nAoHHKTnBi7wJPgqqNq+o52J8LPFuw3k4yCmuVAIwT/W4pJXcp6dloag NdXSuYjTZaZOifw3hzJ69H+ONfGaJQMbwAyz3URtkAt7nuxKIEKKfiedh/ZA8u4omIae4v 56NfzylfEXm8MwzYO8BeeAf3qXa2Dmv2XSXJM6ESWVsmYAaVOr3QmsnrOf9yRQ== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=elephly.net header.s=zoho header.b=TwYm6eYh; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1671924263; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=3Rh9v4ovj5CQIYdtMwgi97xSbSnYfGmZF1N2fwYQiHw=; b=tS9QqIu1SE50FPGChy8bofoAIw2nWRUwItGDIOUqrULkjZG4OfMxKYMYXh1XAV1AG+ebeD yDx/kn3RUfNFaVMZ21Evc2FmO3FcCAHsqGqtEgs0UaHTjBJCJM3ZGmPI6rBETmIaxC1r76 Erpyw69reRbBI8YprFGGZY3StdCreOPgysEOPIcd+ooosd5PNInXAeNlaw1T40USgq7lzt 1qLuyu43bgF12XSgzoXR63DU25i4yqoNI61+g0U339CGurVfY9Qt8wtFf7phi9Xf9CDPNd 1D9io67wr3lML+ICxBdgxFJdUziaPYArabU5uHKWUwEhGwQGipqo63f3FO68eg== X-Spam-Score: 0.49 X-Migadu-Queue-Id: 15283B20B Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=elephly.net header.s=zoho header.b=TwYm6eYh; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}") X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: 0.49 X-TUID: MAO2BPxK5vhR 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) : 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 =E2=80=9Cdiff-revisions=E2=80=9D 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=E2=80=99d do (map (compose symbol->string team-id) =E2=80=A6) instead of mapping twice. I haven=E2=80=99t used get_maintainer.pl before, but I don=E2=80=99t object= to this change if it=E2=80=99s useful to you. --=20 Ricardo