aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-04-03 17:49:48 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-04-03 17:52:02 -0400
commiteaf18d77b6ea2214464925aa5adc384bf48a0727 (patch)
tree3f4698f2a37293b8a3f688fc4f0a78341d2ded11
parentd8dd2fde5532a4adeea13a35dd0c2a51b3dd6dcb (diff)
downloadb4-eaf18d77b6ea2214464925aa5adc384bf48a0727.tar.gz
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 <amit.kucheria@gmail.com> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index aa2aa06..e9cc1e2 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -264,6 +264,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: