From patchwork Thu Feb 26 20:00:29 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1960 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=1772136182; bh=tyuwsFEIu8inKGDbgtVDFO+y6sw+MiF1Gp2uVdz3yCU=; 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=LH3MdHNpB+YkDIhFLk7F4Elon6B6gQWUXgqx67EoSV8x3xy70Cff7sibyoONb0/Y1 4ZizJDP9C+PP1ROaYVp64MvrHwNARQBoyJ1ZVhjobhUyhDOiAlHBCUqcgo4tNL8z5p GLavIUlIV3Wsex1bJ5E+f9Nq8xPboe52TQzwurBjURVqL8KCtSj6aFvIIiveAg9QM+ K3dJ69jX9rn9EOmHNIZgFQPD/7SpUlxkYV8jM9rd5wgWBQqJ51DQAofsYrlqtxpwo6 nX9je/rvSkgRV2i46MkTtA5vjLOh9KHnWipokCcusqz/bJTIGtacpP5drylVZIdyUF HkYy4F77I8BJg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id ED1D969D52 for ; Thu, 26 Feb 2026 13:03:02 -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 xD5gd7pa5tZM for ; Thu, 26 Feb 2026 13:03:02 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1772136182; bh=tyuwsFEIu8inKGDbgtVDFO+y6sw+MiF1Gp2uVdz3yCU=; 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=LH3MdHNpB+YkDIhFLk7F4Elon6B6gQWUXgqx67EoSV8x3xy70Cff7sibyoONb0/Y1 4ZizJDP9C+PP1ROaYVp64MvrHwNARQBoyJ1ZVhjobhUyhDOiAlHBCUqcgo4tNL8z5p GLavIUlIV3Wsex1bJ5E+f9Nq8xPboe52TQzwurBjURVqL8KCtSj6aFvIIiveAg9QM+ K3dJ69jX9rn9EOmHNIZgFQPD/7SpUlxkYV8jM9rd5wgWBQqJ51DQAofsYrlqtxpwo6 nX9je/rvSkgRV2i46MkTtA5vjLOh9KHnWipokCcusqz/bJTIGtacpP5drylVZIdyUF HkYy4F77I8BJg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id DA3EE69E35 for ; Thu, 26 Feb 2026 13:03:02 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1772136180; bh=JHHZ2B9K0SzbqH0w3prCMZdSq4w39jvRnAo16Hsxs6g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pe5uF4DovlnxvBQThlbPQvJ8V6NragWTTznvVam/vxJHnynAhs79AlFO3OCVHp/lB A6+A2OwnncZnb05Hk8P7PSIHjUrj0x3yFTX+j2cs/slTPzimYD5Bwu54BUi6+BetLJ kpOWW3t6Dr/jgV5ngZMBpW3t/q3WsPPfhDnIY6wl0sp/up+T+YqDjcoecYWUcLyZTn qimdFvz3XecBqnf1eOsQqbgVuLU69R0qEhJs/ipRGilq4UoMjgU+Fr7za3eCivR07K ryb/tzuturkAyMq/LYmRqomgCbTvxg/0RFM6RCtjkcn02UihBIhzDvjsQr7XNnY4XC 7z81abzfLusVw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7912769E39; Thu, 26 Feb 2026 13:03:00 -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 KGkFJKTtD6Wx; Thu, 26 Feb 2026 13:03:00 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1772136176; bh=3n6jq36BEdLF1sOHV7HO//iwEbicR1AjuoDvKD/0FA4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xza+KxK9aMVT0TrC2nVP64tTqRRpFMlDp2UckcUBGvzB03es6coH8WdTTQQOOkfLX apdujgBe62OSkD7HcCrSQcBHKfy/veGZmZQOjVDMNz3MH4i6i8iWoTXksYXcO5ix3t J5b96ob152JvsOP+ws9dg30pZmkzn9+MhlTQPRzULeQA68uedLBrRzlYnWFqM2uK2g IbQl2he19jghWf/Bz1QTLA3X3C8+LbB3/g0WzxbVaCQSqYfTrHgow/MBPPThZCXR55 xaEGPj45nWGKClaTUYHTgcw/FKMw/CEN2NrmAu3N8x4EUZE0x2T0djINz2Tn0spbL6 9YsboLDl7WIdA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id BB50269D52; Thu, 26 Feb 2026 13:02:55 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Thu, 26 Feb 2026 13:00:29 -0700 Message-ID: <20260226200106.1727176-24-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: A6MF26TUEREV7HZWCFXWO2N4YI7S5KEK X-Message-ID-Hash: A6MF26TUEREV7HZWCFXWO2N4YI7S5KEK 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 23/32] patman: Wire up per-upstream send settings in commands 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 -I/--identity, -t/--series-to, -m/--no-maintainers and --no-tags options to 'upstream add' and thread them through to the database. In cseries.send(), look up the series' upstream send settings and apply them to args before sending: set identity, series_to, add_maintainers and process_tags as appropriate. Signed-off-by: Simon Glass --- tools/patman/cmdline.py | 12 ++++++++++++ tools/patman/control.py | 6 +++++- tools/patman/cseries.py | 34 +++++++++++++++++++++++++++------- 3 files changed, 44 insertions(+), 8 deletions(-) diff --git a/tools/patman/cmdline.py b/tools/patman/cmdline.py index 3fef37e738d..6141f106fde 100644 --- a/tools/patman/cmdline.py +++ b/tools/patman/cmdline.py @@ -423,6 +423,18 @@ def add_upstream_subparser(subparsers): '-p', '--patchwork-url', help='URL of patchwork server for this upstream, e.g. ' "'https://patchwork.ozlabs.org'") + uadd.add_argument( + '-I', '--identity', + help="Git sendemail identity to use, e.g. 'chromium'") + uadd.add_argument( + '-t', '--series-to', + help="Patman alias for the To address, e.g. 'u-boot'") + uadd.add_argument( + '-m', '--no-maintainers', action='store_true', default=False, + help='Skip get_maintainer.pl for this upstream') + uadd.add_argument( + '--no-tags', action='store_true', default=False, + help='Skip subject-tag alias processing for this upstream') uadd.add_argument( 'project_name', nargs='?', help="Patchwork project name, e.g. 'U-Boot'") diff --git a/tools/patman/control.py b/tools/patman/control.py index 352c76bd14e..689fd732dec 100644 --- a/tools/patman/control.py +++ b/tools/patman/control.py @@ -252,7 +252,11 @@ def upstream(args, test_db=None): if args.subcmd == 'add': cser.upstream_add(args.remote_name, args.url, args.project_name, - patchwork_url=args.patchwork_url) + patchwork_url=args.patchwork_url, + identity=args.identity, + series_to=args.series_to, + no_maintainers=args.no_maintainers, + no_tags=args.no_tags) elif args.subcmd == 'default': if args.unset: cser.upstream_set_default(None) diff --git a/tools/patman/cseries.py b/tools/patman/cseries.py index 871e14458a8..36f0b432073 100644 --- a/tools/patman/cseries.py +++ b/tools/patman/cseries.py @@ -932,14 +932,21 @@ class Cseries(cser_helper.CseriesHelper): if not ser.idnum: raise ValueError(f"Series '{ser.name}' not found in database") - if not getattr(args, 'identity', None): - ups = self.get_series_upstream(name) - if ups: - identity = self.db.upstream_get_identity(ups) - if identity: + ups = self.get_series_upstream(name) + if ups: + settings = self.db.upstream_get_send_settings(ups) + if settings: + identity, series_to, no_maintainers, no_tags = settings + if identity and not getattr(args, 'identity', None): args.identity = identity print(f"Using sendemail identity '{identity}'" f" from upstream '{ups}'") + if series_to: + args.series_to = series_to + if no_maintainers: + args.add_maintainers = False + if no_tags: + args.process_tags = False args.branch = self._get_branch_name(ser.name, version) likely_sent = send.send(args, git_dir=self.gitdir, cwd=self.topdir) @@ -1159,7 +1166,8 @@ class Cseries(cser_helper.CseriesHelper): tout.info('Dry run completed') def upstream_add(self, name, url, project=None, pwork=None, - patchwork_url=None, identity=None): + patchwork_url=None, identity=None, series_to=None, + no_maintainers=False, no_tags=False): """Add a new upstream tree Args: @@ -1171,8 +1179,14 @@ class Cseries(cser_helper.CseriesHelper): patchwork_url (str or None): URL of the patchwork server for this upstream identity (str or None): Git sendemail identity to use + series_to (str or None): Patman alias for the To address + no_maintainers (bool): True to skip get_maintainer.pl + no_tags (bool): True to skip subject-tag alias processing """ - self.db.upstream_add(name, url, patchwork_url, identity=identity) + self.db.upstream_add(name, url, patchwork_url, identity=identity, + series_to=series_to, + no_maintainers=no_maintainers, + no_tags=no_tags) if project: if not pwork: if not patchwork_url: @@ -1186,6 +1200,12 @@ class Cseries(cser_helper.CseriesHelper): msg += f" patchwork '{patchwork_url}'" if identity: msg += f" identity '{identity}'" + if series_to: + msg += f" to '{series_to}'" + if no_maintainers: + msg += ' no-maintainers' + if no_tags: + msg += ' no-tags' if project: msg += f" project '{project}'" tout.notice(msg)