Files
u-boot/tools
Simon Glass 92d91b680c pickman: Add already-applied commit detection / comparison
When a cherry pick has already been completed this can confuse pickman
and make it hard for a reviewer to figure out what is going on.

Attempt to detect already-applied commits (by commit subject) as a way
to reduce duplicate cherry-picks and improve the reliability of the
automation.

The agent now compares actual patch content using git show and diff,
only skipping commits that are similar with minor differences like
line numbers or conflict resolutions. This should reduces false
positives while maintaining robust duplicate detection.

Series-to: concept
Cover-letter:
pickman: Provide better ways to check cherry-picks
After a few weeks of using this tool a couple of things have come to
light, mostly in a recent attempt to cherry-pick ~260 commits.

Firstly, it is hard to manually check a cherry-pick against the
original. The GitLab GUI allows you to click on both, but it does not
give a sense of the detail.

Secondly, commits have sometimes already been applied to the tree, but
in this case effort is still paid to cherry pick it, sometimes with
unfortunate results.

Thirdly, building once at the end does not catch every problems. In the
case in question, about five commits were mangled, three of which would
have been caught by doing a build.

This series introduces a new 'check' command which provides a simple
check of the diff delta between an original commit and its cherry pick.,
thus providing a list of suspect cherry-picks, e.g. (omitting some long
lines):

  Cherry-pick Delta% Original   Subject
  ----------- ------ ---------- -------
  aaea489b2a     100 9bab7d2a7c net: wget: let wget_with_dns work with
  e557daec17     100 f0315babfb hash: Plumb crc8 into the hash functions
  08a86f1769      40 6acada5daa configs: j7*: Enable TI_COMMON_CMD_OPTIONS
  de37f6abb6     100 fc37a73e66 fdt: Swap the signature for
  d1437b065a     100 e2cc9b4fc1 tools: binman: add 'fit, encrypt' property
  09b800b0df     100 12d7be498a Docker/CI: Only test Xtensa on amd64 hosts
  0256d8140c     100 ece1631f5e test/cmd/wget: replace bogus response with
  e005799d8f      33 15e0c5e390 lmb: Remove lmb_alloc_addr_flags()
  eaba5aae8f      79 99afa58e6d sandbox: Correct guard around readq/writeq
  c347fb4b1a      41 99145eec2d x86: select CONFIG_64BIT for X86_64
  14192a60e0      89 60a684e0a9 trace: add support for 'trace wipe'
  8f58cfe76d      66 905204ddcf test: test_trace.py: test 'trace wipe'
  12 problem commit(s) found

The -d option shows a diff of the patch diffs, which can aid a fast
review.

This series also includes some updates to the agent prompt to build
after each commit, some refactoring and tidy-ups to remove pylint
warnings and a way to tell the agent about possible already-applied
commits.

Further refinements will likely be needed as time goes on.
END

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
2025-12-24 14:26:41 -07:00
..
2025-07-26 23:55:02 +12:00
2024-10-21 20:51:23 -06:00
2024-09-12 17:35:37 +02:00
2025-08-04 14:39:59 -06:00