From patchwork Thu Feb 26 20:00:17 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1948 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=1772136137; bh=udcvQOJok/WGoDBknxWvJDbwH2YBDLNYjwgmefh/jV4=; 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=t4Og8hi2S+pWs7Fql0N4+7YkaXYFSIFQqkZbVc48JkZGDozMiY5eJadwzv9svbbvN DG9NKoo2+oXUQilrJ6zzWgQDZT0i8fzzSclsDcgssaMJzQRX5k82rJJaIfR5kLfRNA kyDK9lRHryV3gWu/5zg1NEZGGT6msqrUast4m+5XQTzmQkJYvlOD7k0D6AQev655V4 BUYFGuKhnfCb4m88K+TXyVCYIeMVL1XBIeBpwXATdTuUS/bmBYLCN4w131A+jQ+e3V YOhU26QkVfMmTDXVZ/E9sAmJhvwb6a2FxZSC8BmRG3MFHLTQxxPfUd+Ns3Ll09Vldt f2wPJn3tnFeoA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0463C69E39 for ; Thu, 26 Feb 2026 13:02: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 AfwtSBuYNRIG for ; Thu, 26 Feb 2026 13:02:16 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1772136136; bh=udcvQOJok/WGoDBknxWvJDbwH2YBDLNYjwgmefh/jV4=; 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=GNY0qLctFOvkK0dXCJazyyhPl2423bCjQBTqzIc3GtOJcaq95RV/ygoEWyvLnRB3h w+dNmz2E1hm8t8rlIxwAPGA/EMJIernLu/mfdayhDwtaP+drDoNrXb7EaDQx2ZjBXV j0S8H4denmExje/vu5J8uy/xCcHxoXUslNYeRdJ+PrtBumJx3Ae0JEU2uXNeE8MhM2 +1/oZ5vEJ6zs6ADz0929HxQO2uuhpmj7wx+zFvfMSeBlAiGL8KPvQfvu4QMJR0LfQI HDEj1Kcsiwp+FgK9enXaMUzHEL5JRfvzz7tUasQi3fZQ3hquiPrUifG+sygEkPekhq vjxm6OSDOa03g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8C85D69E3A for ; Thu, 26 Feb 2026 13:02:16 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1772136132; bh=IGY7mCYaHwjEjzVwD63Xx1sU4uU+VwbpcyzGIpxL6K0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GPU71Oy8DPxzoz46ImlTL6x/VdGFTCIPHMGpQyykDbWB6Akdnkmx7w9yNeK9UQfcd s6FrTRXJn2n1fk0BfVmr1DrF4sRcQRNWr0bZ6Z1YSYPLRFCaYxMrmMHUbwq330oHQf ho0mjE7tsQUOef4kjCgsK0nhxac2aj4Piph3mqqEwVT07gQMfsBIr4N5gbmJTWYPyQ yHOC76gWmdNB8TgsUDzfbSYcbLYvEWx424Gy00Z6Oyz2e0Zzjo8cjhqBHZxcfHMM1G qDijPBI0MbtUykkYz73YfQw+fmK7e/aNw2RJUzEldpyh/GaWKsRvBoXdxFJ+XiBkA2 mwA7VW1pz+orA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id E775B69D79; 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 3tATFtodWKZt; 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=1772136132; bh=CfQ8LmU16hL6LngrIm/QOGO+pvFo2piP6ON2RmBiL9I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UXYcH19+sh6bk1eOrVuRh36iX3xAde9xZdiLmcNOgvBjT+arVzq6fSZCzhgqPbTv4 R1uMVgtOJflIUChlF2N8mvrA4POr6FZUfHwAWA88hQgGvf5GSo0Hh1CEM0z5UT4ItP QDTzvOu3sVBnuzWQmnd3hVFV4Z437eIa/zmTC0+EgwfMKT8sK4sZyNE8booLiorInv 6HI7zhLQxdgwg1dZgzU6IQCGOig4oqjCrWchx+0osV6sW231dkNr9DmQGIIekVbDSD ToFMsrFMwWfUA75ssguQwybYJ4MPdeWSzKQ6Jz8W2JSkRwV8KdM1WFeR7pdMd9OfuN 1zkdcF3PMauKw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 7736869DAB; Thu, 26 Feb 2026 13:02:12 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Thu, 26 Feb 2026 13:00:17 -0700 Message-ID: <20260226200106.1727176-12-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: VCZV5R6XMB6TUQXFCU7SAKGBI26DR4RI X-Message-ID-Hash: VCZV5R6XMB6TUQXFCU7SAKGBI26DR4RI 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 11/32] patman: Add get_series_upstream() helper 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 method to look up the upstream for a series by name. If no name is given, use the current branch. This is needed so that patchwork commands can find the correct project for the series being operated on. Signed-off-by: Simon Glass --- tools/patman/cser_helper.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tools/patman/cser_helper.py b/tools/patman/cser_helper.py index 74bccfcfbc6..a60e02878a5 100644 --- a/tools/patman/cser_helper.py +++ b/tools/patman/cser_helper.py @@ -426,6 +426,22 @@ class CseriesHelper: self.db.pcommit_add_list(svid, to_add) + def get_series_upstream(self, name): + """Get the upstream for a series + + Args: + name (str): Name of series, or None to use current branch + + Return: + str or None: Upstream name, or None if not found + """ + if not name: + name = gitutil.get_branch() + ser = self.get_series_by_name(name) + if ser: + return ser.upstream + return None + def get_series_by_name(self, name, include_archived=False): """Get a Series object from the database by name