From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id FJ/ZNMJpr18DZQAA0tVLHw (envelope-from ) for ; Sat, 14 Nov 2020 05:23:14 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id qNdtMMJpr1+VFAAAB5/wlQ (envelope-from ) for ; Sat, 14 Nov 2020 05:23:14 +0000 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 694389402C8 for ; Sat, 14 Nov 2020 05:23:13 +0000 (UTC) Received: from localhost ([::1]:46074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kdo1m-0001d0-TB for larch@yhetil.org; Sat, 14 Nov 2020 00:23:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44234) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kdo1e-0001cq-Ua for guix-patches@gnu.org; Sat, 14 Nov 2020 00:23:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:38097) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kdo1e-0000gH-IE for guix-patches@gnu.org; Sat, 14 Nov 2020 00:23:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kdo1e-0005IW-EZ for guix-patches@gnu.org; Sat, 14 Nov 2020 00:23:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#44625] [PATCH] gnu: Add b4. Resent-From: Kyle Meyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 14 Nov 2020 05:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44625 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: zimoun Cc: 44625@debbugs.gnu.org Received: via spool by 44625-submit@debbugs.gnu.org id=B44625.160533135320312 (code B ref 44625); Sat, 14 Nov 2020 05:23:02 +0000 Received: (at 44625) by debbugs.gnu.org; 14 Nov 2020 05:22:33 +0000 Received: from localhost ([127.0.0.1]:49643 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdo1B-0005HY-7o for submit@debbugs.gnu.org; Sat, 14 Nov 2020 00:22:33 -0500 Received: from pb-smtp1.pobox.com ([64.147.108.70]:53667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kdo18-0005HP-S3 for 44625@debbugs.gnu.org; Sat, 14 Nov 2020 00:22:32 -0500 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id ACB26A39D2; Sat, 14 Nov 2020 00:22:29 -0500 (EST) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:in-reply-to:references:date:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=g2ekb3+RhaZ7 KffL4ssUt5pRCBI=; b=RBZRZKQrhhpW0+8qvz/F7QN1oLbVtZ6f8K4o/ZnPtUtu ChcswSjPGqy2/FrOiK2J/Oe208mXpL1Np094DsDozda7DFU+YxEg0jNYWfRQie0o KHNzYTNzkb0ajMsKeNe56XCv2kdTQ5Mg/Ec5aptkT+ocnCoHC66wh/MToYpqXUA= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id A532EA39D1; Sat, 14 Nov 2020 00:22:29 -0500 (EST) (envelope-from kyle@kyleam.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=kyleam.com; h=from:to:cc:subject:in-reply-to:references:date:message-id:mime-version:content-type:content-transfer-encoding; s=mesmtp; bh=MjIgdW+FBEelec/wm2ZuXljwA7gR4cS7ddsBzbv+spA=; b=ZV5M8D4GnlskN/Ot8R1HQ0G7zwhHmvJh6mO1W23rtt2KCm7wH+gWcHeZYeHF6itxQxxJnJSomHNkMURhDN5eC/Ht99SD3W827FS1QQAkdN9FIcRIPGdf4msU0QvsA4OrGSFiOJhXIqYJmaEKbB8oJZR1C+VEZENmlZ8HV/rD1Og= Received: from localhost (unknown [45.33.91.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 355C7A39D0; Sat, 14 Nov 2020 00:22:29 -0500 (EST) (envelope-from kyle@kyleam.com) From: Kyle Meyer In-Reply-To: <86ima8d6rh.fsf@tournier.info> References: <20201114003906.25111-1-kyle@kyleam.com> <86ima8d6rh.fsf@tournier.info> Date: Sat, 14 Nov 2020 00:22:28 -0500 Message-ID: <87wnyo5x7v.fsf@kyleam.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Pobox-Relay-ID: 63AE75B8-2639-11EB-92F5-D152C8D8090B-24757444!pb-smtp1.pobox.com X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.7 (-) 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" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=pobox.com header.s=sasl header.b=RBZRZKQr; dkim=fail (headers rsa verify failed) header.d=kyleam.com header.s=mesmtp header.b=ZV5M8D4G; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -0.01 X-TUID: EYD0c4QXX9AL zimoun writes: > On Fri, 13 Nov 2020 at 19:39, Kyle Meyer wrote: >> $ # in the guix repo >> $ git config b4.attestation-policy off >> $ git config b4.midmask https://yhetil.org/guix-patches/%s >> $ b4 am 20201028165112.28575-1-zimon.toutoune@gmail.com >> >> The end result is a filtered mbox with the v2 patches. Also, because = the >> sender helpfully included the base commit, `b4 am' will use that infor= mation >> in the instructions that it outputs. > > You mean =E2=80=99b4=E2=80=99 filters out the 2 Ludo=E2=80=99s messages w= hen applying the 2 > patches, right? Right, 'b4 am' will try to extract the patch messages for the latest (or specified) version, discarding everything else. The end product is what its documentation refers to as an "am-ready" mbox. > In this case, =E2=80=99b4=E2=80=99 will also fetch the patches from yheti= l.org, right? Yes. Without the midmask above, it would try to fetch from an archive at instead. > If exposes (somewhere?) the Message-ID (as we have > discussed [1]), then one user could browse, copy the Message-ID that > they is interested and paste locally as you explain above; without the > need to subscribe or use Emacs-Debbugs. Right? Right, anybody can grab the mbox with just the message ID. b4 is taking advantage of the fact that public-inbox makes it easy to download a thread's mbox by specifying the message ID: curl -fSsL https://yhetil.org/guix-patches/86ima8d6rh.fsf@tournier.info/t= .mbox.gz | zless > BTW, I think that base commit should be strongly encouraged when > submitting patches. See [2] :-) > > 1; > 2: I very much agree (and remember https://github.com/magit/magit/issues/4028 = :>) >> If the above sounds useful to you but you'd prefer to work in Emacs, y= ou >> might be interested in piem (), wh= ich >> includes a transient (i.e magit-popup's successor) interface to b4. > > I have not tried either. Is it packaged for Guix? No. I'm too sheepish to package my own stuff and at this point I'm aware of no other piem user :). Also I'm still not quite sure where I want to go with it (and that answer probably largely depends on where public-inbox goes with some planned features). But there is a .guix.scm file in piem's repo that has a definition... > Well, does b4 and piem works with worktree? Yes. 'b4 am' stops at the am-ready patches, so it doesn't really care at all. piem will go farther, checking out a branch and calling git-am with the output of b4 am. It should play fine with worktrees (I use it with one regularly), as long as :coderepo in piem-inboxes points to the worktree you want to use. Hmm, or reading ahead, now I'm wondering if you mean _creates_ a worktree for applying the patch? In that case, no, piem doesn't do that. It's not something I've considered before. > Currently, I am using Emacs and Notmuch. I have subscribed to > guix-patches and when I try a patch, I do: > > | git gam the-branch-worktree > > where =E2=80=99gam=E2=80=99 is just =E2=80=99-C ~/src/guix/wk/ am -3 --re= ject=E2=80=99. And depending > on the thread structure, sometimes I have to go patch by patch. > > Using b4+piem, then reading the message, I will do =E2=80=99M-x piem-b4-a= m=E2=80=99 and > whatever the thread structure, the patches sent as =E2=80=9Cin-reply-to= =E2=80=9C will be > applied. Right? Yes, you would invoke the piem-b4-am transient, select any options, and then call piem-b4-am-from-mid ("a"). (The transient contains two other commands, but they are essentially _just_ calling 'b4 am', stopping at the am-ready mbox.) As for which patches are applied, it depends on b4's analysis of the thread. When you have piem-notmuch-mode enabled, piem tries first to use the local notmuch database before downloading a thread from a public-inbox instance [*]. The message ID from the current buffer is used to generate the entire thread with notmuch, in the same way that 'GET /MID/t.mbox.gz' on a public-inbox instance grabs the whole thread. At that point, it is up to 'b4 am' which patches are extracted; by default, it prefers the latest version it finds in the thread, but you can explicitly select a version with the --use-version argument in the piem-b4-am transient. [*] You can even get by without a public-inbox instance: https://docs.kyleam.com/piem.html#Applying-patches-without-a-public_00= 2dinbox-archive > (Aside messages including non inlined patches, if I read correctly the > doc.) Correct, b4 only handles inline patches. There is another command, piem-am, that will try to do something sensible with attached patches in the current message, but things get a lot less fancy once b4 is out of the equation.