Linux maintainer tooling and workflows
 help / color / Atom feed
* [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	[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, back to index

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

Linux maintainer tooling and workflows

Archives are clonable:
	git clone --mirror https://lore.kernel.org/tools/0 tools/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 tools tools/ https://lore.kernel.org/tools \
		tools@linux.kernel.org
	public-inbox-index tools

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.linux.tools


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git