From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id aGR2HHpkqmNOcwEAbAwnHQ (envelope-from ) for ; Tue, 27 Dec 2022 04:20:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id uGiBHHpkqmPSZwAAauVa8A (envelope-from ) for ; Tue, 27 Dec 2022 04:20:26 +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 523C61EF68 for ; Tue, 27 Dec 2022 04:20:26 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pA0VY-0007aK-DE; Mon, 26 Dec 2022 22:20:04 -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 1pA0VW-0007aB-Vd for guix-patches@gnu.org; Mon, 26 Dec 2022 22:20:03 -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 1pA0VW-0008DE-Ly for guix-patches@gnu.org; Mon, 26 Dec 2022 22:20:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pA0VW-0003B7-Hp for guix-patches@gnu.org; Mon, 26 Dec 2022 22:20:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60218] [PATCH 1/2] teams: Add a "get-maintainer" command. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 27 Dec 2022 03:20:02 +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: Ricardo Wurmus 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.167211119412197 (code B ref 60218); Tue, 27 Dec 2022 03:20:02 +0000 Received: (at 60218) by debbugs.gnu.org; 27 Dec 2022 03:19:54 +0000 Received: from localhost ([127.0.0.1]:54436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pA0VO-0003Af-1I for submit@debbugs.gnu.org; Mon, 26 Dec 2022 22:19:54 -0500 Received: from mail-qv1-f42.google.com ([209.85.219.42]:39838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pA0VK-0003AQ-Nm for 60218@debbugs.gnu.org; Mon, 26 Dec 2022 22:19:53 -0500 Received: by mail-qv1-f42.google.com with SMTP id db16so3027221qvb.6 for <60218@debbugs.gnu.org>; Mon, 26 Dec 2022 19:19:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=aSamRnJLWsNI7tcq4FY6wFJiIXyoT0i6w80a7jTWcZI=; b=IYXFAZShVS3EhXjrnza2sINUoMfHXH4G3o8u13olSQ9RkqiVcJhPMQjR/s77heRn3H RcImWYuRtRcOGgmI26E0JUa92xFUqdaRMFT4cBeL8AkqpCwpf12ZGwjgEWngBjxSRwpy mmym+qf7J6y74ofQu013T73sBtdYJexfufypYZrdl9fLnC+xo4bNmJScjA4byr+36k7O 2UcaZ0KvyY3W0WAFvXJvHMU/lty3dcq+JHPiPbrxOHBrDqADP6rw//qMFHf7msxEVAqi MjrJrRFlqGEX277ndB9GZR+dDrHn/84GJp7ZThVwYDAAQEiH52ssv7Ya2dG940lBQMT9 qpdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=aSamRnJLWsNI7tcq4FY6wFJiIXyoT0i6w80a7jTWcZI=; b=V0dEEyki5PNrkUjWxiMayDStmEy86VW/hk8WRW+yP4PSf3FBrdm9t96xDT0NiqGmaT REoU/KLgGifYsXNMbWttBtQYhHroltE/tKRHJBPmC8DhCeycQfjiEYf/dZKlVoraAv34 VrNJNNufOmxid2dWzPNjTIqOdSB63fc11FXxISu3nxG4H2Ygsu3xvQqA7NydBGQA1B2i XaqTlYJzmYPwyJ8SVlYybLC+GypQUmuGwYj22MvrTkuF8dzvVPv9LG4wQU4Yc//L2cK3 +Mm1Q2LPaxKYlm4kk0aU6Qj9B25hsVaGZbi0CQQS1HjtRLLd4RQSBUgmuUAprTT2g3q/ SDGg== X-Gm-Message-State: AFqh2krk8788KYm96F6oqamT5453fEDd5WCO1tTIxef6s0uNQ9Q5oG7V F5qE6swdDtMkXyDx4ibZmC8= X-Google-Smtp-Source: AMrXdXu4rMBOPcfIZjAO5JvTqOhIiwKJLYurXknV7n4lWBd63sDhL4Zc2HwE99upLMKr5mwGDwRpfw== X-Received: by 2002:a05:6214:3608:b0:531:8652:43a0 with SMTP id nv8-20020a056214360800b00531865243a0mr6078393qvb.27.1672111185185; Mon, 26 Dec 2022 19:19:45 -0800 (PST) Received: from hurd (dsl-10-129-132.b2b2c.ca. [72.10.129.132]) by smtp.gmail.com with ESMTPSA id q22-20020a05620a0d9600b006eee3a09ff3sm6526qkl.69.2022.12.26.19.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Dec 2022 19:19:44 -0800 (PST) From: Maxim Cournoyer References: <20221220141330.30372-1-maxim.cournoyer@gmail.com> <87tu1kbd43.fsf@elephly.net> Date: Mon, 26 Dec 2022 22:19:43 -0500 In-Reply-To: <87tu1kbd43.fsf@elephly.net> (Ricardo Wurmus's message of "Sun, 25 Dec 2022 00:15:39 +0100") Message-ID: <87cz858re8.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1672111226; 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=aSamRnJLWsNI7tcq4FY6wFJiIXyoT0i6w80a7jTWcZI=; b=ddZlVq5QWsMBbtaesOExsYCFawi0MX6czWsYSF3OtHleU9xR2Y5Bwfp2RKwLfb8OjymID9 0pIjbbEE7Z3qdONKXebKOzHqezg8Ik6L7x+EbPEh7bgd0XqhpPIqqJ0111gR61HV2L4/4L BBaYkkKdQl9txUtT4t8rUzFv3K3HQ1BeXm1zWTXbpY611itSa7t6cNxgo271amkVcO2POT HFcpQ8XM7hD6MjZCWpWGowK3Kc09/mHCOgzI29+662Bn8Qc8RWFctSj4ylpccx8Jo4REv/ XOUBCZyCIBY2JL4WS8dBMudOmGo/Pk5QGiOA4IcEzAbMEhAcxlhcc0hm8xhgNQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=IYXFAZSh; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1672111226; a=rsa-sha256; cv=none; b=ihF4Ic0qMqXaTvrTeByfyiFQA6lB9utk+YLAEHOavExPy2TDIjHY4jI1UqLlr72iRwIRqN e+9Vu73m3DxBx55/vejxG0Hiy0OqPjTknjNB4II9iTRvN8U6kVGmPyIcGzU5qR6pHYx609 vA8525TkDSzofceyIMEmxmvE7J95KXiZxR4gQpXIcQyCEP/DYKVpuA9Jnmobzi+optvyp5 5iLIPzNcJzTfte7UkdxiaUzOOx6DUaEcLiGFrqHNe/m8rbGGbj0FNIfq4/mOPEaDLCajO9 u8Vc1nZDr2zd/yZDVhJ4hLzc+zfjw2agFYO1/8R8Wwtrbpxc3ztiFYqx4TSPZw== X-Spam: Yes X-Migadu-Queue-Id: 523C61EF68 X-Migadu-Spam: Yes X-Spam-Score: 8.97 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=IYXFAZSh; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: 8.97 X-TUID: W/P4IfMxrtnA Hi Ricardo, Ricardo Wurmus 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) : 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, whi= ch 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=E2=80=99d do > > (map (compose symbol->string team-id) =E2=80=A6) > > instead of mapping twice. Thanks, that's better. Adjusted locally. > I haven=E2=80=99t used get_maintainer.pl before, but I don=E2=80=99t obje= ct to this > change if it=E2=80=99s 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! --=20 Maxim