diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2021-05-17 12:04:09 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2021-05-17 12:04:09 -0400 |
commit | f6f46cd221e35bf80d3b7c24ec4b4d799446399f (patch) | |
tree | c773531336afa9a9e49b8d0f0c5c03a41f38bbf3 /b4/mbox.py | |
parent | 34f5c6886f3e02558101a19cffb479c480ef646e (diff) | |
download | b4-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/mbox.py')
-rw-r--r-- | b4/mbox.py | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -47,7 +47,10 @@ def mbox_to_am(mboxfile, cmdargs, msgid): for key, msg in mbx.items(): lmbx.add_message(msg) - lser = lmbx.get_series(revision=wantver, sloppytrailers=cmdargs.sloppytrailers) + reroll = True + if cmdargs.nopartialreroll: + reroll = False + lser = lmbx.get_series(revision=wantver, sloppytrailers=cmdargs.sloppytrailers, reroll=reroll) if lser is None and wantver is None: logger.critical('No patches found.') return @@ -156,6 +159,11 @@ def mbox_to_am(mboxfile, cmdargs, msgid): logger.info('Prepared a fake commit range for 3-way merge (%.12s..%.12s)', rstart, rend) logger.critical('---') + if lser.partial_reroll: + logger.critical('WARNING: v%s is a partial reroll from previous revisions', lser.revision) + logger.critical(' Please carefully review the resulting series to ensure correctness') + logger.critical(' Pass --no-partial-reroll to disable') + logger.critical('---') if not lser.complete and not cmdargs.cherrypick: logger.critical('WARNING: Thread incomplete!') |