From patchwork Wed Dec 24 21:30:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 75 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1766611861; bh=vntt1PTLzfxRSruYjhQa1CqGT9LJGFyuP8ov1JKPY+g=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=u6dhHC4jIZURo0yB607UMQhGp3ksNHKaBKp4XgM/u9NKAXgW/I7CHzLQMOSk+wVUM HufhyvYeLRsQoLS+HqIkq+rc0SxXhB4GvsspvJbJ9mugWZposVXI36gBBu4+jD1ZX7 dTf3r8H0q5R1xLBQU7O4+X35RRedpy70ebrOpcd5wS14baPyOiac5eRUeYZVIoJFks J4XniI/a/AA8mTsU0iMukhp68CkS2q2Yjw/XMwpdkgyeo8hpQmXNQXT4TLjgZqdSZB EFvoekjbAaCKKi8nnr7RvmHa6dtpV1PUH0qZqhlNi932IJwQAMibQejYUXJNB6O/10 +I4OQQrdIRqpg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2B16564E30 for ; Wed, 24 Dec 2025 14:31:01 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id wZdHrUhNLCQe for ; Wed, 24 Dec 2025 14:31:01 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1766611861; bh=vntt1PTLzfxRSruYjhQa1CqGT9LJGFyuP8ov1JKPY+g=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=u6dhHC4jIZURo0yB607UMQhGp3ksNHKaBKp4XgM/u9NKAXgW/I7CHzLQMOSk+wVUM HufhyvYeLRsQoLS+HqIkq+rc0SxXhB4GvsspvJbJ9mugWZposVXI36gBBu4+jD1ZX7 dTf3r8H0q5R1xLBQU7O4+X35RRedpy70ebrOpcd5wS14baPyOiac5eRUeYZVIoJFks J4XniI/a/AA8mTsU0iMukhp68CkS2q2Yjw/XMwpdkgyeo8hpQmXNQXT4TLjgZqdSZB EFvoekjbAaCKKi8nnr7RvmHa6dtpV1PUH0qZqhlNi932IJwQAMibQejYUXJNB6O/10 +I4OQQrdIRqpg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 16C4D64DD8 for ; Wed, 24 Dec 2025 14:31:01 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1766611855; bh=5EGWG8he0zcFXTAOEIWGeA95i30S1PLRo4of2MzAxa4=; h=From:To:Cc:Subject:Date:From; b=spsdeAADpYgXilJ7WZ7PhseylaIUZBJvoNaK5nB2iZw3xAImfgCnOYDduOHnptAvS W6Y1Ae9Hnblne00emqP3yDlSJsreiWl31s5a6Ao/r4hLSAGcARfwxqkIQ1AebsxgVu Jlfk4Wibk54cMgaatrsf3oRUShBp7gFsKdOGb24cExhSJGcXQnDhQ9ZlEzueB/Z5DD 3vYbseUE3ZpoPndlRb8SnxJXeawEsoIKtSgeZnzuf+iJz+3GqpF3uBlUZKj6P8Z+ju 4dnSS6cN3w9AMykhc9DHTLUd+ZXQSitKgbYoEDG3oZS9CtiAZGswy3gAJ/eOGI18Dn hbVNMFoX0VOlg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id F101764DD5; Wed, 24 Dec 2025 14:30:55 -0700 (MST) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id ccI__Tx9fyuY; Wed, 24 Dec 2025 14:30:55 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1766611851; bh=+nrHXdFsDv8LYP8nX6v/YQgRt9v6N85GM+u1QybIWis=; h=From:To:Cc:Subject:Date:From; b=NkUPbmNKC4R9MjjwCFAsiPs+H0k624EpMZH4lEuWN+1LGPuv263OBbIso4EgKUIuI wyOixcUkUnzUYOGnNN8d23/Ck43x8nmpS5aCw4Tq70NgjUxxDyHY+Mo0wURZACr+7W jXsIbcxUREWXEXVdjTPkUvfYikleYF0fkRL7KRwyqOZmd4jAiIrO+s8dp1jPLxyr1I 8IXF6sXeO7W+akzycHlFxqScbEHL+SyUs8SuNZhVe8Seuu+WminksvzfVUPGH7Msxa /nvf3oXkaX3mOr2wT36UM89gfU68GWank/P3enViKL18QA1fLuxuGS9HbZHv2BrIzs sGrXcs2eWeJjA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 66E8664CA9; Wed, 24 Dec 2025 14:30:51 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Wed, 24 Dec 2025 14:30:31 -0700 Message-ID: <20251224213045.3010514-1-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: JEGJAMZBW6WO2M4PU6VKIVF2AZPY2COA X-Message-ID-Hash: JEGJAMZBW6WO2M4PU6VKIVF2AZPY2COA X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 0/9] pickman: Provide better ways to check cherry-picks List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass 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. Simon Glass (9): pickman: Fix 80-column line length compliance pickman: Add URL constants to improve test readability pickman: Improve function names and line-length compliance pickman: Disable pylint too-many-positional-arguments warnings pickman: Enhance agent prompts with per-commit validation pickman: Add a check command for cherry-pick delta analysis pickman: Add an option to show patch diffs pickman: Use named tuples for better code clarity pickman: Add already-applied commit detection / comparison tools/pickman/README.rst | 61 ++- tools/pickman/__main__.py | 73 +++- tools/pickman/agent.py | 105 +++-- tools/pickman/control.py | 596 +++++++++++++++++++++++++++-- tools/pickman/database.py | 11 +- tools/pickman/ftest.py | 744 ++++++++++++++++++++++++++++-------- tools/pickman/gitlab_api.py | 17 +- 7 files changed, 1341 insertions(+), 266 deletions(-) Signed-off-by: Simon Glass