aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2020-10-30 10:49:47 +0000
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-11-03 17:27:55 -0500
commit4f09f1cf2f9e43dc2b226d8f3b30a41f3f0e6d73 (patch)
treeb3b0d398f1749a5265c5ee976bffe1f4c1ff7637
parent81f21c696edc1396115250ffb06e8a39da366015 (diff)
downloadb4-4f09f1cf2f9e43dc2b226d8f3b30a41f3f0e6d73.tar.gz
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 <maz@kernel.org> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/__init__.py2
1 files changed, 1 insertions, 1 deletions
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: