From patchwork Sun Mar 29 15:01:30 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 2079 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=1774796529; bh=KsaqcAijLCdfgi+KGePcL0X07RnZ+rqQd2ifS+zGYmc=; 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=ClI6YDxauYew/lXu826yr0HuUXhAfxgwLsOpa+2hridgj6APXJHDZZWrsZweuVAYQ soGUwjzfyHeDoKgUDCOP5r03X/TVSEGYB2apmQgDry6Jd1TrupMhxLYrT76nwcBn5v Ves5ZFRGIE3KI2cZIHHet2TxOLStCxlXhgx7jqfiq5e4QX6ydVx2doaIpEXLFl0WGd UoYb9DmNRngMH1A5dZYhzsyMyc44QLGo715eRBe8K4iP6rW+ITX1zyU3t7HpKINTSG MwlQ/hPpV2HpNWpUrM2I2sPrpCeMaYK9ksNRth5oammx4eObmPVXES8fLKl2gSBuv5 eBzLEtwB5rI6w== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DE82D6A2AB for ; Sun, 29 Mar 2026 09:02:09 -0600 (MDT) 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 K8MY6o8znnDe for ; Sun, 29 Mar 2026 09:02:09 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1774796528; bh=KsaqcAijLCdfgi+KGePcL0X07RnZ+rqQd2ifS+zGYmc=; 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=YvbCFnbv8cf7I+k6rGokVTotONCKSxREXnZ2zI1jw1jp8IUEZVFfn+vNXADTzD3bw Hs+bjTCTlNiH8S/IyNw0N/RWH3sE6zqpvdg4HEY122FK1RHcZ9f4QdAVASaPkwi/U2 ZAtz46R7nk+Go7fiAtCvsluzw0VVrhq4/nsflcKdWC9Bb2vOgIUrocHfYEqQcfAorr VuIWaTgONwemQRM7W+UEkcq9UHycsYI5iQ0w88MeIlACFLOWxLywairxycjcOkmB+7 AY8Gye6IaXQAkpTSgcn8GpPgIDUtf/jq6OWDHga0CfahoDAXCi/Es27lWWsr0AIUqz Vl+n2OBu4ahpA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 95CE26A2D1 for ; Sun, 29 Mar 2026 09:02:08 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1774796527; bh=ADtTjEqkXjzDIsPRjer6Z0UzOWG/MDLmKRm2nkpds90=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H7+ORbY8hqYoHtSIFk9fP9IaYm+RTjAUQXhnORuscn3osMygLZxAnypRJm8QipgyN vbsCYXVzvcdNDVxZZM43GMIW4RrCYK76aboeaolDJJ1OynabsEle2D45vCWmdSgviW qV8BAvcXPnDWdQF4PO/Inuk1QH6IQfFpxHBZRr1AGoJT0ocxA1XVspEFCA/mUECwmn aqlTciT1bwHe4zgt04lFp8okz7li/PO5galkpY1gGs25rWt8d9v2NpHBCw2kC1B5Bp JSjtuCYuCXrjGu9iQ/3uhRE5o70FmWQHz4b4TzncGS7ze/o0yNtVfQQan1SOt+NRLg Ev3XGVDyIvQaQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 42E136A2D2; Sun, 29 Mar 2026 09:02:07 -0600 (MDT) 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 2iWENlrVWTt7; Sun, 29 Mar 2026 09:02:07 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1774796523; bh=uxTTI+9yHFVRMJJLyb/t6RdHjZ2r9FrqrgKDPID3l6Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sTYNzGkQIkBFx1V2r1N9xfmBYe0hnHUMbHvW6bBKsR2sUmVXbvo0twpszkuaq0NnO Ast9MZZRROSPeetza1ePZPPQCPzzAWHxeVh89cEJFuOJVnQSf+CsOLcC10H/VflIkL zd4nY+Md4C530aqGT2jVvMBb4A1IQdP30fWmjfYow5Gli5tunS1R7OfL9//8kcU/rT T707nBYYJpis10lC+HyqfREMkMDcsjkJVGJhPDoc9GwN9LS/5hoBHK3Rzm2dnaOgtj bP+5cGs1C8aiFVDxCCq798ZhTRBwSSrfXEryQlgDObIWU2YAW8tHwsAImxDVpxQTmy Zsn9zrYGs4KTg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id D5EEB6A2D4; Sun, 29 Mar 2026 09:02:02 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Sun, 29 Mar 2026 09:01:30 -0600 Message-ID: <20260329150140.4095446-6-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260329150140.4095446-1-sjg@u-boot.org> References: <20260329150140.4095446-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: VA4XZUEAJTLC6RZWTFRQGEGDINKATY2Y X-Message-ID-Hash: VA4XZUEAJTLC6RZWTFRQGEGDINKATY2Y 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 05/11] patman: Use actual send count to determine likely_sent 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 Update send.py and func_test.py to handle the new (cmd, num_sent) tuple returned by gitutil.email_patches(). Use num_sent > 0 instead of the old heuristic, so workflow entries are only created when patches were actually sent. Signed-off-by: Simon Glass --- tools/patman/func_test.py | 2 +- tools/patman/send.py | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/patman/func_test.py b/tools/patman/func_test.py index d029181765c..b1f37577643 100644 --- a/tools/patman/func_test.py +++ b/tools/patman/func_test.py @@ -230,7 +230,7 @@ class TestFunctional(unittest.TestCase, TestCommon): cc_file = series.MakeCcFile(process_tags, cover_fname, not ignore_bad_tags, add_maintainers, None, get_maintainer_script, alias) - cmd = gitutil.email_patches( + cmd, _ = gitutil.email_patches( series, cover_fname, args, dry_run, not ignore_bad_tags, cc_file, alias, in_reply_to=in_reply_to, thread=None) series.ShowActions(args, cmd, process_tags, alias) diff --git a/tools/patman/send.py b/tools/patman/send.py index eb9a8e0da2e..db7d1ae6e4e 100644 --- a/tools/patman/send.py +++ b/tools/patman/send.py @@ -99,8 +99,9 @@ def email_patches(col, series, cover_fname, patch_files, process_tags, its_a_go, # Email the patches out (giving the user time to check / cancel) cmd = '' + num_sent = 0 if its_a_go: - cmd = gitutil.email_patches( + cmd, num_sent = gitutil.email_patches( series, cover_fname, patch_files, dry_run, not ignore_bad_tags, cc_file, alias=settings.alias, in_reply_to=in_reply_to, thread=thread, smtp_server=smtp_server, identity=identity, @@ -115,7 +116,7 @@ def email_patches(col, series, cover_fname, patch_files, process_tags, its_a_go, print(col.build(col.RED, "Email would not be sent")) os.remove(cc_file) - return cmd + return cmd, num_sent def prepare_patches(col, branch, count, start, end, ignore_binary, signoff, @@ -206,11 +207,11 @@ def send(args, git_dir=None, cwd=None): print(f"Using sendemail identity '{identity}'") its_a_go = ok or args.ignore_errors - cmd = email_patches( + cmd, num_sent = email_patches( col, series, cover_fname, patch_files, args.process_tags, its_a_go, args.ignore_bad_tags, args.add_maintainers, args.get_maintainer_script, args.limit, args.dry_run, args.in_reply_to, args.thread, args.smtp_server, identity=identity, cwd=cwd) - return cmd and its_a_go and not args.dry_run + return num_sent > 0