From patchwork Sat Feb 14 03:26:20 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1874 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=1771039609; bh=v4viCDfikxpZNVxRx2NXsdD5FCDb87aazKKHusVCgqk=; 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=A2LPgVidQCPIo5z0e1zyyJdWIDY80qPJZfTDEblv4kvUVUtdrwI5kD5gRzFfUWsGS oouLwnJiWINNo+9tpc+Zb1jnKDFqPA12qY/NCZg04MuKl2C1QjLjmGcxxPPY87uXFf AMO/1HY93/APdM4y0cpzhcfelsI5u6t7sUfudF6j8OyKDZKM5oR4GHj/pwqf5ezba2 OyJwZ6dpPLjJk1iJTLGOiBcDxQQ8BDwYvLh4qnDxBBu+/0Ybu6QG5UbrH91Dm5X+Cy qu8cpeA+SPfDZuVNR1nlYEf0+Wto82QPtP6CUsWxeEjVASfZ24XUxvdA1USqfkiqGB g6pwenpHU62RQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 28B5569B70 for ; Fri, 13 Feb 2026 20:26:49 -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 N8SYjxxIt8Zq for ; Fri, 13 Feb 2026 20:26:49 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039609; bh=v4viCDfikxpZNVxRx2NXsdD5FCDb87aazKKHusVCgqk=; 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=A2LPgVidQCPIo5z0e1zyyJdWIDY80qPJZfTDEblv4kvUVUtdrwI5kD5gRzFfUWsGS oouLwnJiWINNo+9tpc+Zb1jnKDFqPA12qY/NCZg04MuKl2C1QjLjmGcxxPPY87uXFf AMO/1HY93/APdM4y0cpzhcfelsI5u6t7sUfudF6j8OyKDZKM5oR4GHj/pwqf5ezba2 OyJwZ6dpPLjJk1iJTLGOiBcDxQQ8BDwYvLh4qnDxBBu+/0Ybu6QG5UbrH91Dm5X+Cy qu8cpeA+SPfDZuVNR1nlYEf0+Wto82QPtP6CUsWxeEjVASfZ24XUxvdA1USqfkiqGB g6pwenpHU62RQ== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 17CDF69B58 for ; Fri, 13 Feb 2026 20:26:49 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039607; bh=zw27u6MJOXjmS99kycHE9JCbAmGQLvNTU1HUGzLuviI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VtZOamZFKkJo1cI1DeYFPdX5tCT9eLJu6dgJSvxk/+zv4LdY211IR14rzbnkF7igk TGGmCmt9S2szkK5ax8fJCsWwv4g+iS1t+GDYzPHjVozUDsoE4BJd/q2ggTPQvEk5pk 80nDVhfF66WKynBet4B52wuD65RxaOAyD5r880mZSa3RbfwNApBOuddh0hC8p9nWz0 /ldOCORySJpXqbM416CkNZ5uZJYdkrLiF0lz9yOXxbF6BpFi29kdChfQxJx+ov6Jym ZVRA+pDiz/1OMP61QVcLAW0efJqmeFo4R4vcu5AqK8i0oMcEDqmLU9VkqEe/L+a/v5 EOYilIfmsCUkw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9ADB269B31; Fri, 13 Feb 2026 20:26:47 -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 IhY0hqyUD63B; Fri, 13 Feb 2026 20:26:47 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039603; bh=F2YkD2LNVxqhjoRF7PUlpVWXjaYp1huo1Iwp19Hf6XU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kGFt1qf5gT8NRZZCyrmJWGbtlyFre8kDMHeCeBys+KeabQTf7H53GGUqKyDMX+EK1 z08WeijUjKTT2HfNrVaL90/Eeqn0Uwqn6/A0UmJW+yhvvQkx0YClEnbApCqRDRsLUT EbbB7QB5RDDTRkBE98bXGED89E0B3vErMENdmNa2cUaluHaLo1oiOA9KNbZdBsYs80 F2jkgIiUMW2RAjE8Xdf7lfChHBdSwu/+1z8GvN1/DMQXTjbgsHZDTZzfIAkilNmfWN /YCRgSogt/DRP2IWc4PkODAyQR7pq1RxNVYODd/QYwxzeLXgEt3SuwxKx7m0rvt/Jn VFEambTPP1t0w== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 336A669A69; Fri, 13 Feb 2026 20:26:43 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 13 Feb 2026 20:26:20 -0700 Message-ID: <20260214032632.3957279-2-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: HNQCWQITAQ2QX2OEZ3L6VMZN7NFNERPS X-Message-ID-Hash: HNQCWQITAQ2QX2OEZ3L6VMZN7NFNERPS 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 1/7] patman: Fix leaked checkpatch output during tests 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 Some checkpatch warnings lack file/line information and are not covered by the no_file_match list. This causes spurious messages on stderr when running 'patman test': patman: failed to find file / line information: ERROR:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: ... WARNING:PRIV_AUTO: struct 'fred' should have a _priv suffix Broaden the Signed-off-by match to cover the NO_AUTHOR_SIGN_OFF variant, and add a pattern for the struct suffix warnings. Co-developed-by: Claude Opus 4.6 Signed-off-by: Simon Glass --- tools/patman/checkpatch.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py index fef07299acf..6f99a36a08d 100644 --- a/tools/patman/checkpatch.py +++ b/tools/patman/checkpatch.py @@ -92,8 +92,9 @@ def check_patch_parse_one_message(message): file_match = RE_FILE.search(message) # some messages have no file, catch those here no_file_match = any(s in message for s in [ - '\nSubject:', 'Missing Signed-off-by: line(s)', - 'does MAINTAINERS need updating' + '\nSubject:', 'Missing Signed-off-by:', + 'does MAINTAINERS need updating', + 'should have a', ]) if file_match: From patchwork Sat Feb 14 03:26:21 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1875 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=1771039614; bh=6eD3CgXVvOhEQ4fc3wcoL4I7N/Q27OLp//kD4uIwkKs=; 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=JZPgEC1qEqa+rqnYicnSMRH3J9keOBr1pEqKBPNNEIwmxrc3+yPc/pIV4Oop2z77m SeTlOG3hp/mBZey8jSU81dE7Bd1m49g+sImxgMUoM2BKFSDzmd1b0NSAXayGuFZ2qu Ivuig4OY7ADnxKTv2f+k3Q3dON2pu2AAe53JU49pQ6kMc9Dzi/raiOdsOLuPRQLoc6 7QRzlCILtd77VqxgIL6mAl2LarYZPBRGI27WEiib07/z6CJ+SugtSEQNvNfn7uzAIk 8zWpHIngDzf7qrbKj06Ly3CMXELMyMHHPGZsHq7E8DyAl3xAqFsl4OhjDrFj3pEzpM IapfusgKdOEVA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D53B469B71 for ; Fri, 13 Feb 2026 20:26:54 -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 3f3aKckNhll9 for ; Fri, 13 Feb 2026 20:26:54 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039614; bh=6eD3CgXVvOhEQ4fc3wcoL4I7N/Q27OLp//kD4uIwkKs=; 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=JZPgEC1qEqa+rqnYicnSMRH3J9keOBr1pEqKBPNNEIwmxrc3+yPc/pIV4Oop2z77m SeTlOG3hp/mBZey8jSU81dE7Bd1m49g+sImxgMUoM2BKFSDzmd1b0NSAXayGuFZ2qu Ivuig4OY7ADnxKTv2f+k3Q3dON2pu2AAe53JU49pQ6kMc9Dzi/raiOdsOLuPRQLoc6 7QRzlCILtd77VqxgIL6mAl2LarYZPBRGI27WEiib07/z6CJ+SugtSEQNvNfn7uzAIk 8zWpHIngDzf7qrbKj06Ly3CMXELMyMHHPGZsHq7E8DyAl3xAqFsl4OhjDrFj3pEzpM IapfusgKdOEVA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C564D69B5C for ; Fri, 13 Feb 2026 20:26:54 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039612; bh=8yXBlY6fbpLzoW443X9GdX2TfI7eFvcSjxAFNmhH61s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=paeufGxhrjbpZQdIb98lgV3eSqKUdXEGC6qKYv9m1lrOTn1ZwyHu+Ke2iDjL8FcG3 TY8MWM3raKdF81apD6H/ZpMmflS7jf1PK+4CQ6qVI/55tMjJUxsjIn2LWkaKUvPZR8 h8I9eYcaYd1zVWb3kJ1Z7x+v4+3l6m602E4QOobuitPhVUWNBbJEFP5N6bKsgVLoDa slCgIUye10/WDIjkD53xjXG0g92kpsuMv/CvtW4+zazWOCom8hXi7pCdRyf6KSUVxP 2K0DXaSXdnnWDKYiAy5gyClhgC+WVlV5Nb5ya2LEoay5ff6GDYa5E4dmQ0eJAz+L4Z B2NjnPqZKUubA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 5635E69B31; Fri, 13 Feb 2026 20:26:52 -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 ESxQvhZ7D8wx; Fri, 13 Feb 2026 20:26:52 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039608; bh=DRzIoxI+AOpvI3KoLC1mif2jELEALgCTTlX6AHnf5XA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mja1EZG/1kE0363r671Se8vJS9pvD2JZoDklOuj8MMq106muBQ9EmFqF0c8aQrAlu 3LMXp//EYN4zZ2CF+A55MIDpVGpWs4ymGSegESURkUki9b4zsWAnLTVLq6XcgNC2c/ ESO3t1+twcBOIQ9UIfmMvQ90q0NF+cMl2difi74swbHDHMceJYnIhgFCpEwjGXhPlk DxVxGrqptjz4diA9KR39XLsT6DcdNV8vdcHUKixbhIJeRkCE62fjo+fWvPOeQf1Yr4 TOQYF4I1JJtTseWKjJn6lMxtiENrW33M96VN88smbkRPH28/LBnoPE1EXGvGhxvn+W t+hJbKRaMmenA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id E03BE69A69; Fri, 13 Feb 2026 20:26:47 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 13 Feb 2026 20:26:21 -0700 Message-ID: <20260214032632.3957279-3-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: HQQU4TCTJDKULWV3CO3B53B3AD325RXT X-Message-ID-Hash: HQQU4TCTJDKULWV3CO3B53B3AD325RXT 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 2/7] patman: Add plural() helper to CseriesHelper 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 Add a simple helper method that returns 's' when a value is not 1, for use in formatting plural strings. Co-developed-by: Claude Opus 4.6 Signed-off-by: Simon Glass --- tools/patman/cser_helper.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/patman/cser_helper.py b/tools/patman/cser_helper.py index ec44357c252..ea9881fcf6f 100644 --- a/tools/patman/cser_helper.py +++ b/tools/patman/cser_helper.py @@ -304,6 +304,13 @@ class CseriesHelper: series.idnum = in_series.idnum series.name = in_series.name + def plural(self, val): + """Returns a string to make something plural + + So far this is very simple and just returns an 's' when needed + """ + return '' if val == 1 else 's' + def _handle_mark(self, branch_name, in_series, version, mark, allow_unmarked, force_version, dry_run): """Handle marking a series, checking for unmarked commits, etc. 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)) From patchwork Sat Feb 14 03:26:23 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1877 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=1771039624; bh=ELm9wey0USRDP/U7KEh2jKm68E5+HDVXG0fpwqwEr/g=; 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=lYUz4B2wscLLIDXXQgjf1cWtZoNikqG7zoiGbeYL8cBOaUI5RojlM021O9JgzYBBD khSqcBGgVsoAE717Z/L6OePVaEtbrlfuyN0A02QZ1D5vImDapr5JkSAINqUSAq3jvf rzpVN4/LRtZv9iQYSxJAoi7BChamrbMlgRRiFqBLFCulhobswB6//AvvL8uZPrGPzS JCIhQUgF2kxL/EkHcMp78TN1UXWLBMQubFaCxP99u8FaqVvo+urYfCmm8mWaYShAiw P14U2BJwmxUe7AgvsDweHxEc+TQj5RvuE7GwAslTshkN90IvNlrT1J6WI8wc9E0mLk AMcAR/87GLD2g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 051CE69B71 for ; Fri, 13 Feb 2026 20:27:04 -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 0fckLSKMKjky for ; Fri, 13 Feb 2026 20:27:03 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039623; bh=ELm9wey0USRDP/U7KEh2jKm68E5+HDVXG0fpwqwEr/g=; 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=C58eCmd989EmQgcOvbdJlv+SYMXjXXGth1piiZLh+zQ6hPV+Lh5X2e1cpzcQ6Ww2s JGaG/4tvYZY6QSN2xxsgAKw0MIMzmm3s2qU1QtKLJp0Rfbl2m0mLqvPPl+a6tlktxS B9z9cva3t1oeAgU3O/Vk3Q4pdHIKSMNrEfUSSzycl+KRorFblV0z0cu3cafG7Jarjr DfaDDBisc6f7N2YZIegQUd8wc54a6ZOKHvPQGxF9wSNbXr45O9IK9/qG1SfeFNQ5hu 8+5cWDX384Ts1AJZCC6Bc9vsn+qOX9gq/oJp3ZKtUkXwqaCnNhgqK9+LDlWYwFb7N0 jZKa73xihd8fA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E775C69B5C for ; Fri, 13 Feb 2026 20:27:03 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039621; bh=O9QAcKPikWtw8WD79FhRdHPWXXvyn3O0d906bg6Yjkw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mGujHU7ckeebpO/Ke6kHiDjSVyIz/PEHZpFJ7W4cS8CE0iQxzBHzoGmG01OB+CFsO 8m0HSlLUPkkrdcBX2vShX53qfwu0JSQB0FTg08i8afVHwOa6iEMXBO+Y7I234Kyz0E FUXkmoB1kGj1Tv/xhLoDSbo0rtbt8dFiA4OG97ovPRatPAWo74Ukl8af4RfFOHqH1c y3y5S1LyXwKvPBySCOurZNTAkYfWc/pXSOjnoP0eN8LaagOj6vTo9zvJmF5bArPUjr 9f0+fsDW0VFzVa6cYpVMuDNPWIc7780GrwtwcTn2dNrUhZ91wh3kPGXbWmbSKH6pp+ qWYI/+twA8+rA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9461F69B70; Fri, 13 Feb 2026 20:27: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 10026) with ESMTP id NPoZZsLwxBlk; Fri, 13 Feb 2026 20:27:01 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039617; bh=lcyPTj66LQP2lgHSfHnP4yb9WpTv8/yjhZF0OD40huU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SqxFeP8QtUZ0AgaYt+qhd3eKhr46+kN7SYj5h+RiVXWB611Bs15HVpmjs8/SQSnwd Pu9Nh9fCXsqIJJ/7bThQX1RF9fpLTf+gyT1LlhdyUdPB0dbxkQsB586jLPSRhZvydD L1DTmSj3MOHQJguoWvI/Xz+rCQW7T2hqIw9DwhgykmJiYxeOcC4QMawkAQ4WEOLMDn OnaGrv7sr2D+LUeNAVTht38glhunqPDoGGNEPEMhbkAv0sihQmjWXq3CMrMnTYyT8g ODscs8x0lZpk/+ZCtfEjLf+ETTJIBBt9h4ZBP4INouiZAtL781ZImG8PVn1FXdLHva 4rlI5I7YEzvfw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 0065A69B31; Fri, 13 Feb 2026 20:26:56 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 13 Feb 2026 20:26:23 -0700 Message-ID: <20260214032632.3957279-5-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: TNWOVZGE2753372ERHEQHR3NCM6PU5A3 X-Message-ID-Hash: TNWOVZGE2753372ERHEQHR3NCM6PU5A3 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 , Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 4/7] patman: Correct warning about missing series link 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 a series link is missing, a format string is shown instead of the correct error message. Fix it. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- tools/patman/control.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/patman/control.py b/tools/patman/control.py index 7d679ea02d6..338a58f4d75 100644 --- a/tools/patman/control.py +++ b/tools/patman/control.py @@ -95,7 +95,7 @@ def patchwork_status(branch, count, start, end, dest_branch, force, _, version = patchstream.split_name_version(branch) link = series.get_link_for_version(version, links) if not link: - raise ValueError('Series-links has no link for v{version}') + raise ValueError(f'Series-links has no link for v{version}') tout.debug(f"Link '{link}") # Allow the series to override the URL From patchwork Sat Feb 14 03:26:24 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1878 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=1771039628; bh=/BcU8HkD1XS7tfnuRDqOnmhoPqqlCvmGBj4YVAwOqhI=; 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=iO1c8Higp8TdI9NqgczsA71mtXcRpOT5c9j1dsmMud/0Lp9hWqXBSbtPjEjqsjwUY hGSQsWpvANqhi4mIRpp6IIqDP2ro7KDyCn4x5gKMlgwIqc329F36moCxhynBs8cCvu 41ZF7tl6mLloCz1tcjGd2iep4VWC87ISD6gTzJW8pccAnOJ420SppGNCIZSrBOAw5L SztrFTmjDF6WjLfJd5NCw7I25CE9jsXHbqTuqETMwS9/oeE7kGxVGE+i+yhtO3NWzj AbUr8hGv83EbqZm5wT8+CoNArPeqyVyWo1FDUiK+9vh/AT8immcJGOjQHoLDubzixF 41BBJnH2ws43g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 881B669B71 for ; Fri, 13 Feb 2026 20:27:08 -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 Jy7LMAxtQOG7 for ; Fri, 13 Feb 2026 20:27:08 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039628; bh=/BcU8HkD1XS7tfnuRDqOnmhoPqqlCvmGBj4YVAwOqhI=; 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=iO1c8Higp8TdI9NqgczsA71mtXcRpOT5c9j1dsmMud/0Lp9hWqXBSbtPjEjqsjwUY hGSQsWpvANqhi4mIRpp6IIqDP2ro7KDyCn4x5gKMlgwIqc329F36moCxhynBs8cCvu 41ZF7tl6mLloCz1tcjGd2iep4VWC87ISD6gTzJW8pccAnOJ420SppGNCIZSrBOAw5L SztrFTmjDF6WjLfJd5NCw7I25CE9jsXHbqTuqETMwS9/oeE7kGxVGE+i+yhtO3NWzj AbUr8hGv83EbqZm5wT8+CoNArPeqyVyWo1FDUiK+9vh/AT8immcJGOjQHoLDubzixF 41BBJnH2ws43g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 75B0569B5C for ; Fri, 13 Feb 2026 20:27:08 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039626; bh=UDpn8CKvQ9HtGUxqpV61BLkanIOgLIg19mauwcsNDCo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XqhbPtzNl241aNjBzhXINBWzfFhHOm5VQ8Rv+Ib08BKn3Say1h8PX91ZaEJsdRGfM 6l9s4uhCSN7g4as5oFJK+/SmK97qc0FezD7BeJESOy45MSegr5eSArwl3d1bgKx/TC QFrlqwPEZr5jN/DAcR8WnacQRKrYkH8By2sxw5ljuhqSCIi5fn4oGTS3MWhLFQJ9WG XP8eT1vqHXKWYIQOdwGexmXwxCGsDoxCPuKSgYO1akEYQhxWniKlHikIxE+IWA3+d8 0kgvfvrpOIVDncbQWUJ0e46bdhXWxn4rxrzqcmTO3kNdGYX6c2w4AsaKdp9wiI5z6X /W94a4s0lldXg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 72CE269B5C; Fri, 13 Feb 2026 20:27:06 -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 tJYhuYIKHjR2; Fri, 13 Feb 2026 20:27:06 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039622; bh=s3hxhjW3Z2GXUBPNb4o34LX9TPq6znDzsKLcCpGrPaA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=peW2kArWFhNhHEcMa4IL41QhW0GDfeHnKtQNoCVFySsg3mixCbZ2M7jx11GQeSoe8 LsaB0E4Oo4DAbN7R+K/MYeq9xMHbcKF9b+ot+JJD1QnuVwQ+MF0o88QNNSzYQWN1HZ cL7vkLNXdDMuNaq2CkFWFEwbLHQ4DrS/LyxwmKu8XmE12X/W7+g7EpCdRYnfpX/Ysq F5cveYs/u71w9cwwTKn3K4FWMS5IPeKtuT6mL1htPkf3dJ8UPCTfeotAvTppEPFLA2 eGMEfrInBAUU6cXEdyB8NylwQDGDotKEZFzY/asZO79JCWI6FfwtsErLEgytt3gZKs J+1WvUPbBfQ0g== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id ABAD469B31; Fri, 13 Feb 2026 20:27:01 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 13 Feb 2026 20:26:24 -0700 Message-ID: <20260214032632.3957279-6-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: V6SV3A3HIGABFO4PBC7JDF6WS7Y4N4PC X-Message-ID-Hash: V6SV3A3HIGABFO4PBC7JDF6WS7Y4N4PC 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 5/7] patman: Improve patchwork project-finding 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 Some patchwork instances return project names with trailing whitespace, which causes the exact string match to fail. Strip whitespace before comparing. Also add debug logging to show the projects being checked and which one matches, to help diagnose future issues. Co-developed-by: Claude Opus 4.6 Signed-off-by: Simon Glass --- tools/patman/control.py | 2 +- tools/patman/cseries.py | 13 +++++++++---- tools/patman/test_cseries.py | 8 ++++---- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/tools/patman/control.py b/tools/patman/control.py index 338a58f4d75..c6fede4305b 100644 --- a/tools/patman/control.py +++ b/tools/patman/control.py @@ -273,7 +273,7 @@ def patchwork(args, test_db=None, pwork=None): if not info: raise ValueError("Project has not been set; use 'patman patchwork set-project'") name, pwid, link_name = info - print(f"Project '{name}' patchwork-ID {pwid} link-name {link_name}") + print(f"Project '{name}' patchwork-ID {pwid} link-name '{link_name}'") else: raise ValueError(f"Unknown patchwork subcommand '{args.subcmd}'") finally: diff --git a/tools/patman/cseries.py b/tools/patman/cseries.py index c5620985a09..e8d40394608 100644 --- a/tools/patman/cseries.py +++ b/tools/patman/cseries.py @@ -634,20 +634,25 @@ class Cseries(cser_helper.CseriesHelper): name (str): Name of the project to use in patchwork quiet (bool): True to skip writing the message """ + tout.detail(f"Patchwork URL '{pwork.url}': finding name '{name}'") res = self.loop.run_until_complete(pwork.get_projects()) proj_id = None link_name = None for proj in res: - if proj['name'] == name: - proj_id = proj['id'] + pid, pname = proj['id'], proj['name'] + ok = pname.strip() == name + tout.detail(f"{pid:3} '{pname}'") + if ok: + proj_id = pid link_name = proj['link_name'] + tout.detail(f'Name match: ID {proj_id}') if not proj_id: raise ValueError(f"Unknown project name '{name}'") self.db.settings_update(name, proj_id, link_name) self.commit() if not quiet: - tout.info(f"Project '{name}' patchwork-ID {proj_id} " - f'link-name {link_name}') + tout.notice(f"Project '{name}' patchwork-ID {proj_id} " + f"link-name '{link_name}'") def project_get(self): """Get the details of the project diff --git a/tools/patman/test_cseries.py b/tools/patman/test_cseries.py index a7750525ea6..3aa8e0e739e 100644 --- a/tools/patman/test_cseries.py +++ b/tools/patman/test_cseries.py @@ -2389,7 +2389,7 @@ Tested-by: Mary Smith # yak with terminal.capture() as (out, _): cser.project_set(pwork, 'U-Boot') self.assertEqual( - f"Project 'U-Boot' patchwork-ID {self.PROJ_ID} link-name uboot", + f"Project 'U-Boot' patchwork-ID {self.PROJ_ID} link-name 'uboot'", out.getvalue().strip()) def test_patchwork_project_get(self): @@ -2400,7 +2400,7 @@ Tested-by: Mary Smith # yak with terminal.capture() as (out, _): cser.project_set(pwork, 'U-Boot') self.assertEqual( - f"Project 'U-Boot' patchwork-ID {self.PROJ_ID} link-name uboot", + f"Project 'U-Boot' patchwork-ID {self.PROJ_ID} link-name 'uboot'", out.getvalue().strip()) name, pwid, link_name = cser.project_get() @@ -2419,7 +2419,7 @@ Tested-by: Mary Smith # yak self.run_args('-P', 'https://url', 'patchwork', 'set-project', 'U-Boot', pwork=pwork) self.assertEqual( - f"Project 'U-Boot' patchwork-ID {self.PROJ_ID} link-name uboot", + f"Project 'U-Boot' patchwork-ID {self.PROJ_ID} link-name 'uboot'", out.getvalue().strip()) name, pwid, link_name = cser.project_get() @@ -2430,7 +2430,7 @@ Tested-by: Mary Smith # yak with terminal.capture() as (out, _): self.run_args('-P', 'https://url', 'patchwork', 'get-project') self.assertEqual( - f"Project 'U-Boot' patchwork-ID {self.PROJ_ID} link-name uboot", + f"Project 'U-Boot' patchwork-ID {self.PROJ_ID} link-name 'uboot'", out.getvalue().strip()) def check_series_list_patches(self): From patchwork Sat Feb 14 03:26:25 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1879 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=1771039633; bh=XQEjwi/Dj+/5V2CIZiBcuyUSktsphAMQtmQu32ieP4U=; 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=n871dFt7uOu0RO5uqw4JuKCrkVHG4OmMV5ECpzW/zGKfCrkLDp90CrxguR9OMT3EM +BL4dkmylsaYWsziaMyu5t0WyWgm5f0PSqL8SkIQ/zYp+kjlWURekgyTRH/9y8cA8y nctALbm+C3O3hPZyv9o9ie5EjS1Lv9nuRe7J+DJAz6l4telMFYFuEUDcU8k1plk65A t2JdGSCSTMWSflhBv7nBIvQYM2+JUqpGvapCBDE2hdBhIaWLVt5REFEn84qndPkLnT Sb+jm22e5bFCHzFNgHXTK2irFog54sm+xoeSF3WNzF/buWUNuepBDRpHqKXhb+yYih uQ3zguAlSUELw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0660969B31 for ; Fri, 13 Feb 2026 20:27:13 -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 H54Ybd7RDZCr for ; Fri, 13 Feb 2026 20:27:12 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039632; bh=XQEjwi/Dj+/5V2CIZiBcuyUSktsphAMQtmQu32ieP4U=; 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=oy0R/nGD+OM53FDwsvTvNZ6mCzLfMlB3psGlqb9Idz/4qbmFAL4rlw7U56GkPQMYv 64YMtGaZQY/8+7vCSpumQJEaOs7NvPOdtxhjy73EGixlow6W5EuOnDshLIs7Tz21Qz L/rkjnt6osmV3R97fedJcwJ4DXIhku70cpocFdAHK9coMLrxzHFbdpFNCBtTqxlue4 wF1BRBPPpI8Lhdd1n4l1ksMw8NtVakl8Dr8EnCtT1Chb4FNHiZoPoIoKO+5fHs8uTF iTlAQo8XsyCodUvFaGmnZMqxWAVIzAPsFIougOpyEho2XbgAn4cvts7sMEwOr7znYS v6oNBeA+oxdbA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E8F9E69B5C for ; Fri, 13 Feb 2026 20:27:12 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039630; bh=cX//ZQbUIqVPnpAeaoRWf/VRmXEIS20Y5TPPrq4SbSo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c8rdlF1J6dBqcH0lmvcUNs/pouj4OuwL+C1taJpacRSVXxA8EobBIl7QvHnF9J8Pv 6fZfJfEI0EfMiu3T0dHDWwLkQ8c0QWE3dPu4j8XftPhAIUaLHwKt4/af7JCbT+H0Z4 sXW/vzfI6JaltnFMY1LoXk1UDl0r2Kzeh73iHljCybqAuHHJgO1GfrDdw/FDUre0Yo PY14wQrIo93X1K1RUDCRmvFrw9kLU0ZrBLpgeGnrTuH1q5sV3hkn8IIcQB1DnG4EtQ 2EDK3d6zR/EEmgIw7gzqAB63FMOxMaD6F5/JIfzFY+VbxV+PjnKDOVAiQ2/PPN+8/+ /DHl22scoz2gg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DDD3969B31; Fri, 13 Feb 2026 20:27:10 -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 0sfukyefAI5N; Fri, 13 Feb 2026 20:27:10 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039626; bh=HE4PtP8VN6Foy4i/Ay0v2v6S4PWhESus/nN8/DX2s68=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AfEa8lnP8Eyz/CcZjFJK1qpsgHPFLCvB0fceArUgGJK/U9jNh9JUWRBr4IUwn+M37 uszltaE0nj7gVVRc6rG61rLCJQ9K3LZfUA2pOjM13TD9DDgfm+zRzHnZYZ8PK4KF0t 7IOZW2zbE3G+oVVa1k+b/u/TwJ6EzpMErEwMXb5ObW9aWuWRgHzfg20trvRIwV8zz5 xzZseKWqFrxIqNrZx9cUl1xi9MCfhfqxdUB6tUbMIBCgwDEPhFcfWhAVcdcdWQvIBf dO44DfbOsO9tP2/jug9h6O3/qSBF1X/FMFrERsuF6fXgwDrQh9SlkVf/kSmu2++6Jb /wT6mr3Y0j3lw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 6894D69A73; Fri, 13 Feb 2026 20:27:06 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 13 Feb 2026 20:26:25 -0700 Message-ID: <20260214032632.3957279-7-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: YBKHFAFJMPOPDG2WWAGRDBT57HOM5DWW X-Message-ID-Hash: YBKHFAFJMPOPDG2WWAGRDBT57HOM5DWW 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 6/7] patman: Change default log level to NOTICE 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 The default log level is INFO which suppresses useful status messages. Change it to NOTICE and promote key messages from info to notice so they are visible by default. This includes messages for series creation, link setting, autolink progress and series removal. Co-developed-by: Claude Opus 4.6 Signed-off-by: Simon Glass --- tools/patman/__main__.py | 2 +- tools/patman/cseries.py | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tools/patman/__main__.py b/tools/patman/__main__.py index edfb1b5927c..5dce54bf676 100755 --- a/tools/patman/__main__.py +++ b/tools/patman/__main__.py @@ -32,7 +32,7 @@ def run_patman(): if not args.debug: sys.tracebacklimit = 0 - tout.init(tout.INFO if args.verbose else tout.WARNING) + tout.init(tout.INFO if args.verbose else tout.NOTICE) # Run our reasonably good tests if args.cmd == 'test': diff --git a/tools/patman/cseries.py b/tools/patman/cseries.py index e8d40394608..937af58ba3e 100644 --- a/tools/patman/cseries.py +++ b/tools/patman/cseries.py @@ -94,7 +94,7 @@ class Cseries(cser_helper.CseriesHelper): count = len(ser.commits) msg += f" ({count} commit{'s' if count > 1 else ''})" if not added: - tout.info(f"Series '{ser.name}' v{version} already exists") + tout.notice(f"Series '{ser.name}' v{version} already exists") msg = None elif not dry_run: self.commit() @@ -105,7 +105,7 @@ class Cseries(cser_helper.CseriesHelper): ser.idnum = series_id if msg: - tout.info(msg) + tout.notice(msg) if dry_run: tout.info('Dry run completed') @@ -211,7 +211,8 @@ class Cseries(cser_helper.CseriesHelper): self._set_link(ser.idnum, ser.name, version, link, update_commit) self.commit() - tout.info(f"Setting link for series '{ser.name}' v{version} to {link}") + tout.notice( + f"Setting link for series '{ser.name}' v{version} to {link}") def link_get(self, series, version): """Get the patchwork link for a version of a series @@ -280,8 +281,8 @@ class Cseries(cser_helper.CseriesHelper): pwork, series, version) if pws: if wait_s: - tout.info('Link completed after ' - f'{self.get_time() - start} seconds') + tout.notice('Link completed after ' + f'{self.get_time() - start} seconds') break print(f"Possible matches for '{name}' v{version} desc '{desc}':") @@ -684,7 +685,7 @@ class Cseries(cser_helper.CseriesHelper): self.rollback() self.commit() - tout.info(f"Removed series '{name}'") + tout.notice(f"Removed series '{name}'") if dry_run: tout.info('Dry run completed') @@ -867,7 +868,7 @@ class Cseries(cser_helper.CseriesHelper): likely_sent = send.send(args, git_dir=self.gitdir, cwd=self.topdir) if likely_sent and autolink: - print(f'Autolinking with Patchwork ({autolink_wait} seconds)') + tout.notice(f'Autolinking with Patchwork ({autolink_wait} seconds)') self.link_auto(pwork, name, version, True, wait_s=autolink_wait) def archive(self, series): From patchwork Sat Feb 14 03:26:26 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1880 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=1771039637; bh=yF5MReEZXp/Tr7FEVKgWx+UryaJCNZs4IrCGvZxJbxk=; 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=cUOuqKiMCqQSlAY64VqirSqMTPGtQaVqN4KSE6VwuLl6iXi17tanHY1F89F8QdeVv rF+kkBayYaGpJAx+f/Zqy1L57NpjOBkpBWyoJp7Lmq/OEr9SPHJQpWjpuMncreCe7E to5Pgob3dVziE/TZMi6jWfPAhxTAC6SSaU9AUt0x9d/zyCDYKtGFTAySI6inYWPRZR jX/HgOfflSky8LDApvbxNEkdnPEnh7yCVmVdW6o/QFuZJ4pfPnRjMiJfwEJVG4H4j2 SFZnVV4P7aLy0Y9itkz8TTOgU17RfcUc88k8kBt6FoH7JCRi8LJi/vqAuz5uwu8Lwn iAcHeAQ3ibgUw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B3FFF69B70 for ; Fri, 13 Feb 2026 20:27:17 -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 7wTnDqFPY9VW for ; Fri, 13 Feb 2026 20:27:17 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039637; bh=yF5MReEZXp/Tr7FEVKgWx+UryaJCNZs4IrCGvZxJbxk=; 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=cUOuqKiMCqQSlAY64VqirSqMTPGtQaVqN4KSE6VwuLl6iXi17tanHY1F89F8QdeVv rF+kkBayYaGpJAx+f/Zqy1L57NpjOBkpBWyoJp7Lmq/OEr9SPHJQpWjpuMncreCe7E to5Pgob3dVziE/TZMi6jWfPAhxTAC6SSaU9AUt0x9d/zyCDYKtGFTAySI6inYWPRZR jX/HgOfflSky8LDApvbxNEkdnPEnh7yCVmVdW6o/QFuZJ4pfPnRjMiJfwEJVG4H4j2 SFZnVV4P7aLy0Y9itkz8TTOgU17RfcUc88k8kBt6FoH7JCRi8LJi/vqAuz5uwu8Lwn iAcHeAQ3ibgUw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A392669B31 for ; Fri, 13 Feb 2026 20:27:17 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039635; bh=jm4kxcsUE6yn9H+2bLrkTDOoCrD4VAdamqt0m+F1BvI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g4EoKnF5v3aFFG7LGDI7oZyGS3kMYOTAfqMMX5b70Tfk6rW6m4ev48CSFCQ6bEzgp XZ6COlv1B8UKN/0LClIbvMk283mLCwt8iiohd/gdHTFE5CbQHFPywHEMKQVvyx0p0c 63Ay3eNPCL8XiJXwCflqkseNV7flq4XWPuky6rT6zVcnank6b3LzJ2SzGvyq5uqIAr JIO1xYTSHA7vKjFWIJK+JA04VUt/htv3nZtDraUFDWmgGdgEaIfU5/sJN5P1QaVuDQ unFox/U1MPTxaK9EVjiLX9Ug2/zArL4gZ2wiML7cheTHCLOoOH5kqf5zc9eHHBcnda ScSFx2/55kOTQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id C137669B31; Fri, 13 Feb 2026 20:27:15 -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 nmWOkuN-CX8b; Fri, 13 Feb 2026 20:27:15 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1771039631; bh=/EfYS5bhTyQBS22U7wKaAjBs5ZgQcD8Ozr9vSjLGbCs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jotiv5IViPkXT4+h/N3BqOh5QvkxPrTlYwuXedw333Wp5PMMZoN8dKgvxqRM5F+SK NsjBFsRsPHK46y4CjtKfa97gWhMigEHZT8ZtvEuazBjR/q+16ooSE8AT9H9RIWrkrg lVEja21kpVPgNVDwSlBb6ZL0o6GiHS9Utjrvk7oFlAe+s2jQiS+xo0BqnrGzpel/ml Vy5nSvP5GTC9HbLNrl3Nis/yABJ4nh9Or5+27pV/7SOiYgj4DlrC5+YGZgfEkTEg85 DtdfD9KoarWtyeAbcJjZxNfGv2CNC/xNFSKQu20yH2KC6TxZO/Oas3ctEnH4RT48pP VgzEkNtFTOM0g== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 2F67F69A73; Fri, 13 Feb 2026 20:27:11 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Fri, 13 Feb 2026 20:26:26 -0700 Message-ID: <20260214032632.3957279-8-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: KZ3DDUPQI5W74NPFDSUI3SA32TZNKEDT X-Message-ID-Hash: KZ3DDUPQI5W74NPFDSUI3SA32TZNKEDT 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 7/7] patman: Show a notice for each series subcommand 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 Several series subcommands complete silently or only log at the info level, which is not visible with the default NOTICE log level. Add a tout.notice() summary to each action subcommand so the user sees confirmation of what was done. For subcommands that already have a summary at info level, promote it to notice. For those with no summary at all, add one. Also update tests to suppress the new output where needed. Co-developed-by: Claude Opus 4.6 Signed-off-by: Simon Glass --- tools/patman/cseries.py | 40 ++++++++++++----- tools/patman/test_cseries.py | 85 +++++++++++++++++++++++------------- 2 files changed, 83 insertions(+), 42 deletions(-) diff --git a/tools/patman/cseries.py b/tools/patman/cseries.py index 937af58ba3e..c90020b7eb6 100644 --- a/tools/patman/cseries.py +++ b/tools/patman/cseries.py @@ -142,7 +142,7 @@ class Cseries(cser_helper.CseriesHelper): del_branch = repo.lookup_branch(del_name) branch_oid = del_branch.peel(pygit2.enums.ObjectType.COMMIT).oid del_branch.delete() - print(f"Deleted branch '{del_name}' {oid(branch_oid)}") + tout.info(f"Deleted branch '{del_name}' {oid(branch_oid)}") self.db.ser_ver_remove(ser.idnum, max_vers) if not dry_run: @@ -150,6 +150,8 @@ class Cseries(cser_helper.CseriesHelper): else: self.rollback() + tout.notice(f"Decremented series '{ser.name}' to v{new_max}") + def increment(self, series_name, dry_run=False): """Increment a series to the next version and create a new branch @@ -191,7 +193,7 @@ class Cseries(cser_helper.CseriesHelper): self.rollback() # repo.head.set_target(amended) - tout.info(f'Added new branch {new_name}') + tout.notice(f"Incremented series '{ser.name}' to v{vers}") if dry_run: tout.info('Dry run completed') @@ -372,7 +374,7 @@ class Cseries(cser_helper.CseriesHelper): msg += f', {no_desc} missing description' if failed: msg += f', {failed} updated failed' - tout.info(msg + f' ({requests} requests)') + tout.notice(msg + f' ({requests} requests)') tout.info('') tout.info(f"{'Name':15} Version {'Description':40} Result") @@ -466,6 +468,9 @@ class Cseries(cser_helper.CseriesHelper): f'Marked commits {len(bad)}/{len(ser.commits)}') new_oid = self._mark_series(in_name, ser, dry_run=dry_run) + count = len(ser.commits) + tout.notice(f"Marked {count} commit{self.plural(count)}" + f" in series '{name}'") if dry_run: tout.info('Dry run completed') return new_oid @@ -510,6 +515,9 @@ class Cseries(cser_helper.CseriesHelper): else: vals.info = 'no mark' + count = len(ser.commits) + tout.notice(f"Unmarked {count} commit{self.plural(count)}" + f" in series '{name}'") if dry_run: tout.info('Dry run completed') return vals.oid @@ -756,7 +764,7 @@ class Cseries(cser_helper.CseriesHelper): else: self.rollback() - tout.info(f"Renamed series '{series}' to '{name}'") + tout.notice(f"Renamed series '{series}' to '{name}'") if dry_run: tout.info('Dry run completed') @@ -916,6 +924,9 @@ class Cseries(cser_helper.CseriesHelper): self.db.series_set_archived(ser.idnum, True) self.commit() + count = len(tag_info) + tout.notice(f"Archived series '{ser.name}'" + f" ({count} version{self.plural(count)})") def unarchive(self, series): """Unarchive a series @@ -958,6 +969,9 @@ class Cseries(cser_helper.CseriesHelper): self.db.ser_ver_set_archive_tag(idnum, None) self.commit() + count = len(tag_info) + tout.notice(f"Unarchived series '{ser.name}'" + f" ({count} version{self.plural(count)})") def status(self, pwork, series, version, show_comments, show_cover_comments=False): @@ -1029,9 +1043,9 @@ class Cseries(cser_helper.CseriesHelper): updated, updated_cover = self._sync_one( svid, ser.name, version, show_comments, show_cover_comments, gather_tags, cover, patches, dry_run) - tout.info(f"{updated} patch{'es' if updated != 1 else ''}" - f"{' and cover letter' if updated_cover else ''} " - f'updated ({stats.request_count} requests)') + tout.notice(f"{updated} patch{'es' if updated != 1 else ''}" + f"{' and cover letter' if updated_cover else ''} " + f'updated ({stats.request_count} requests)') if not dry_run: self.commit() @@ -1064,7 +1078,7 @@ class Cseries(cser_helper.CseriesHelper): add_newline = gather_tags tout.info('') - tout.info( + tout.notice( f"{tot_updated} patch{'es' if tot_updated != 1 else ''} and " f"{tot_cover} cover letter{'s' if tot_cover != 1 else ''} " f'updated, {missing} missing ' @@ -1084,6 +1098,7 @@ class Cseries(cser_helper.CseriesHelper): """ self.db.upstream_add(name, url) self.commit() + tout.notice(f"Added upstream '{name}' ({url})") def upstream_list(self): """List the upstream repos @@ -1106,6 +1121,8 @@ class Cseries(cser_helper.CseriesHelper): """ self.db.upstream_set_default(name) self.commit() + if name: + tout.notice(f"Set default upstream to '{name}'") def upstream_get_default(self): """Get the default upstream target @@ -1123,6 +1140,7 @@ class Cseries(cser_helper.CseriesHelper): """ self.db.upstream_delete(name) self.commit() + tout.notice(f"Deleted upstream '{name}'") def version_remove(self, name, version, dry_run=False): """Remove a version of a series from the database @@ -1147,7 +1165,7 @@ class Cseries(cser_helper.CseriesHelper): else: self.rollback() - tout.info(f"Removed version {version} from series '{name}'") + tout.notice(f"Removed version {version} from series '{name}'") if dry_run: tout.info('Dry run completed') @@ -1194,7 +1212,7 @@ class Cseries(cser_helper.CseriesHelper): else: self.rollback() - tout.info(f"Changed version {version} in series '{ser.name}' " - f"to {new_version} named '{new_name}'") + tout.notice(f"Changed version {version} in series '{ser.name}' " + f"to {new_version} named '{new_name}'") if dry_run: tout.info('Dry run completed') diff --git a/tools/patman/test_cseries.py b/tools/patman/test_cseries.py index 3aa8e0e739e..c8af0bb1db7 100644 --- a/tools/patman/test_cseries.py +++ b/tools/patman/test_cseries.py @@ -772,7 +772,8 @@ Tested-by: Mary Smith # yak def test_series_list_archived(self): """Archive a series and test listing it""" self.setup_second() - self.cser.archive('first') + with terminal.capture(): + self.cser.archive('first') with terminal.capture() as (out, _): self.run_args('series', 'ls', pwork=True) lines = out.getvalue().splitlines() @@ -877,7 +878,7 @@ Tested-by: Mary Smith # yak f'- add v2: {HASH_RE} as {HASH_RE} spi: SPI fixes') self.assertRegex( next(itr), f'Updating branch first2 from {HASH_RE} to {HASH_RE}') - self.assertEqual('Added new branch first2', next(itr)) + self.assertEqual("Incremented series 'first' to v2", next(itr)) return itr def test_series_link(self): @@ -1532,9 +1533,11 @@ Tested-by: Mary Smith # yak cser = next(cor) # Archive it and make sure it is invisible - cser.archive('first') + with terminal.capture(): + cser.archive('first') cser = next(cor) - cser.unarchive('first') + with terminal.capture(): + cser.unarchive('first') self.assertFalse(next(cor)) cor.close() @@ -1544,11 +1547,13 @@ Tested-by: Mary Smith # yak cser = next(cor) # Archive it and make sure it is invisible - self.run_args('series', '-s', 'first', 'archive', pwork=True, - cser=cser) + with terminal.capture(): + self.run_args('series', '-s', 'first', 'archive', pwork=True, + cser=cser) next(cor) - self.run_args('series', '-s', 'first', 'unarchive', pwork=True, - cser=cser) + with terminal.capture(): + self.run_args('series', '-s', 'first', 'unarchive', pwork=True, + cser=cser) self.assertFalse(next(cor)) cor.close() @@ -1696,10 +1701,11 @@ Tested-by: Mary Smith # yak with terminal.capture() as (out, _): cser.decrement('first') lines = out.getvalue().splitlines() - self.assertEqual(2, len(lines)) + self.assertEqual(3, len(lines)) self.assertEqual("Removing series 'first' v2", lines[0]) self.assertEqual( f"Deleted branch 'first2' {str(branch_oid)[:10]}", lines[1]) + self.assertEqual("Decremented series 'first' to v1", lines[2]) svdict = cser.get_ser_ver_dict() self.assertEqual(1, len(svdict)) @@ -1720,12 +1726,14 @@ Tested-by: Mary Smith # yak """Test adding an upsream""" cser = self.get_cser() - cser.upstream_add('us', 'https://one') + with terminal.capture(): + cser.upstream_add('us', 'https://one') ulist = cser.get_upstream_dict() self.assertEqual(1, len(ulist)) self.assertEqual(('https://one', None), ulist['us']) - cser.upstream_add('ci', 'git@two') + with terminal.capture(): + cser.upstream_add('ci', 'git@two') ulist = cser.get_upstream_dict() self.assertEqual(2, len(ulist)) self.assertEqual(('https://one', None), ulist['us']) @@ -1762,17 +1770,21 @@ Tested-by: Mary Smith # yak cser.upstream_set_default('us') self.assertEqual("No such upstream 'us'", str(exc.exception)) - cser.upstream_add('us', 'https://one') - cser.upstream_add('ci', 'git@two') + with terminal.capture(): + cser.upstream_add('us', 'https://one') + cser.upstream_add('ci', 'git@two') self.assertIsNone(cser.upstream_get_default()) - cser.upstream_set_default('us') + with terminal.capture(): + cser.upstream_set_default('us') self.assertEqual('us', cser.upstream_get_default()) - cser.upstream_set_default('us') + with terminal.capture(): + cser.upstream_set_default('us') - cser.upstream_set_default('ci') + with terminal.capture(): + cser.upstream_set_default('ci') self.assertEqual('ci', cser.upstream_get_default()) with terminal.capture() as (out, _): @@ -1792,19 +1804,22 @@ Tested-by: Mary Smith # yak self.assertEqual("patman: ValueError: No such upstream 'us'", out.getvalue().strip().splitlines()[-1]) - self.run_args('upstream', 'add', 'us', 'https://one') - self.run_args('upstream', 'add', 'ci', 'git@two') + with terminal.capture(): + self.run_args('upstream', 'add', 'us', 'https://one') + self.run_args('upstream', 'add', 'ci', 'git@two') with terminal.capture() as (out, _): self.run_args('upstream', 'default') self.assertEqual('unset', out.getvalue().strip()) - self.run_args('upstream', 'default', 'us') + with terminal.capture(): + self.run_args('upstream', 'default', 'us') with terminal.capture() as (out, _): self.run_args('upstream', 'default') self.assertEqual('us', out.getvalue().strip()) - self.run_args('upstream', 'default', 'ci') + with terminal.capture(): + self.run_args('upstream', 'default', 'ci') with terminal.capture() as (out, _): self.run_args('upstream', 'default') self.assertEqual('ci', out.getvalue().strip()) @@ -1825,14 +1840,17 @@ Tested-by: Mary Smith # yak cser.upstream_delete('us') self.assertEqual("No such upstream 'us'", str(exc.exception)) - cser.upstream_add('us', 'https://one') - cser.upstream_add('ci', 'git@two') + with terminal.capture(): + cser.upstream_add('us', 'https://one') + cser.upstream_add('ci', 'git@two') - cser.upstream_set_default('us') - cser.upstream_delete('us') + with terminal.capture(): + cser.upstream_set_default('us') + cser.upstream_delete('us') self.assertIsNone(cser.upstream_get_default()) - cser.upstream_delete('ci') + with terminal.capture(): + cser.upstream_delete('ci') ulist = cser.get_upstream_dict() self.assertFalse(ulist) @@ -1843,17 +1861,20 @@ Tested-by: Mary Smith # yak self.assertEqual("patman: ValueError: No such upstream 'us'", out.getvalue().strip().splitlines()[-1]) - self.run_args('us', 'add', 'us', 'https://one') - self.run_args('us', 'add', 'ci', 'git@two') + with terminal.capture(): + self.run_args('us', 'add', 'us', 'https://one') + self.run_args('us', 'add', 'ci', 'git@two') - self.run_args('upstream', 'default', 'us') - self.run_args('upstream', 'delete', 'us') + with terminal.capture(): + self.run_args('upstream', 'default', 'us') + self.run_args('upstream', 'delete', 'us') with terminal.capture() as (out, _): self.run_args('upstream', 'default', 'us', expect_ret=1) self.assertEqual("patman: ValueError: No such upstream 'us'", out.getvalue().strip()) - self.run_args('upstream', 'delete', 'ci') + with terminal.capture(): + self.run_args('upstream', 'delete', 'ci') with terminal.capture() as (out, _): self.run_args('upstream', 'list') self.assertFalse(out.getvalue().strip()) @@ -2003,6 +2024,7 @@ Tested-by: Mary Smith # yak f'- unmarked: {HASH_RE} as {HASH_RE} spi: SPI fixes') self.assertRegex( next(itr), f'Updating branch first from {HASH_RE} to {HASH_RE}') + self.assertEqual("Unmarked 2 commits in series 'first'", next(itr)) self.assertEqual('Dry run completed', next(itr)) with self.stage('unmark'): @@ -3086,7 +3108,8 @@ Date: .* def test_series_progress_all_archived(self): """Test showing progress for all cseries including archived ones""" self.setup_second() - self.cser.archive('first') + with terminal.capture(): + self.cser.archive('first') with self.stage('progress without archived'): with terminal.capture() as (out, _):