Linux maintainer tooling and workflows
 help / color / mirror / Atom feed
* Couple of b4 trailers issues
@ 2022-08-31 17:19 Vishal Verma
  2022-08-31 19:23 ` Konstantin Ryabitsev
  0 siblings, 1 reply; 2+ messages in thread
From: Vishal Verma @ 2022-08-31 17:19 UTC (permalink / raw)
  To: tools; +Cc: Konstantin Ryabitsev, users

[-- 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 --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: Couple of b4 trailers issues
  2022-08-31 17:19 Couple of b4 trailers issues Vishal Verma
@ 2022-08-31 19:23 ` Konstantin Ryabitsev
  0 siblings, 0 replies; 2+ messages in thread
From: Konstantin Ryabitsev @ 2022-08-31 19:23 UTC (permalink / raw)
  To: Vishal Verma; +Cc: tools, users

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

On Wed, Aug 31, 2022 at 11:19:12AM -0600, Vishal Verma wrote:
> 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.

Thank you for testing it out. I'll apply a fix shortly.

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

That feature was gone for a while, but is now back in a new, chain-of-custody
respecting version. It should be in the latest master.

-K

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-31 19:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-31 17:19 Couple of b4 trailers issues Vishal Verma
2022-08-31 19:23 ` Konstantin Ryabitsev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox