All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mark Brown" <broonie@kernel.org>
To: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Cc: tools@linux.kernel.org
Subject: Re: [kernel.org users] b4 auto-thankanator landed in master
Date: Wed, 15 Apr 2020 18:23:24 +0100	[thread overview]
Message-ID: <20200415172324.GH5265@sirena.org.uk> (raw)
In-Reply-To: <20200415165712.swekibu2xg453sqa@chatter.i7.local>

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

On Wed, Apr 15, 2020 at 12:57:12PM -0400, Konstantin Ryabitsev wrote:
> On Wed, Apr 15, 2020 at 04:00:00PM +0100, Mark Brown wrote:
> > On Fri, Apr 10, 2020 at 05:00:56PM -0400, Konstantin Ryabitsev wrote:

> > It seems like this relies on git branch --show-current which isn't
> > supported by the git in Debian stable, 2.20.1. 

> Bah, I should check manpages more carefully. I switched to a more 
> generic alternative:

> git rev-parse --abbrev-ref HEAD

That seems to work, thanks!

> > The documentation also says that

> >    b4 ty -s all

> > will send everything but it looks like that just lists all the tracked
> > patches instead (possibly because of the above, I didn't check). 

> I think I just forgot to add "all" handling to -s. :) It's fixed now.

That seemed to work however I immediately ran into:

Generating 1 thank-you letters
Traceback (most recent call last):
  File "/home/broonie/git/b4/b4/command.py", line 198, in <module>
    cmd()
  File "/home/broonie/git/b4/b4/command.py", line 182, in cmd
    cmdargs.func(cmdargs)
  File "/home/broonie/git/b4/b4/command.py", line 60, in cmd_ty
    b4.ty.main(cmdargs)
  File "/home/broonie/git/b4/b4/ty.py", line 501, in main
    send_selected(cmdargs)
  File "/home/broonie/git/b4/b4/ty.py", line 411, in send_selected
    send_messages(listing, cmdargs.gitdir, cmdargs.outdir, wantbranch, cmdargs.since)
  File "/home/broonie/git/b4/b4/ty.py", line 321, in send_messages
    signature = '%s <%s>' % (usercfg['name'], usercfg['email'])
KeyError: 'name'

git itself manages to figure out my name from passwd.

> > I'm
> > not sure what it's looking at the current branch for but if it's doing
> > that it'd be good to be able to tell it to look at a specific branch
> > instead - 

> You can already do this by passing -b to "b4 ty":

> b4 ty -b branchname

Ah, great.

> > > Since it's an experimental feature, we just save a .thanks file instead
> > > of sending it outright -- at least until there's a lot more testing.

> > It would be good if there was an explicit command for this, it'd be
> > useful when scripting stuff I think and also when testing things out.

> Eventually, the plan is to look into gitconfig for "sendemail" 
> configuration and use that for sending out email directly. For the 
> moment, you can achieve similar results by passing "--confirm=never" to 
> git send-email, which should just send the emails out.

That's the opposite of what I'm asking for - what I meant to say was
that I find the current behaviour useful and it'd be good to keep it
around even when b4 can send directly.

> I found a few more problems while testing things out, which highlighted 
> the need to use more forgiving patch hashing routines. Since I was 
> planning on integrating b4 with some of the patchwork automation 
> functionality in the near future anyway, I switched the tracking 
> routines to use patchwork-compatible patch hashes. Unfortunately, this 
> means that --auto will fail to properly work (since we changed the 
> hashes we use to track them). Things should still work with "b4 ty -s", 
> as we do matching by subject there when exact patch hashes fail.

I think there's still some issue, not sure what triggers it but it seems
to happen with explicitly specified messages too.  Do I need to clear
out some local database?

Calculating patch hashes, may take a moment...
Traceback (most recent call last):
  File "/home/broonie/git/b4/b4/command.py", line 198, in <module>
    cmd()
  File "/home/broonie/git/b4/b4/command.py", line 182, in cmd
    cmdargs.func(cmdargs)
  File "/home/broonie/git/b4/b4/command.py", line 60, in cmd_ty
    b4.ty.main(cmdargs)
  File "/home/broonie/git/b4/b4/ty.py", line 501, in main
    send_selected(cmdargs)
  File "/home/broonie/git/b4/b4/ty.py", line 411, in send_selected
    send_messages(listing, cmdargs.gitdir, cmdargs.outdir, wantbranch, cmdargs.since)
  File "/home/broonie/git/b4/b4/ty.py", line 336, in send_messages
    msg = generate_am_thanks(gitdir, jsondata, branch, since)
  File "/home/broonie/git/b4/b4/ty.py", line 248, in generate_am_thanks
    commits = auto_locate_series(gitdir, jsondata, branch, since, loose=True)
  File "/home/broonie/git/b4/b4/ty.py", line 169, in auto_locate_series
    commits = get_all_commits(gitdir, branch, since)
  File "/home/broonie/git/b4/b4/ty.py", line 161, in get_all_commits
    pwhash = b4.LoreMessage.get_patchwork_hash(out)
  File "/home/broonie/git/b4/b4/__init__.py", line 822, in get_patchwork_hash
    diff = LoreMessage.get_clean_diff(diff)
  File "/home/broonie/git/b4/b4/__init__.py", line 879, in get_clean_diff
    pp = int(plines)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

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

  reply	other threads:[~2020-04-15 17:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-10 21:00 b4 auto-thankanator landed in master Konstantin Ryabitsev
2020-04-15 15:00 ` [kernel.org users] " Mark Brown
2020-04-15 16:57   ` Konstantin Ryabitsev
2020-04-15 17:23     ` Mark Brown [this message]
2020-04-15 17:55       ` Konstantin Ryabitsev
2020-04-15 18:32         ` Mark Brown
2020-04-15 19:28           ` Konstantin Ryabitsev
2020-04-15 20:12             ` Mark Brown
2020-04-15 21:21               ` Konstantin Ryabitsev
2020-04-15 21:40                 ` Mark Brown
2020-04-15 22:36                   ` 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=20200415172324.GH5265@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=konstantin@linuxfoundation.org \
    --cc=tools@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.