aboutsummaryrefslogtreecommitdiff
path: root/b4/ty.py
AgeCommit message (Collapse)Author
2020-12-01Fix b4 ty auto-matchingKonstantin Ryabitsev
When I changed auto_locate_series to return the exact patch number in addition to the matching commit_id, I introduced an off-by-one that caused all tracked series to start matching. Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-11-30Fix headers generated by "b4 ty"Konstantin Ryabitsev
Make sure we always create a Date: header, and that we're not crashing when we try to parse a message without a Date: header. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-11-24Improve ty with cherrypicked subsetsKonstantin Ryabitsev
Record patch counters when we start tracking series so we properly indicate in the thank-you note which ones got applied. Additionally, indicate in the subject when we're reporting on a subset of a larger series. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-10-02Fix header encoding introduced by earlier fixKonstantin Ryabitsev
It seems we don't have much control over what as_bytes() does, so switch to using as_string(), setting our policy, and making sure that content-transfer-encoding is set to 8bit. Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-10-01Set charset in order to generate MIME headersKonstantin Ryabitsev
Apparently, merely passing policy= doesn't generate the full set of required headers, so make sure we do set_charset('utf-8'). Reported-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-15Relax branch sanity-checking logicKonstantin Ryabitsev
Git has a lot of internal logic matching free-form branch names to actual branches, so don't try to second-guess what it finds acceptable. Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-11Make sure to always use the full refnameKonstantin Ryabitsev
Git will try to helpfully disambiguate, but we just need consistency, so always ask for a full refname. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-11Deal with cases when [branch] is not specifiedKonstantin Ryabitsev
Not all local branches are going to have matching [branch] entries -- sometimes there is only a [remote]. Deal with both cases. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-11Do not match everything in -a, only -sKonstantin Ryabitsev
While trying to be more permissive with messages selected manually with -s, we broke auto-thankanator by making it match everything. Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-07Match applied patches using message-idKonstantin Ryabitsev
Track message-id for each patch and try to apply to the Link: or Message-Id: trailers, if we find them. Suggested-by: Jason Gunthorpe <jgg@ziepe.ca> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-07Improve remote/branch mappingKonstantin Ryabitsev
Our mapping of local to remote branches was very naive and failed when remote names didn't exactly match heads. Improve it using suggestions from Will Deacon. Link: https://linux.kernel.org/g/tools/message/140 Reported-by: Will Deacon <will@kernel.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-05-07Switch ty -s and -d to allow friendly rangesKonstantin Ryabitsev
Instead of insisting that people put in specific numbers, allow them to specify ranges, such as: b4 ty -s 1-3,5,7- Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-24Use "local tree" instead of "undefined"Konstantin Ryabitsev
This is our fail-through treename, so if we weren't able to figure out anything about it, then call it a "local tree" instead of "undefined". Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-22Properly deal with merge to non-current branchKonstantin Ryabitsev
When running rev-list, be mindful of which branch we need to operate on, otherwise it always runs on the current branch. Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-17Expand templates with ${branch} and ${treename}Konstantin Ryabitsev
You can use ${branch} and ${treename} (if you set b4.thanks-treename). See .example files on some hints on how to use them. Suggested-by: Mark Brown <broonie@kernel.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-15Changes to b4 ty based on developer feedbackKonstantin Ryabitsev
- Properly expand ~ and env vars like $HOME in template paths - Allow partial matching of series (with a warning) - Allow using remote branches with -b - Always fall back to subject matching for patches - Tweak to the summary output Suggested-by: Mark Brown <broonie@kernel.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-15Keep track of how many messages we createKonstantin Ryabitsev
Don't tell us to run git send-email when there's nothing to send. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-15Be more useful during non-auto matchingKonstantin Ryabitsev
Instead of bailing out when we can't find a match for a series, skip it and move to the next one in the queue. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-15Switch to using patchwork-compatible hashesKonstantin Ryabitsev
Using strict attestation hashes for auto-thankinator is problematic, because "git am" uses a certain degree of fuzzing, so when we try to find applied patches by running "git diff" on actual commits, line counts may not be bit-for-bit identical. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-10Use ~/.signature if it exists for tpt defaultsKonstantin Ryabitsev
If we find a ~/.signature, then use it for making a default ${signature} value, otherwise make a "Name <email>" boring one. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-10Add summaries to default templatesKonstantin Ryabitsev
They are much more useful if b4.thanks-commit-url-mask is set, but even without them this will list all subjects and corresponding commit IDs. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-10Don't use git patch-id for patch trackingKonstantin Ryabitsev
Looks like some of the patches sent from quilt (at least from Andrew Morton) are not properly parsed by git patch-id, so use our own patch hashing routines, even if this means we're likely going to miss some of the patches that were edited by maintainers. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
2020-04-09Add b4 ty that aims to simplify common feedbackKonstantin Ryabitsev
New experimental feature that aims to simplify a very common "thanks, applied" kind of feedback often expected of maintainers. Still needs documentation to explain its usage. Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>