From: Simon Glass <sjg(a)chromium.org>
This series gathers patman and buildman improvements with a focus on
the AI-assisted review flow.
u_boot_pylib gains a few foundations: run_interactive() for
PTY-aware command capture (used by git send-email), a way to inspect
claude-agent output, and a set of gitutil wrappers (count_revs,
diff_stat, ref_exists, current_branch, checkout_branch, stash_save,
stash_pop) that take a working-tree path through subprocess cwd.
review.py is then migrated so all of its git access goes through
gitutil and all of its patchwork access goes through patchwork.py:
it no longer assembles 'git ...' argv lists or builds patchwork URLs
by hand.
The 'patman review' command grows several user-facing flags and
behaviours. -s/--series and -S/--series-title replace -l/-t to make
room for new patch-level flags; -i, -p, and -P select a subset of
patches, a single patch by Patchwork ID, or a single patch by title.
-b/--base-branch lets the user override the base branch, and the
auto-detection now falls back to master when next is empty -- the
post-release window where next has just been merged in. The apply
step stashes untracked files before checking out the review branch,
and aborts cleanly when the agent applies fewer commits than the
cover letter promises. 'patman series find' searches the local
database by subject fragment.
Smaller touches round things out: a colour-coded review state in
'series info' with optional patch-number filtering, detection of
series accepted upstream during 'series gather', hiding review
series from the default 'series ls', a -d short for --create-drafts,
a handful of AI-prompt refinements (diff headers, single quotes for
code tokens, no reconstructed quoted diff lines), and buildman now
hiding the 'Boards not built' summary by default. Unit tests
accompany the new u_boot_pylib helpers and the base-branch
auto-detection, and the documentation in patman.rst is brought up to
date with all of the above.
Simon Glass (29):
buildman: Hide 'Boards not built' by default
u_boot_pylib: Add run_interactive() for PTY commands
u_boot_pylib: Add a way to inspect agent output
u_boot_pylib: Add gitutil helpers for repo-aware git operations
patman: Use gitutil helpers in review.py
patman: Use patchwork.py for all HTTP access in review.py
patman: Handle email-mismatch warning from checkpatch
patman: Fix patchwork search for titles containing '+'
patman: Add review display and colour to series info
patman: Use run_interactive() for git send-email
patman: Detect when a series is accepted upstream
patman: Refine review prompts and fix review handling
patman: Add -d short option for --create-drafts
patman: Hide review series from default listing
patman: Record workflow entry when reviewing a series
patman: Let the apply agent edit files for manual fixups
patman: Abort review on partial or interrupted apply
patman: Rename review series flags to '-s/-S'
patman: Allow reviewing specific patches in a series
patman: Add 'series find' to search by subject fragment
patman: Place base-commit before signature in cover letter
patman: Stash untracked files before reviewing
patman: Force diff headers in every review comment
patman: Tell the agent never to reconstruct quoted diff lines
patman: Keep code quotes out of the cover-letter review
patman: Use single quotes for all quoted tokens in reviews
patman: Allow choosing the review base branch
patman: Clarify the 'series not in database' error path
patman: Document review behaviours added in this series
tools/buildman/builder.py | 3 +-
tools/buildman/buildman.rst | 5 +
tools/buildman/cmdline.py | 3 +
tools/buildman/control.py | 3 +-
tools/buildman/func_test.py | 2 +-
tools/buildman/outcome.py | 1 +
tools/buildman/resulthandler.py | 3 +-
tools/buildman/test.py | 12 +-
tools/buildman/test_builder.py | 3 +-
tools/buildman/worker.py | 3 +-
tools/patman/__main__.py | 3 +-
tools/patman/checkpatch.py | 1 +
tools/patman/cmdline.py | 37 ++-
tools/patman/control.py | 8 +-
tools/patman/cser_helper.py | 43 ++++
tools/patman/cseries.py | 202 +++++++++++----
tools/patman/database.py | 79 +++++-
tools/patman/func_test.py | 35 +--
tools/patman/patchstream.py | 56 ++++-
tools/patman/patchwork.py | 51 +++-
tools/patman/patman.rst | 79 +++++-
tools/patman/review.py | 379 ++++++++++++++++++++++-------
tools/patman/test_cseries.py | 201 ++++++++++++---
tools/patman/workflow.py | 19 ++
tools/u_boot_pylib/__main__.py | 4 +-
tools/u_boot_pylib/claude.py | 8 +
tools/u_boot_pylib/command.py | 51 ++++
tools/u_boot_pylib/gitutil.py | 117 ++++++++-
tools/u_boot_pylib/test_command.py | 58 +++++
tools/u_boot_pylib/test_gitutil.py | 122 ++++++++++
30 files changed, 1349 insertions(+), 242 deletions(-)
create mode 100644 tools/u_boot_pylib/test_command.py
create mode 100644 tools/u_boot_pylib/test_gitutil.py
---
base-commit: 47ac06e6993c1bcb1d47a83a1fa014532e9bacad
branch: patj
--
2.43.0