summaryrefslogtreecommitdiff
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:22:56 -0500
commit4af401f8dcb78ff9c77b41bc7910ee0b66e0a12f (patch)
treeda58be0fbe7a31077e396f23d08fc1d89c4170c8
parentaaa5789ba792a3b268effbf4beaae4c93525b0dc (diff)
downloadb4-4af401f8dcb78ff9c77b41bc7910ee0b66e0a12f.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 2a8bcb8..161a9f5 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -1401,7 +1401,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: