aboutsummaryrefslogtreecommitdiff
path: root/b4/diff.py
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-05-17 12:04:09 -0400
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2021-05-17 12:04:09 -0400
commitf6f46cd221e35bf80d3b7c24ec4b4d799446399f (patch)
treec773531336afa9a9e49b8d0f0c5c03a41f38bbf3 /b4/diff.py
parent34f5c6886f3e02558101a19cffb479c480ef646e (diff)
downloadb4-f6f46cd221e35bf80d3b7c24ec4b4d799446399f.tar.gz
Implement partial reroll
It has been a common request to support partial series rerolls where someone sends an amended patch as a follow-up to a previous series, e.g.: [PATCH v3 1/3] Patch one [PATCH v3 2/3] Patch two \- Re: [PATCH v3 2/3] Patch two Looks good, but please fix this $small_thing \- [PATCH v4 2/3] Patch two [PATCH v3] Patch three Previously, b4 refused to consider v4 as a complete new series, but now it will properly perform a partial reroll, but only in the cases where such patches are sent as follow-ups to the exact same patch number in the previous series: [PATCH v3->v4 1/3] Patch one [PATCH v4 2/3] Patch two [PATCH v3->v4 3/3] Patch three Reported-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org> Link: https://lore.kernel.org/r/CAPcyv4ggbuHbqKV33_TpE7pqxvRag34baJrX3yQe-jXOikoATQ@mail.gmail.com
Diffstat (limited to 'b4/diff.py')
-rw-r--r--b4/diff.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/b4/diff.py b/b4/diff.py
index 10f3159..38d2a9a 100644
--- a/b4/diff.py
+++ b/b4/diff.py
@@ -66,7 +66,7 @@ def diff_same_thread_series(cmdargs):
lower = min(wantvers)
else:
upper = max(lmbx.series.keys())
- lower = min(lmbx.series.keys())
+ lower = upper - 1
if upper == lower:
logger.critical('ERROR: Could not auto-find previous revision')
@@ -80,9 +80,15 @@ def diff_same_thread_series(cmdargs):
return None, None
if not lmbx.series[lower].complete:
+ lmbx.partial_reroll(lower, sloppytrailers=False, backfill=True)
+
+ if not lmbx.series[lower].complete:
lmbx.backfill(lower)
if not lmbx.series[upper].complete:
+ lmbx.partial_reroll(upper, sloppytrailers=False, backfill=True)
+
+ if not lmbx.series[upper].complete:
lmbx.backfill(upper)
return lmbx.series[lower], lmbx.series[upper]