[PATCH RFC 0/2] review-tui: add a "cherry-pick + merge" take method
Christian Brauner <[email protected]> Thu, 25 Jun 2026 14:18:35 +0200
| Newsgroups | org.kernel.linux.tools |
|---|---|
| Message-ID | <20260625-20260625-review-tui-take-cherry-pick-merge-v1-0-8ba4809d048a@kernel.org> |
The review TUI's Take dialog can apply a series three ways: merge (a cover-letter merge commit of the whole series), linear (git am onto the target branch), or cherry-pick (pick a subset and git am it). It could not do the combination a maintainer often wants: take a hand-picked subset of a series *and* record it as a cover-letter merge commit -- the equivalent of "b4 shazam -M -P". That path was already half-wired. When some patches were marked skipped, the "merge" method fell through to the patch picker and merged just the non-skipped patches -- _do_take_merge already builds its mbox from a cherry-pick selection. But with nothing pre-skipped there was no way to ask for it: "merge" always took the whole series. This series turns it into a first-class choice. A new method, "cherry-pick + merge" (merge-pick), always opens the patch picker like cherry-pick and then routes through the merge path like merge: - _on_take_confirmed always shows the picker for merge-pick; - _on_take_final dispatches it to _do_take_merge; - the apply self-test bases it at the series base-commit, like merge; - it is accepted as a b4.review-default-take-method value. The picker's existing pre-deselection of skipped patches is reused, so cherry-pick + merge over a series that has skips starts with those patches deselected, like the other picker paths. Patch 1 adds the method and updates the docs; patch 2 extends TestMergeTakeSkipRouting to cover the new routing -- the picker always opens, the chosen method survives the picker, and the final dispatch lands on _do_take_merge rather than git am. ci.sh checkers (ruff format/check, ty) are clean on the changed sources, and the tui-tracking, tui-modals, tui-review, and three-way-merge suites pass (213 tests). Signed-off-by: Christian Brauner (Amutable) <[email protected]> --- Christian Brauner (2): review-tui: add cherry-pick+merge take method review-tui: test the cherry-pick+merge take method docs/config.rst | 5 +-- docs/releases.rst | 10 ++++++ docs/reviewer/getting-started.rst | 6 ++-- src/b4/review_tui/_modals.py | 7 ++-- src/b4/review_tui/_tracking_app.py | 26 ++++++++------- src/tests/test_tui_tracking.py | 66 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 102 insertions(+), 18 deletions(-) --- base-commit: 0a1954d329ab57f7aab40743fad7dc6e3c45d35d change-id: 20260625-20260625-review-tui-take-cherry-pick-merge-38a536bdb1fc