From 92cfcd77d276f7cf566220c69376675f590491fe Mon Sep 17 00:00:00 2001 From: Konstantin Ryabitsev Date: Fri, 3 Apr 2020 17:49:48 -0400 Subject: Recognize when reroll info is only in 1st patch Sometimes this happens: [PATCH v2 1/N] [PATCH 2/N] [PATCH 3/N] [PATCH 4/N] Properly recognize such cases and version all patches threaded under the first one as v2. Reported-by: Amit Kucheria Signed-off-by: Konstantin Ryabitsev --- b4/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/b4/__init__.py b/b4/__init__.py index ca1bf60..1de513b 100644 --- a/b4/__init__.py +++ b/b4/__init__.py @@ -269,6 +269,10 @@ class LoreMailbox: # Yes, this is very likely our cover letter logger.debug(' fixed revision to v%s', irt.revision) lmsg.revision = irt.revision + # alternatively, see if upthread is patch 1 + elif lmsg.counter > 0 and irt is not None and irt.has_diff and irt.counter == 1: + logger.debug(' fixed revision to v%s', irt.revision) + lmsg.revision = irt.revision # Run our check again if lmsg.revision not in self.series: -- cgit v1.2.3