Linux maintainer tooling and workflows
 help / color / mirror / Atom feed
From: Vishal Verma <vishal@kernel.org>
To: tools@linux.kernel.org
Cc: Konstantin Ryabitsev <konstantin@linuxfoundation.org>,
	 users@linux.kernel.org
Subject: Couple of b4 trailers issues
Date: Wed, 31 Aug 2022 11:19:12 -0600	[thread overview]
Message-ID: <2517d5cdff57048a13e85b9604957b73b69724c3.camel@kernel.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1619 bytes --]

I tried out the b4 trailers command, and found a couple of issues.

1. I get a traceback (attached at the end) if the tree contains
(recent?) merge commits. This patch fixes the splat, but I'm not sure
is the right solution - I didn't spend too much time on understanding
what the parent/commit/end checks were trying to do.

---

diff --git a/b4/ez.py b/b4/ez.py
index 8a1b8ed..27dc090 100644
--- a/b4/ez.py
+++ b/b4/ez.py
@@ -649,7 +649,9 @@ def update_trailers(cmdargs: argparse.Namespace) ->
None:
 
         prevparent = prevcommit = end = None
         for line in lines:
-            commit, parent = line.split()
+            hlist = line.split()
+            commit = hlist[0]
+            parent = hlist[1]
             if end is None:
                 end = commit
             if prevparent is None:

---

2. b4 trailers doesn't seem to respect the ordering from git config
b4.trailer-order


Traceback for #1:

$ b4 trailers -u -F 166188306499.3409478.15310054338186313752.stgit@dwillia2-xfh.jf.intel.com
Traceback (most recent call last):
  File "/home/vverma7/git/b4/b4/command.py", line 350, in <module>
    cmd()
  File "/home/vverma7/git/b4/b4/command.py", line 333, in cmd
    cmdargs.func(cmdargs)
  File "/home/vverma7/git/b4/b4/command.py", line 81, in cmd_trailers
    b4.ez.cmd_trailers(cmdargs)
  File "/home/vverma7/git/b4/b4/ez.py", line 1386, in cmd_trailers
    update_trailers(cmdargs)
  File "/home/vverma7/git/b4/b4/ez.py", line 652, in update_trailers
    commit, parent = line.split()
ValueError: too many values to unpack (expected 2)


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

             reply	other threads:[~2022-08-31 17:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-31 17:19 Vishal Verma [this message]
2022-08-31 19:23 ` Couple of b4 trailers issues Konstantin Ryabitsev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2517d5cdff57048a13e85b9604957b73b69724c3.camel@kernel.org \
    --to=vishal@kernel.org \
    --cc=konstantin@linuxfoundation.org \
    --cc=tools@linux.kernel.org \
    --cc=users@linux.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox