tools.linux.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ez: Fix 'trailers -F' used on a single commit
@ 2023-03-30 20:15 Rob Herring
  2023-05-26 18:23 ` Konstantin Ryabitsev
  0 siblings, 1 reply; 2+ messages in thread
From: Rob Herring @ 2023-03-30 20:15 UTC (permalink / raw)
  To: Konstantin Ryabitsev; +Cc: tools

Running 'b4 trailers -u -F <msgid>' on a single commit fails:

CRITICAL: Failed to convert range to patches: Could not run rev-list None~1..409ee53c38a1d9a60e76ffa92088cfad07cea850

The problem is the loop is exited after 1 iteration and prevcommit is never
set.

Signed-off-by: Rob Herring <robh@kernel.org>
---
I think a base commit option and/or use upstream tracking branch is needed
here. There's probably cases where one wants to apply trailers and they
are not the author.
---
 b4/ez.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/b4/ez.py b/b4/ez.py
index cf8759015f29..1a9abd642623 100644
--- a/b4/ez.py
+++ b/b4/ez.py
@@ -834,6 +834,8 @@ def update_trailers(cmdargs: argparse.Namespace) -> None:
                 break
             prevparent = parent
             prevcommit = commit
+        if prevcommit is None:
+            prevcommit = end
         start = f'{prevcommit}~1'
     else:
         logger.critical('CRITICAL: Please specify -F msgid to look up trailers from remote.')
-- 
2.39.2


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

* Re: [PATCH] ez: Fix 'trailers -F' used on a single commit
  2023-03-30 20:15 [PATCH] ez: Fix 'trailers -F' used on a single commit Rob Herring
@ 2023-05-26 18:23 ` Konstantin Ryabitsev
  0 siblings, 0 replies; 2+ messages in thread
From: Konstantin Ryabitsev @ 2023-05-26 18:23 UTC (permalink / raw)
  To: Rob Herring; +Cc: tools


On Thu, 30 Mar 2023 15:15:29 -0500, Rob Herring wrote:
> Running 'b4 trailers -u -F <msgid>' on a single commit fails:
> 
> CRITICAL: Failed to convert range to patches: Could not run rev-list None~1..409ee53c38a1d9a60e76ffa92088cfad07cea850
> 
> The problem is the loop is exited after 1 iteration and prevcommit is never
> set.
> 
> [...]

Applied, thanks!

[1/1] ez: Fix 'trailers -F' used on a single commit
      commit: 3151f4267ec4c711db47c14c3460e36b8d3d05b3

Best regards,
-- 
Konstantin Ryabitsev <konstantin@linuxfoundation.org>


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

end of thread, other threads:[~2023-05-26 18:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-30 20:15 [PATCH] ez: Fix 'trailers -F' used on a single commit Rob Herring
2023-05-26 18: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;
as well as URLs for NNTP newsgroup(s).