* [b4][PATCH] Fix handling of series with the [PATCHvX] defect
@ 2020-10-30 10:51 Marc Zyngier
2020-11-03 22:30 ` Konstantin Ryabitsev
0 siblings, 1 reply; 2+ messages in thread
From: Marc Zyngier @ 2020-10-30 10:51 UTC (permalink / raw)
To: tools; +Cc: users, konstantin
b4 tries to handle subject lines such as "[PATCHvX]" by replacing
the subject line in situ, but seems to do a rather bad job of it,
resulting in only the first patch of the series being picked up.
Fetching <20201026134931.28246-1-mark.rutland@arm.com> does exhibit
the problem.
Fixing the re.sub() expression allows normal funtionalities to be
restored, and the above series to be fetched.
Fixes: 6bf644f14b3f ("Deal with [PATCHvX] subject")
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
b4/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/b4/__init__.py b/b4/__init__.py
index a1479aa..c6d43b2 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -1389,7 +1389,7 @@ class LoreSubject:
subject = re.sub(r'^\w+:\s*\[', '[', subject)
# Fix [PATCHv3] to be properly [PATCH v3]
- subject = re.sub(r'^\[\s*(patch)(v\d+).*', '[$1 $2$3', subject, flags=re.I)
+ subject = re.sub(r'^\[\s*(patch)(v\d+)(.*)', '[\\1 \\2\\3', subject, flags=re.I)
# Find all [foo] in the title
while subject.find('[') == 0:
--
2.28.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [b4][PATCH] Fix handling of series with the [PATCHvX] defect
2020-10-30 10:51 [b4][PATCH] Fix handling of series with the [PATCHvX] defect Marc Zyngier
@ 2020-11-03 22:30 ` Konstantin Ryabitsev
0 siblings, 0 replies; 2+ messages in thread
From: Konstantin Ryabitsev @ 2020-11-03 22:30 UTC (permalink / raw)
To: Marc Zyngier; +Cc: tools, users
On Fri, Oct 30, 2020 at 10:51:53AM +0000, Marc Zyngier wrote:
> b4 tries to handle subject lines such as "[PATCHvX]" by replacing
> the subject line in situ, but seems to do a rather bad job of it,
> resulting in only the first patch of the series being picked up.
> Fetching <20201026134931.28246-1-mark.rutland@arm.com> does exhibit
> the problem.
>
> Fixing the re.sub() expression allows normal funtionalities to be
> restored, and the above series to be fetched.
Thanks, I have no idea how that bad regex made it in. Applied both to
master and stable-0.5.y.
-K
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-03 22:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-30 10:51 [b4][PATCH] Fix handling of series with the [PATCHvX] defect Marc Zyngier
2020-11-03 22:30 ` 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).