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 ms9.migadu.com with LMTPS id oAIVKvgMgmQ+qAAASxT56A (envelope-from ) for ; Thu, 08 Jun 2023 19:16:40 +0200 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 6B8pKfgMgmTClAAAG6o9tA (envelope-from ) for ; Thu, 08 Jun 2023 19:16:40 +0200 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 CDCA09ED0 for ; Thu, 8 Jun 2023 19:16:39 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q7JF2-0003UD-R7; Thu, 08 Jun 2023 13:16:08 -0400 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 1q7JEx-0003Rl-KA for guix-patches@gnu.org; Thu, 08 Jun 2023 13:16:04 -0400 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 1q7JEx-0007j1-Bc for guix-patches@gnu.org; Thu, 08 Jun 2023 13:16:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q7JEw-0008PS-TN; Thu, 08 Jun 2023 13:16:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63802] [PATCH 3/3] client: Use mumi git-send-email-headers subcommand. Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: arunisaac@systemreboot.net, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Thu, 08 Jun 2023 17:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63802 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63802@debbugs.gnu.org Cc: Arun Isaac , Arun Isaac , Maxim Cournoyer X-Debbugs-Original-Xcc: Arun Isaac , Maxim Cournoyer Received: via spool by 63802-submit@debbugs.gnu.org id=B63802.168624453132253 (code B ref 63802); Thu, 08 Jun 2023 17:16:02 +0000 Received: (at 63802) by debbugs.gnu.org; 8 Jun 2023 17:15:31 +0000 Received: from localhost ([127.0.0.1]:57434 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7JEQ-0008O9-QJ for submit@debbugs.gnu.org; Thu, 08 Jun 2023 13:15:31 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:53350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7JEM-0008NZ-MW for 63802@debbugs.gnu.org; Thu, 08 Jun 2023 13:15:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=BlHu1DbWh0/7hHaMnRwnNVITcHXrUy8CcqxuzBbAH98=; b=p71JYVPGZSnMh/ceryS2s+aqWI dZbgAget+elAjfBe45d9KUNHpP8NdLanRsrReXXE6JiGBUEMZIq8VGH2KbDmGHM1vok4xRfmM7ujN +1tmtpylLxZOiVEWI4XPhqhw8HwQnGOQWg20re+RP/tsyJzHOQ0FPxRLuA1usrOIlifI/1ZeIGlob Ry7IeeyfCOF85Me5k3zjrB8AkxmGMkTIsst9hSvrQaaUQrtIIaG6AC7WVSNudhr7KGaeWkulE1htb nbPoSgqITSfvIZmeqYh7tznqGHGdQ1ubVJbwm2gfjkqshqXw8riqQSBAh0P951LtyetMlVWcTCxnH xeW5N1RA==; Received: from [192.168.2.1] (port=42546 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1q7JEJ-000UaF-1Z; Thu, 08 Jun 2023 18:15:24 +0100 From: Arun Isaac Date: Thu, 8 Jun 2023 18:14:52 +0100 Message-Id: <20230608171453.14788-3-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230608171453.14788-1-arunisaac@systemreboot.net> References: <20230608171453.14788-1-arunisaac@systemreboot.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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=1686244600; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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=BlHu1DbWh0/7hHaMnRwnNVITcHXrUy8CcqxuzBbAH98=; b=lFQj2jWyyxpq0s/KmjtVL12hUy1HMhudU86EEl/XxBIb6nMsmV/+KEV4u7JQs/qAMFxP6F RIMuQ0yDI87pQc24lw5cZvryfH/XU3FkanGuKo+VpK3UFWA/FaFv8uJGFl4dYgmqAz8bWm iP0vDuwJP2ARrDLWMIyVWQyknNda78kue66614utPBfLbJHW1vPvJLmRmOvfOuyamjg6Ve hml1/uhIFoP/Yot/tev6YhxZzjVSn8PpRwR0sacPOVngiCXY00cFEIgY2IF8a+m1FKlB11 jWAt6Fgpn3EgR8g/wbr/uVu/VA0WYP4gqkdlzXHu8wioBuzkNN8+2AKIaUOAAg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b=p71JYVPG; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=none); 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1686244600; a=rsa-sha256; cv=none; b=UZsCmwhb4012F+yOjwt/f0jDLIc5esZapgBppvc76iYqYLGB62Bt+gLacboWNr1532UgL9 7/Zp2Ghlno5/JuiLNAYaIN/BmPGAv6yH3tyrlvBdCS7QpS9fECXU1ZhWkK4hmRBLW5KoQl GRGsnQ6A+CKp3a2eQdRBvFT/0pptozsF2H5QPo+ivlUbNVlLDGMCJhK4EJZDMWddSZ57IN a/Yd7BAk7CJeS58qeCxX9CxX/5TcjJAb+d/8x77T+Kwl3GABp2yq2OnoGTzlfc7+T35ffu TTy5xakSGRgWAxkSx5ueMxX3kEI4gdKLC6ubIbWhdWB7Q5CtdQvqU7HTNAFnwg== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: 0.90 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b=p71JYVPG; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=none); 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" X-Migadu-Queue-Id: CDCA09ED0 X-Spam-Score: 0.90 X-TUID: K5+hk3wQV2uf * mumi/client.scm (send-email): Accept mumi-arg0 argument and use it to construct --header-cmd. * scripts/mumi.in: Pass arg0 to send-email. * tests/client.scm ("send patches to new issue", "send patches to existing issue", "send single patch to new issue", "send single patch to existing issue", "send patch to existing issue and Cc other participants"): Adjust tests. --- mumi/client.scm | 9 ++++++--- scripts/mumi.in | 2 +- tests/client.scm | 17 ++++++++++++++--- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/mumi/client.scm b/mumi/client.scm index b89e608..1fe9d2c 100644 --- a/mumi/client.scm +++ b/mumi/client.scm @@ -293,8 +293,9 @@ ISSUE-NUMBER." (() (list)) (cc (list (cons 'cc (string-join cc ", ")))))))) -(define (send-email patches) - "Send PATCHES via email." +(define (send-email mumi-arg0 patches) + "Send PATCHES via email. MUMI-ARG0 is the mumi program currently +invoked." (if (current-issue-number) ;; If an issue is current, send patches to that issue's email ;; address. @@ -302,7 +303,9 @@ ISSUE-NUMBER." (git-send-email (string-append (number->string issue-number) "@" (client-config 'debbugs-host)) - patches)) + patches + (list (string-append "--header-cmd=" + mumi-arg0 " git-send-email-headers")))) (match patches ;; If it's a single patch, send it to the patch email address ;; and be done with it diff --git a/scripts/mumi.in b/scripts/mumi.in index 8fb7cd4..5b98634 100644 --- a/scripts/mumi.in +++ b/scripts/mumi.in @@ -162,7 +162,7 @@ (("new") (client:clear-current-issue!)) (("send-email" . patches) - (client:send-email patches)) + (client:send-email (car (program-arguments)) patches)) (("git-send-email-headers" patch) (client:git-send-email-headers patch)) (("mailer" . rest) diff --git a/tests/client.scm b/tests/client.scm index ced573b..d28bc1a 100644 --- a/tests/client.scm +++ b/tests/client.scm @@ -99,10 +99,13 @@ called with." (const 12345)) client-config-stub) (cut (@@ (mumi client) send-email) + "mumi" (list "foo.patch" "bar.patch" "foobar.patch"))))))) (test-equal "send patches to existing issue" - '(("git" "send-email" "--to=12345@example.com" "foo.patch" "bar.patch" "foobar.patch")) + '(("git" "send-email" "--to=12345@example.com" + "--header-cmd=mumi git-send-email-headers" + "foo.patch" "bar.patch" "foobar.patch")) (map (match-lambda ((command _) command)) (trace-calls (var@@ (mumi client) call-with-input-pipe*) @@ -114,6 +117,7 @@ called with." client-config-stub do-not-poll-server-for-issue-number) (cut (@@ (mumi client) send-email) + "mumi" (list "foo.patch" "bar.patch" "foobar.patch"))))))) (test-equal "send single patch to new issue" @@ -127,10 +131,13 @@ called with." client-config-stub do-not-poll-server-for-issue-number) (cut (@@ (mumi client) send-email) + "mumi" (list "foo.patch"))))))) (test-equal "send single patch to existing issue" - '(("git" "send-email" "--to=12345@example.com" "foo.patch")) + '(("git" "send-email" "--to=12345@example.com" + "--header-cmd=mumi git-send-email-headers" + "foo.patch")) (map (match-lambda ((command _) command)) (trace-calls (var@@ (mumi client) call-with-input-pipe*) @@ -142,10 +149,13 @@ called with." client-config-stub do-not-poll-server-for-issue-number) (cut (@@ (mumi client) send-email) + "mumi" (list "foo.patch"))))))) (test-equal "send patch to existing issue and Cc other participants" - '(("git" "send-email" "--to=12345@example.com" "foo.patch")) + '(("git" "send-email" "--to=12345@example.com" + "--header-cmd=mumi git-send-email-headers" + "foo.patch")) (map (match-lambda ((command _) command)) (trace-calls (var@@ (mumi client) call-with-input-pipe*) @@ -157,6 +167,7 @@ called with." client-config-stub do-not-poll-server-for-issue-number) (cut (@@ (mumi client) send-email) + "mumi" (list "foo.patch"))))))) (test-end "client") -- 2.39.2