b4 shazam generate branch to apply patches to?

Matthias Beyer <[email protected]>
Newsgroups org.kernel.linux.tools
Message-ID <2aczixw5erzdkkbnfflkzzyu6pkumodss7uqisvj2lldllsd2x@rd7shjtvz5me>
Hi,

I am currently playing with b4 and found that I have a patch in my inbox
for which

    b4 shazam -m- -s -H

succeeds, but

    b4 shazam -m- -s -M

does not:

    Fetching into FETCH_HEAD
    Will exec: git merge --no-ff -F /home/m/archive/development/contrib/nixpkgs/.git/b4-cover --edit FETCH_HEAD --signoff
    Press Enter to continue or Ctrl-C to abortTraceback (most recent call last):
      File "/nix/store/xm2h3wvmzyqsrp25k8s5ks66ih5b8dab-b4-0.15.2/bin/.b4-wrapped", line 9, in <module>
        sys.exit(cmd())
                 ~~~^^
      File "/nix/store/xm2h3wvmzyqsrp25k8s5ks66ih5b8dab-b4-0.15.2/lib/python3.13/site-packages/b4/command.py", line 512, in cmd
        cmdargs.func(cmdargs)
        ~~~~~~~~~~~~^^^^^^^^^
      File "/nix/store/xm2h3wvmzyqsrp25k8s5ks66ih5b8dab-b4-0.15.2/lib/python3.13/site-packages/b4/command.py", line 105, in cmd_shazam
        b4.mbox.main(cmdargs)
        ~~~~~~~~~~~~^^^^^^^^^
      File "/nix/store/xm2h3wvmzyqsrp25k8s5ks66ih5b8dab-b4-0.15.2/lib/python3.13/site-packages/b4/mbox.py", line 1246, in main
        make_am(msgs, cmdargs, msgid)
        ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
      File "/nix/store/xm2h3wvmzyqsrp25k8s5ks66ih5b8dab-b4-0.15.2/lib/python3.13/site-packages/b4/mbox.py", line 499, in make_am
        input('Press Enter to continue or Ctrl-C to abort')
        ~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    EOFError: EOF when reading a line

b4 is called from neomutt, by piping a message through a script[0]
(replicated below) that translates the message id to a mbox and then
through the command(s) from above.

The aforementioned script (also in [0]):

    mid=$(cat | grep -m 1 -i "^Message-Id:"  | sed 's,^Message-ID: ,,I; s,^[[:space:]]*<,,; s,>[[:space:]]*$,,')
    notmuch show --entire-thread --format=mbox "id:$mid"


If someone wants to replicate what I am seeing:

* The patchset I try to apply is https://lists.sr.ht/~andir/nixpkgs-dev/patches/69018
    (curl -s https://lists.sr.ht/~andir/nixpkgs-dev/patches/69018/mbox > mbox)
* The repository I try to apply to is https://github.com/nixos/nixpkgs as of e49f399654dd1cd1c456714adaf01d9a69234395
* b4 0.15.2

I am of course happy to provide more information if needed to debug
this.

Best,
Matthias

[0]: https://codeberg.org/matthiasbeyer/notmuch-scripts/src/branch/master/notmuch-mid-to-mbox
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEUJGUus1GMTrRclzcEKWX9Kitz80FAmnuA3gACgkQEKWX9Kit
z81ocw/+MKZtXBxWSNLI2ynnWTgffvzSmclIgk2TG5fHVHlbkpStErUrCdflVBQ+
cqRONUk3HjGmScm6NehsMklCdX4adGPTNP4zqTYzw+QnBDA0owLt08VCc+CtKOgX
10hMRZqLchvUksMMIRHFjZ0vV62HI9YKMYEtkZNqzzUln3bm4HeamvpD4DQ9PCjm
7BsieLFQ1o6xFR2zR5iJSRfLGbbQawnxv3osw5xGAJzgLGbn7WPVhqURqxFECMzI
jzcIsPnMP5yDIIS3i8IfZllV3+eW4P7C+ERJPSm5d8ie7VFfo1fOGOkW0+c6kksm
zZMX9gkc/hHesNfaAg57fiKagrLHQmhCxaay8okU/8HMJyU1t3aiILVLcIw5WUK+
+HjcdiubnAV2t3bC16iP3ewaj/s7Z9sstm0zfMQy2Q5U7ZAU6mUjKKMzpz8uVXUu
a5wsyOwY133C/kzDSlwch4H+YCsOwfznaVSAH8Y5U6A7caItkMh0Q+fF20GAOcT0
hXTzDkhd4zajhgfnz/yNgq9O/YVk/UifZ2Zbt5HmNhLtRqsQb0f+C34z9B4XafAC
qI4Dl7ht+V2fBANiFQTL2e70HVAJgHYXnUBkTMteOCaF+kBqyy/Uf59bgn3jz7/b
ukZL3DQA9G3rxIQIDGYD4WA3BuDi4+ycX2DNYJlRnbDO++KVYko=
=CqPK
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.