From patchwork Sat Feb 14 03:26:22 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1876 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=1771039619; bh=hgZHQ3gUl9Wix7W1vrScaHLCUv0C+Ka5pqarW+gFMf4=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=hpS5F6UhITYNG+eDttSR/2kMn8G0f9rojVsT8r2tt1OLu1XZc30yg81o/Iw9DN9aw v+7ARbHgVkKbPLRvnfGPoiR6BnWxA+QOruNZ8q8D7ue/bF2QjBEUZP8p8IcJubzwbe +jYgMncWysnSA44MLBCmpNhh+dZFZ7SqIUcvVwaH/afDAggc05hfFejqo2UYQ+hvt5 Tm4WvBjpOoTYUx8Vi2BWF0KngIBucIdCEI4z39WWLDMLX8vOE/Orvk9j5OY2zdeJuZ lTQbs8kyhEj3juA7glrTwP38ZclviOUNoOka+15vSp7Bft8GmLSiCshbhCmH764F7T OSvA/yGQk9bWg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4708569B71 for ; Fri, 13 Feb 2026 20:26:59 -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 wVB8ac6OxAg2 for ; Fri, 13 Feb 2026 20:26:59 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039619; bh=hgZHQ3gUl9Wix7W1vrScaHLCUv0C+Ka5pqarW+gFMf4=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=hpS5F6UhITYNG+eDttSR/2kMn8G0f9rojVsT8r2tt1OLu1XZc30yg81o/Iw9DN9aw v+7ARbHgVkKbPLRvnfGPoiR6BnWxA+QOruNZ8q8D7ue/bF2QjBEUZP8p8IcJubzwbe +jYgMncWysnSA44MLBCmpNhh+dZFZ7SqIUcvVwaH/afDAggc05hfFejqo2UYQ+hvt5 Tm4WvBjpOoTYUx8Vi2BWF0KngIBucIdCEI4z39WWLDMLX8vOE/Orvk9j5OY2zdeJuZ lTQbs8kyhEj3juA7glrTwP38ZclviOUNoOka+15vSp7Bft8GmLSiCshbhCmH764F7T OSvA/yGQk9bWg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3729569B5C for ; Fri, 13 Feb 2026 20:26:59 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039617; bh=0YZrhSXzuEaSGfXbxPp/b3WYAgqG0t1iNw/3V/FtxEg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VpEdVkZrCoB5GY5N93MLCZnV9HNe1eHnc9uDgDIE2fuyW1L13fXS4yYjTCFwt9rOM 6H1yaqYCo9iyGmhVWBl3rsZrxhfFhmLnd+RkJ5r1mJSl4H++kCxriHJi/bJMyRM0f7 PCjQgZAchfT1MUeNkX8/lzlWhobZFM7hhdlm9HfpEROMxwrnOLO/pnruCLm5BTO/wj H9Xi4QE6+yIZp1feqTExWL2MmLueb1QlIzowKMmyQaYdvMjnluslLlNSQJTFD7Hoy/ qIBfYadcR5NOnXRSrYW+2k55erXz8/sfwTlSN1xtHPKMU2PM0XTQR33ws7dX7BrtDa AME6HyGWvc1YQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3B60469B5C; Fri, 13 Feb 2026 20:26:57 -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 XNo8Q6G_Wpe3; Fri, 13 Feb 2026 20:26:57 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039612; bh=4kIAkllLAm+sGvgDV3pXzphUlT9ZG5op7hdLjuV3BWY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=viAgXoukDKMQZ/n0pQMMti+3U5zGE8gJAT9vZT8vLbZpf9YIX2BeaEGETQG9h+bOy PZDCY7s+rmOAYKUbI7VhnktshcZwbkA80C2O0fySVVbMzLkTClaDiuCHnWOBxgqNdM kP8IIAZ3p9a9vPbw8aPX/FM5RSlxFRxJ5OsdwMjDAFmU1W14JRgeX+Asw+DTBJankU V+hZq46Dpn5NY9/Q2xWoO7FlwNCpj9ZTGI4IeWLf0zJq/ZQx0V4pxTUe2cjwXB4tYZ EnquhU9hQqIZMWoqqBztfPeMHPZ/fmMZhCM/Kba4y0aoKDB/BTL2gmqkUhUztx1lgQ QnI9IAfKxyTbA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 9187D69A69; Fri, 13 Feb 2026 20:26:52 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 13 Feb 2026 20:26:22 -0700 Message-ID: <20260214032632.3957279-4-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260214032632.3957279-1-sjg@u-boot.org> References: <20260214032632.3957279-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: EDAZN2SGR2U57WNDNIWXK4EPWUGJIE2E X-Message-ID-Hash: EDAZN2SGR2U57WNDNIWXK4EPWUGJIE2E 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 , "Claude Opus 4 . 6" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 3/7] patman: Show summary after scanning commits 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 When scanning commits for a series, show a summary notice with the total count and how many were added or removed. This makes it easier to see at a glance what changed during a scan operation. Co-developed-by: Claude Opus 4.6 Signed-off-by: Simon Glass --- tools/patman/cseries.py | 15 +++++++++++++++ tools/patman/test_cseries.py | 4 +++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/tools/patman/cseries.py b/tools/patman/cseries.py index c94daf59e36..c5620985a09 100644 --- a/tools/patman/cseries.py +++ b/tools/patman/cseries.py @@ -803,13 +803,17 @@ class Cseries(cser_helper.CseriesHelper): if i is not None: del to_remove[i] + removed = 0 + added = 0 for seq, cmt in enumerate(ser.commits): if seq in to_remove: _show_item('-', seq, to_remove[seq].subject) del to_remove[seq] + removed += 1 if seq in to_add: _show_item('+', seq, to_add[seq].subject) del to_add[seq] + added += 1 else: _show_item(' ', seq, cmt.subject) seq = len(ser.commits) @@ -823,6 +827,17 @@ class Cseries(cser_helper.CseriesHelper): self._add_series_commits(ser, svid) if not dry_run: self.commit() + seq = len(ser.commits) + msg = '' + if added: + msg += f'{added} added' + if removed: + if msg: + msg += ', ' + msg += f'{removed} removed' + if msg: + msg = f' ({msg})' + tout.notice(f'Scanned {seq} commit{self.plural(seq)}{msg}') else: self.rollback() tout.info('Dry run completed') diff --git a/tools/patman/test_cseries.py b/tools/patman/test_cseries.py index b25debec3fe..a7750525ea6 100644 --- a/tools/patman/test_cseries.py +++ b/tools/patman/test_cseries.py @@ -3335,7 +3335,9 @@ Date: .* with terminal.capture() as (out, _): self.run_args('series', 'scan', '-M', pwork=True) - self.assertEqual(expect, out.getvalue()) + self.assertEqual( + expect + 'Scanned 3 commits (1 added, 1 removed)\n', + out.getvalue()) new_pcdict = cser.get_pcommit_dict(svid).values() self.assertEqual(len(old_pcdict), len(new_pcdict))