From patchwork Thu Feb 26 20:00:28 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1959 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=1772136178; bh=6afjNOWHc+1z07vbtzngmBjH19pb/+XqLj/w0OUovEc=; 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=wgp2au1cNu9odHkqE0+k8USpT+pSKk4ItFMdiAkkwmCn8Y088bxXe6If3GUoyCyNS UPUzNzS/6Iz8i0GM3lvaemRkYAYzwVoS0/Kk84UsR1BhQWmiaMWlP8IVOeT1cqNhjw 5A1k7sa3OXxOiq9pBeb4jCPgcR5nttgHOeqWU3u43t8v4Lts6WO5Hp1SGKD/OtNGa5 UYjHjnl02/HwMg4J9yJJCU8Au7w42EBhriE+EpBtC26DaOGatdqdWtn+4YgcGJ0VeL DPQ6mQzyR9CypHyRWwwez9GaktsG436FSK2dXdelGUcDQibeu+vd1D848GD6eRKqjR DtOAA3Dnf9l+g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 15D6169D4A for ; Thu, 26 Feb 2026 13:02:58 -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 2rIp3L55-DOp for ; Thu, 26 Feb 2026 13:02:58 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1772136178; bh=6afjNOWHc+1z07vbtzngmBjH19pb/+XqLj/w0OUovEc=; 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=wgp2au1cNu9odHkqE0+k8USpT+pSKk4ItFMdiAkkwmCn8Y088bxXe6If3GUoyCyNS UPUzNzS/6Iz8i0GM3lvaemRkYAYzwVoS0/Kk84UsR1BhQWmiaMWlP8IVOeT1cqNhjw 5A1k7sa3OXxOiq9pBeb4jCPgcR5nttgHOeqWU3u43t8v4Lts6WO5Hp1SGKD/OtNGa5 UYjHjnl02/HwMg4J9yJJCU8Au7w42EBhriE+EpBtC26DaOGatdqdWtn+4YgcGJ0VeL DPQ6mQzyR9CypHyRWwwez9GaktsG436FSK2dXdelGUcDQibeu+vd1D848GD6eRKqjR DtOAA3Dnf9l+g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 04F3269E35 for ; Thu, 26 Feb 2026 13:02:58 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1772136176; bh=ZzxP/Wocfuvhfk9Qeuh63Qq7yiBM5AjUdSYZmfW6Ma4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sbMe19x46fCr19LIym1/jfs23x8V9tL3bwTmwmqoHfb+F2Zho6J6CoC3WAjw6C4QB CR+Jf5AOPEC0UIhondflr2lEWAz7KX5d/Nbv/TbEhe/mnv6hVOnDZTd5J34tZlJMMB rZv6zY8uvdH7+Rw2elDwn7Al1J1NyJhUnof9jm754mNFScyP5i5GSjmZl0rpS/Ik1L i8PsOvgDqRfjc5p4FagYq8VWRy3kuz6hdC5ko1QGjr7v7UecwSgP36tnJvI+zoppuf jo4GXpSng1S72Qh8ghvBkXt4JVjnzasrF5skq3NaP19wqHptBuVawPIU6seZbt4Du3 gN5CslL3Y56Dw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0856969E35; Thu, 26 Feb 2026 13:02:56 -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 dAIwiHq3LWTG; Thu, 26 Feb 2026 13:02:55 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1772136171; bh=tienLZxH4BzRFafW61pjq+ZUJeBxuQfruhsShU1vADY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IuoNMuMMeNOqh6Ua4f31tzIEN/MJuG1kgJu3YLE67N5WIzrTsw7L/bmTle65ucXqD 8oQR75RjWpRefs1oB5Nm/RiQCv17lMqAIKWQF2ujrxuQxt35nc2gfWmeWOnVdjhqaF COqWWe1yzDCYn+wfTblwqjEODvnHeHXUiUNx+hEwAGAoY5tRWiSmgECfRhxuqrYjB6 nPoBNwXj+lj6gzB7G+3wAx/kt8KDiQ61MA98HYpu505ymvol6RJVXKU9LrXpC9jODt KjVzJ4iF1wM5bBx844HouUAM36tgrXKqPu8PxbVIdw0cskxYXs+iv2Lul2G3DqG51m 9xo8liNP18SOg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 7545369D4A; Thu, 26 Feb 2026 13:02:51 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Thu, 26 Feb 2026 13:00:28 -0700 Message-ID: <20260226200106.1727176-23-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226200106.1727176-1-sjg@u-boot.org> References: <20260226200106.1727176-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: R2MEEDFJKFY2CR4C22FUMD63COGIKPCD X-Message-ID-Hash: R2MEEDFJKFY2CR4C22FUMD63COGIKPCD 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 22/32] patman: Support sendemail identity and series-to in the send path 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 identity parameter to gitutil.email_patches() and send.email_patches(), passing --identity to git send-email when set. In send.send(), apply series_to from upstream settings: if no Series-to tag is present, use the upstream's configured alias. Warn if the tag does not match the expected value. Signed-off-by: Simon Glass --- tools/patman/send.py | 20 +++++++++++++++++--- tools/u_boot_pylib/gitutil.py | 5 ++++- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/tools/patman/send.py b/tools/patman/send.py index 08a916aff1a..51d2c533540 100644 --- a/tools/patman/send.py +++ b/tools/patman/send.py @@ -47,7 +47,8 @@ def check_patches(series, patch_files, run_checkpatch, verbose, use_tree, cwd): def email_patches(col, series, cover_fname, patch_files, process_tags, its_a_go, ignore_bad_tags, add_maintainers, get_maintainer_script, limit, - dry_run, in_reply_to, thread, smtp_server, cwd=None): + dry_run, in_reply_to, thread, smtp_server, identity=None, + cwd=None): """Email patches to the recipients This emails out the patches and cover letter using 'git send-email'. Each @@ -86,6 +87,7 @@ def email_patches(col, series, cover_fname, patch_files, process_tags, its_a_go, thread (bool): True to add --thread to git send-email (make all patches reply to cover-letter or first patch in series) smtp_server (str): SMTP server to use to send patches (None for default) + identity (str or None): Git sendemail identity to use cwd (str): Path to use for patch files (None to use current dir) Return: @@ -101,7 +103,8 @@ def email_patches(col, series, cover_fname, patch_files, process_tags, its_a_go, cmd = 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, cwd=cwd) + thread=thread, smtp_server=smtp_server, identity=identity, + cwd=cwd) else: print(col.build(col.RED, "Not sending emails due to errors/warnings")) @@ -182,6 +185,16 @@ def send(args, git_dir=None, cwd=None): col, args.branch, args.count, args.start, args.end, args.ignore_binary, args.add_signoff, keep_change_id=args.keep_change_id, git_dir=git_dir, cwd=cwd) + + series_to = getattr(args, 'series_to', None) + if series_to: + to_list = series.get('to', []) + if to_list and series_to not in to_list: + print(f"WARNING: Series-to tag {to_list} does not include " + f"expected '{series_to}' from upstream settings") + if not to_list: + series['to'] = [series_to] + ok = check_patches(series, patch_files, args.check_patch, args.verbose, args.check_patch_use_tree, cwd) @@ -192,6 +205,7 @@ def send(args, git_dir=None, cwd=None): 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, cwd=cwd) + args.in_reply_to, args.thread, args.smtp_server, + identity=getattr(args, 'identity', None), cwd=cwd) return cmd and its_a_go and not args.dry_run diff --git a/tools/u_boot_pylib/gitutil.py b/tools/u_boot_pylib/gitutil.py index 34b4dbb4839..c96cd251776 100644 --- a/tools/u_boot_pylib/gitutil.py +++ b/tools/u_boot_pylib/gitutil.py @@ -459,7 +459,7 @@ def check_suppress_cc_config(): def email_patches(series, cover_fname, args, dry_run, warn_on_error, cc_fname, alias, self_only=False, in_reply_to=None, thread=False, - smtp_server=None, cwd=None): + smtp_server=None, identity=None, cwd=None): """Email a patch series. Args: @@ -479,6 +479,7 @@ def email_patches(series, cover_fname, args, dry_run, warn_on_error, cc_fname, thread (bool): True to add --thread to git send-email (make all patches reply to cover-letter or first patch in series) smtp_server (str or None): SMTP server to use to send patches + identity (str or None): Git sendemail identity to use cwd (str): Path to use for patch files (None to use current dir) Returns: @@ -537,6 +538,8 @@ send --cc-cmd cc-fname" cover p1 p2' warn_on_error) cc = [] cmd = ['git', 'send-email', '--annotate'] + if identity: + cmd.append(f'--identity={identity}') if smtp_server: cmd.append(f'--smtp-server={smtp_server}') if in_reply_to: