From 4f09f1cf2f9e43dc2b226d8f3b30a41f3f0e6d73 Mon Sep 17 00:00:00 2001 From: Marc Zyngier Date: Fri, 30 Oct 2020 10:49:47 +0000 Subject: Fix handling of series with the [PATCHvX] defect 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 Signed-off-by: Konstantin Ryabitsev --- b4/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b4/__init__.py b/b4/__init__.py index f715713..15c5e7d 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -1393,7 +1393,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: -- cgit v1.2.3