When the merge commit's subject isn't found in the target branch (e.g.,
because commits were cherry-picked individually rather than merged),
also check if all individual non-merge commits in the range have
matching subjects in the target. If so, treat the merge as applied.
This handles cases where a series was applied to ci/master via
individual cherry-picks rather than a merge, such as when GitLab CI
cherry-picks commits directly.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-developed-by: Claude <noreply@anthropic.com>
When looking for the next set of commits to cherry-pick, check if each
merge commit's subject already exists in the target branch. If found,
add all commits from that merge to the database as 'applied' and
advance the source position past that merge.
This allows pickman to automatically catch up with commits that were
manually cherry-picked outside the tool. When running 'poll' or 'step',
pickman now progressively works through merges, recording applied ones
in the database before finding the next merge that needs an MR.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-developed-by: Claude <noreply@anthropic.com>
When running 'sync -n' (dry-run), show the commits that would be
synced by default. This makes dry-run more useful since the user
can see exactly what would change without needing -v.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-developed-by: Claude <noreply@anthropic.com>
Add a new 'sync' command that checks all pending commits in the database
and marks any that have been manually cherry-picked to the target branch
as 'applied'. This allows pickman to maintain an accurate picture of
what has been applied, even when commits are cherry-picked outside the
tool.
The command:
- Iterates through all pending commits for each source
- Searches the target branch for commits with matching subjects
- Updates matching commits to 'applied' status with cherry_hash
- Supports --dry-run to preview changes
- Supports --verbose for detailed output
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-developed-by: Claude <noreply@anthropic.com>
When using group-orphans, if all commits within a merge group have
been applied, display the '[applied]' status in green to provide a
clear visual indication that the entire merge has been successfully
cherry-picked.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-developed-by: Claude <noreply@anthropic.com>
Add a Commit Statuses section explaining the meaning of each status
value in the pcommit table:
- pending: In open MR, not yet merged
- applied: Successfully cherry-picked and MR merged
- skipped: Intentionally skipped (reviewer request or already applied)
- conflict: Cherry-pick failed with unresolved conflicts
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Document the following commands that were missing from README.rst:
- list-mrs: List pickman merge requests from GitLab
- list-orphans: List commits with no MR link in database
- link-orphans: Match orphan commits to MRs by subject
- group-orphans: Group orphan commits by parent merge on source branch
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Add a top-level --colour argument that forces color output even when
stdout is not a terminal. This passes COLOR_ALWAYS to the Color
constructor instead of COLOR_IF_TERMINAL.
The option can also be specified as -c or --col for convenience.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Remove the --no-colour command line argument and instead use the
Color.enabled() method to determine whether to pass --color=always
to diff. The Color class already handles terminal detection, so
this simplifies the interface.
Update show_commit_diff() to take a Color instance instead of a
no_colour boolean, and update show_check_summary() accordingly.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Update format_problem_commit() and show_check_summary() to receive
the Color instance as a parameter instead of creating their own.
This ensures consistent color handling through the context.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Refactor command handlers to receive a Context named tuple containing
both the database instance and a Color instance, rather than just the
database. This avoids creating Color() objects repeatedly in different
functions.
The Context namedtuple has two fields:
- dbs: Database instance for persistence
- col: terminal.Color instance for colored output
Update all command handlers and helper functions to use ctx.dbs instead
of dbs, and ctx.col where color output is needed. Add make_ctx() helper
in the test file to create Context objects from database instances.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Add a new command that groups orphan commits (those without an MR link)
by their parent merge commit on the source branch (us/next). This helps
visualize which commits belong together based on the upstream merge
structure.
The command:
- Finds the oldest orphan commit to limit the search range
- Scans first-parent merges on us/next
- For each merge, identifies commits between ^1 and ^2
- Groups orphan commits by which merge contains them
- Shows color-coded status (green for applied, yellow for pending)
- Separately lists ungrouped commits and merge commits
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Add a command to retroactively link orphan commits (commits with no MR
link in the database) to their corresponding MRs by matching commit
subjects.
This helps fix the database when commits were imported before proper
MR tracking was in place. The command:
- Fetches all merged pickman MRs from GitLab
- Gets commit subjects from each MR
- Matches orphan commits by subject and updates the database
- Shows commits that couldn't be matched
Use --dry-run to preview what would be linked without making changes.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Add a command to list commits in the database that have no merge
request link. These are typically commits that were imported when
setting up pickman or commits whose MR wasn't properly tracked.
Supports filtering by status with -s pending/applied/all.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Add commits_count field to PickmanMr namedtuple and display it in
the list-mrs output for all MRs, e.g. "[3 commits]".
Use ThreadPoolExecutor to fetch MR details in parallel, reducing
time for many MRs from O(n) to roughly O(n/8) with 8 worker threads.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Add a new 'list-mrs' command to list pickman merge requests from GitLab,
showing their status (conflicts, needs rebase) for open MRs.
Fix the merge status display in 'next-merges' to properly distinguish
between:
- [DONE]: All commits have 'applied' status (actually merged)
- [IN MR]: All commits in database but still 'pending' (in open MR)
- [N/M to pick]: Some commits not yet in database
Previously, commits in an open MR were incorrectly shown as [DONE]
because they were in the database, even though the MR wasn't merged.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Add status indicators to the next-merges command to show which merges
have already been processed:
- [DONE]: All commits in the merge are in the database
- [N/M pending]: N of M commits still need processing
This helps identify why poll/apply might skip certain merges and shows
which merge will be picked up next.
Add get_merge_status() helper to check each merge's commits against
the database.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
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>
Create an AgentCommit namedtuple for passing data to the agent to save
confusing about ordering.
Document CommitInfo while we are here.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add a --diff/-d option to the check command that displays the difference
between the original commit and the cherry-picked commit for commits
which show a large discrepancy. This helps identify what changed during
the cherry-pick process.
Also add a --no-colour option to disable coloured output when needed,
e.g. when outputting to a log file.
Features:
- Shows unified diff between original and cherry-picked patch content
- Uses coloured output by default, can be disabled with --no-colour
- Works in both verbose and summary modes
- Includes comprehensive tests for both colour modes
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Some cherry-picks end up with large deltas compared to their original
commits, indicating potential problems. Add a check command to identify
these commits for review.
The check command:
- Analyses all commits on current branch vs ci/master
- Compares original vs cherry-picked commit statistics
- Shows commits with deltas above threshold (default 20%)
- Supports verbose mode with detailed analysis
- Color codes results: red ≥50%, yellow ≥threshold
- Skips merge commits and small commits (default <10 lines)
Also enhance the cherry-pick agent to:
- Check delta after each commit and build validation
- Attempt recovery for large deltas before continuing
- Build each commit individually for early problem detection
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add per-commit delta-checking and build-validation to the cherry-pick
and review agents:
- Check commit deltas after each cherry-pick to catch problems early
- Run buildman after each commit instead of only at the end
- Add recovery strategies for commits with large deltas
- Include delta checking in rebase operations
- Improve error handling and reporting
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add too-many-positional-arguments to existing pylint-disable comments
for functions with many parameters:
- agent.py: 4 functions updated
- control.py: 1 function updated
- database.py: 2 functions updated
- gitlab_api.py: 1 function updated
These functions require many parameters for their interface contracts
and the warnings don't add value.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Replace long, hardcoded URLs in tests with named constants defined at
the top of the file. This improves code maintainability by providing a
single point of change for test URLs and helps with line-length
violations.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Break long lines to comply with 80-character limit and remove trailing
whitespace across agent.py, control.py, database.py, gitlab_api.py, and
__main__.py
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Judith Mendez <jm@ti.com> says:
This patch series adds config options for Sitara K3 boards
to support MMC UHS modes.
While testing with SD card boot and eMMC boot,
found missing eMMC boot support for am62ax in am62a7_init,
patch 1/7, and missing config option to support eMMC boot.
While we are here, for am62ax, enable config option to
change MMC bus modes and enable r5 SDHCI ADMA for faster boot
time.
Also for all k3 Sitara boards, cleanup MMC ENV configs that
are no longer needed since we no longer load env from MMC
device.
Link: https://lore.kernel.org/r/20241220203704.2076499-1-jm@ti.com
(cherry picked from commit abc4a9dbfd)
Add the basic 'hello world ta' command which increment
of the value passed. This provides easy test for
establishing a session with OP-TEE TA and verify.
It includes following "hello world ta" subcommands:
optee hello; default value '0' is passed and gets incremented.
optee hello <value>; value to increment via OP-TEE HELLO
WORLD TA.
To enable the OP-TEE side HELLO WORLD example please refer
https://optee.readthedocs.io/en/latest/building/gits/optee_examples/optee_examples.html
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
(cherry picked from commit e3cf80fbe0)
Enable MMC_SPEED_MODE_SET config option in defconfig to enable
changing MMC bus modes with mmc rescan for am62ax device.
Signed-off-by: Judith Mendez <jm@ti.com>
(cherry picked from commit 9cdb04101d)
Enable SPL_MMC_SDHCI_ADMA config option for r5 SPL
to improve boot time during r5 SPL stage.
Signed-off-by: Judith Mendez <jm@ti.com>
(cherry picked from commit 72355e74db)
Since we do not load env from MMC device anymore, remove
any MMC env config options.
Signed-off-by: Judith Mendez <jm@ti.com>
(cherry picked from commit c106c882bd)
This adds FS and raw boot mode support for eMMC similar to other K3
platforms.
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
(cherry picked from commit aa14b5ec13)
Linux DTS compatible MDIO bitbanging driver.
Both clause 22 and clause 45 MDIO supported and validated.
Heavily based on the Linux drivers (more or less the same code base).
Signed-off-by: Markus Gothe <markus.gothe@genexis.eu>
(cherry picked from commit 3912611cd1)
This reverts commit 431be621c6.
Section 3.3 of Reduced Gigabit Media Independent Interface (RGMII)
Version 2.0 (4/1/2002) details that a PHYs using a ~2ns internal delay
are referred to as RGMII-ID. This internal delay is optional.
Page 147-148 of the Marvell Doc. No. MV-S107146-U0 Rev. F details
timings of the RX/TX delays. We see that with the TX/RX_CLK delay
enabled, our RX/TX_CTL signal is shifted w.r.t CLK to reflect the delay
added.
In 431be62 there is no timing difference between RGMII and RGMII-ID, and
so programmers wanting to explicitly set their PHY to RGMII will find
that delay added anyway. This could throw off timing if that internal
delay is undesired.
We should be handling all 4 possible RGMII cases of PHY_INTERFACE_MODE:
RGMII, RGMII_ID, RGMII_TXID, and RGMII_RXID. Reverting 431be62
implements this.
See also m88e1111_config_init_rgmii_delays in the equivalent driver in
Linux (drivers/net/phy/marvell.c), which does not set these delays in
RGMII mode.
68e6eca was tested out on an 88E1512 PHY in RGMII-ID mode. This
reversion has been tested by myself on an 88E1518 in RGMII-ID mode. This
patch affects boards using this driver in "rgmii" mode, as the internal
delay will no longer be enabled. Namely kikwood-nsa310s.
Signed-off-by: Rufus Segar <rhs@riseup.net>
(cherry picked from commit c5cda4ae4a)
Move to using OF_UPSTREAM config and thus using the devicetree
subtree and remove unused device tree files.
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Acked-by: Sumit Garg <sumit.garg@linaro.org>
(cherry picked from commit d4749f55f2)
Currently the driver relies on bootph flag to probe it during PRE_RELOC
stage but with the upcoming cleanup of v6.13, we don't have the bootph
property in the parent nodes anymore and ti_sci driver being one of the
parent nodes required during SPL stage would end up hampering the probe
model [0].
Add DM_FLAG_PRE_RELOC to ti_sci driver for mitigating this issue.
[0]: https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/21
Suggested-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
(cherry picked from commit 998e00cfce)