tools.linux.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Marc Zyngier" <maz@kernel.org>
To: tools@linux.kernel.org
Cc: users@linux.kernel.org, konstantin@linuxfoundation.org
Subject: [b4][PATCH] Fix handling of series with the [PATCHvX] defect
Date: Fri, 30 Oct 2020 10:51:53 +0000	[thread overview]
Message-ID: <20201030105153.3015432-1-maz@kernel.org> (raw)

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


             reply	other threads:[~2020-10-30 10:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-30 10:51 Marc Zyngier [this message]
2020-11-03 22:30 ` [b4][PATCH] Fix handling of series with the [PATCHvX] defect Konstantin Ryabitsev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201030105153.3015432-1-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=konstantin@linuxfoundation.org \
    --cc=tools@linux.kernel.org \
    --cc=users@linux.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).