From patchwork Thu Feb 26 20:00:16 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1947 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=1772136134; bh=x+9SFw3xYG7UGQoPCXYurvrH7k5X6fmZJkx+Fk0cBCo=; 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=no82IcNY3R4hu6ufcq3gMDrINgwwWg+pUErL2wdKukFCtnQKJ7hPogflcB7caI4YA 5UwCSeLuJwakBrxe3YCLVvdVwzLRSo6GOHbHzwmIky7/bl937RuvgmHUzo9qbPpu12 TJkSGfkF0ver6jLn+c+PxXbPSYM2kAUZ0OrNntV74qKZb283mhKoDKxoFi23BqBF9Z W8OUzRGWHNLAVz9gv7U1AEuWbDIgtT4Os1ncxN6MNDBgPG5NzP1kx972yiC8EKxob1 dPCs/hdP1b4HCYvcI49aYI6s0df+bzrkjugASmM8Ngp0YJaRjuaPCbSs8QGjxpjvWe ISwiSg+ZMvWSg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9DB1C69E3A for ; Thu, 26 Feb 2026 13:02:14 -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 rUItrxwTsc9z for ; Thu, 26 Feb 2026 13:02:14 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1772136134; bh=x+9SFw3xYG7UGQoPCXYurvrH7k5X6fmZJkx+Fk0cBCo=; 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=no82IcNY3R4hu6ufcq3gMDrINgwwWg+pUErL2wdKukFCtnQKJ7hPogflcB7caI4YA 5UwCSeLuJwakBrxe3YCLVvdVwzLRSo6GOHbHzwmIky7/bl937RuvgmHUzo9qbPpu12 TJkSGfkF0ver6jLn+c+PxXbPSYM2kAUZ0OrNntV74qKZb283mhKoDKxoFi23BqBF9Z W8OUzRGWHNLAVz9gv7U1AEuWbDIgtT4Os1ncxN6MNDBgPG5NzP1kx972yiC8EKxob1 dPCs/hdP1b4HCYvcI49aYI6s0df+bzrkjugASmM8Ngp0YJaRjuaPCbSs8QGjxpjvWe ISwiSg+ZMvWSg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8398169D79 for ; Thu, 26 Feb 2026 13:02:14 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1772136132; bh=ovce6l1KylloAWXBiZ81RP9AFtfg3SYJvZZHNqlNofk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R/X8aC1jfeJbE49jvPSLaYRMpRT4kNuASuNX/Ao61ve9OG/8KC02kMEdF2+77X8w3 qa9KScfh6ZtY8DtgDXrxHL0Rif3nph4C/cdYTNnw7YbfKMzjOxxjtColTPiYXpcan3 oi7Po8A6Tpz3rWSJV5yyQbZQRL6euIxk0KQHOq6Smt4PJSGQkDIo17FrCRGEDLaj9r XK0M588OMvDekOkn+qFdgBJ79egHpNaxAfzkQlJZXUZCzNuOh4okXtNdPHPG48z2YN FCIC+ZVmwJ5FWM0DBNnWs8D584UG5Q4D6yaiqAsZKB8HUEr17OUzHgIyqzSHO+huQ2 0Ig0FZegAcstw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 6076769E3A; Thu, 26 Feb 2026 13:02:12 -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 l0qlVT2_45RP; Thu, 26 Feb 2026 13:02:12 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1772136128; bh=SZp0p7/YW12YIr2RKa9/jBTH5HTyHC/zOAhkmNol8qE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GlEgFdpy/ugEDk5dMgLtoKIemXwOjy00d5zlj3zgdxqdNqwS4GdMwk2fn5zRkEuKv 83HKUkH/cwKiTf12hM29tC0KFBgX/z5m8cOUwPZZrrYkRfZsUuVyuKxnds5kz9KAiw vyDY5vBBfhfzK9YB2YnQb/B9LV70Fjet3a/Gbz04z/yqvznL++3rPZlG9wk+CgnK9h C+pHnZMQoxiR7ay+GPI0WsrViyNoIilzFv896QijzdkAYOF5FQ01lro/hmmn7JPDTS e8xubiLHvsRUWTzg36d3dO+xx2xMcAVb2Q91sf9tsvQBW5urEP5Ih0d2sob4jMSpBq sljOkWZr/xDUw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id CAF9D69D4A; Thu, 26 Feb 2026 13:02:07 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Thu, 26 Feb 2026 13:00:16 -0700 Message-ID: <20260226200106.1727176-11-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: SR52L76COIFSH2RAS7Q3CYHLCAMYRAKF X-Message-ID-Hash: SR52L76COIFSH2RAS7Q3CYHLCAMYRAKF 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 10/32] patman: Add upstream parameter to project_set() and project_get() 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 Allow project_set() and project_get() to accept an upstream name so that each upstream can be associated with a different patchwork project. When no upstream is specified, the existing behaviour is preserved. Signed-off-by: Simon Glass --- tools/patman/cseries.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/tools/patman/cseries.py b/tools/patman/cseries.py index 5d4a9592de9..56adcc5b4cd 100644 --- a/tools/patman/cseries.py +++ b/tools/patman/cseries.py @@ -637,12 +637,13 @@ class Cseries(cser_helper.CseriesHelper): 'subjects which mismatch their patches and need to be ' 'scanned') - def project_set(self, pwork, name, quiet=False): - """Set the name of the project + def project_set(self, pwork, name, ups=None, quiet=False): + """Set the name of the project for an upstream Args: pwork (Patchwork): Patchwork object to use name (str): Name of the project to use in patchwork + ups (str or None): Upstream name to associate with quiet (bool): True to skip writing the message """ tout.detail(f"Patchwork URL '{pwork.url}': finding name '{name}'") @@ -659,14 +660,20 @@ class Cseries(cser_helper.CseriesHelper): tout.detail(f'Name match: ID {proj_id}') if not proj_id: raise ValueError(f"Unknown project name '{name}'") - self.db.patchwork_update(name, proj_id, link_name) + self.db.patchwork_update(name, proj_id, link_name, ups) self.commit() if not quiet: - tout.notice(f"Project '{name}' patchwork-ID {proj_id} " - f"link-name '{link_name}'") + msg = f"Project '{name}' patchwork-ID {proj_id} " + msg += f"link-name '{link_name}'" + if ups: + msg += f" upstream '{ups}'" + tout.notice(msg) + + def project_get(self, ups=None): + """Get the details of the project for an upstream - def project_get(self): - """Get the details of the project + Args: + ups (str or None): Upstream name to look up, or None for any Returns: tuple or None if there are no settings: @@ -674,7 +681,7 @@ class Cseries(cser_helper.CseriesHelper): proj_id (int): Patchworks project ID for this project link_name (str): Patchwork's link-name for the project """ - return self.db.patchwork_get() + return self.db.patchwork_get(ups) def remove(self, name, dry_run=False): """Remove a series from the database