Fix handling of series with the [PATCHvX] defect
PATCH 1/1 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 <[email protected]> does exhibit the problem.
Fixing the re.sub() expression allows normal funtionalities to be restored, and the above series to be fetched.
--- b4/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
b4/__init__.py +1 -1
@@ -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:
Signature · 1 line
2.28.0
Quoted 8 lines · Marc Zyngier
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 <[email protected]> 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