| Message ID | 20260404213020.372253-22-sjg@u-boot.org |
|---|---|
| State | New |
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> 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=1775338346; bh=tsY7cG4DR76lg3pWdxC9k9ipGo92S3/3PwBQI9paYLg=; 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=Eb3lijb1zrjBkxYgUOjjguaPY0BuKvnG1As60ua9V/V5zvMWa+Z2h1UvUBTIC3sgU He39aJTJPkOgfd8B398VvALjh9Jxu70DFEZC5gYiRwmixC8v3SXEYWg6L7gX/n+ZDA 3GKQ7E+sZvwSxx7BpWSSnftVCtVJsaNgQ3De5sywu/lgLwQmjaoEbpIoByg+XEdFJU jOJAjR+phs71I6w3Fcpk2h0eT+cliyoly/tfDq30ha4mZ5owAWFaXMGEhmfAQYFlK+ orOaDt9KBz0o0r4Uw8P5ENE2+BIFl5QwK8Mwh7KnyfI+s+aVu9E2Zs+hw+KPBClR6W w/WMCL7V2kf9g== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id B542E6878B for <u-boot-concept@u-boot.org>; Sat, 4 Apr 2026 15:32:26 -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 WujLiiHlWNRA for <u-boot-concept@u-boot.org>; Sat, 4 Apr 2026 15:32:26 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1775338346; bh=tsY7cG4DR76lg3pWdxC9k9ipGo92S3/3PwBQI9paYLg=; 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=Eb3lijb1zrjBkxYgUOjjguaPY0BuKvnG1As60ua9V/V5zvMWa+Z2h1UvUBTIC3sgU He39aJTJPkOgfd8B398VvALjh9Jxu70DFEZC5gYiRwmixC8v3SXEYWg6L7gX/n+ZDA 3GKQ7E+sZvwSxx7BpWSSnftVCtVJsaNgQ3De5sywu/lgLwQmjaoEbpIoByg+XEdFJU jOJAjR+phs71I6w3Fcpk2h0eT+cliyoly/tfDq30ha4mZ5owAWFaXMGEhmfAQYFlK+ orOaDt9KBz0o0r4Uw8P5ENE2+BIFl5QwK8Mwh7KnyfI+s+aVu9E2Zs+hw+KPBClR6W w/WMCL7V2kf9g== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A454E6833B for <u-boot-concept@u-boot.org>; Sat, 4 Apr 2026 15:32:26 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1775338345; bh=xNr9JcFOFf1FxdaEIZlKZ2UCmSXgrJKNxdUqLgRF9oA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jIbTp83GnjRFH7z5+2GOTn1RzVjCHtmZ6OVQj9a1nbXwHNA/OaxrrXLxh0udiZWIF XQn8StU9SBxAUu6oV5XyPtxHPbZNBdKKYcyXPLEYw6+7TSxYsoR4c+53Bkfhdvo5Dr 8y+mm/bS8Kv1L2x8/JaCihKdM5PVDA2h6ghvpuBHxuqDlGfLkR2QZgkbNHk03ut8ap b+XG2hdejIWt75boFfV7m2vHH2IdY9ALf6g/cssAXU9wSzPqZZ5OM/U4haTPcdx82q 9ioZ+bsQCXtzuHKdEzixMr0IsHFasljC2vuN3lieu2bN6ZQBdwb75BlF7ICVoLSbHV x1G6vlTs5VxVw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2BF305FC8F; Sat, 4 Apr 2026 15:32:25 -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 4yU2GQc_nSdk; Sat, 4 Apr 2026 15:32:25 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1775338341; bh=UBXdU9aglhD3+0PPzYnrTANk/LMKZ1jU0kAmQMsJTCQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UOtVyGHA+O60DwXoMtXMet0WT+HY99g20RpbKd2ZNhpc0hCaNDfLPUl0WgDapqOpI wENDfsMs2Hgxgi1xnbO4e5kcO1hWWlqVPWBm1m1GRg0oNLVcQ7XQ2v+FerH6r2vgDQ ElTsmetw19lifxghdwxEeYq/PEhnSXQKmSGLplQESeugpgHhoUaLKtkJiWTU1Yi3+c +Gj8aZSEs0qxj0Rw6Lb93yI7TUHkoENbH/sPpkPZE0xe5dd4wBQB3ucvA/Ni9KKZIR /BRqiOoFyCsuyxG19t3L7WkUCplgNHk1QAvYuOCsTQ7Y+O4TEspvtOz8LL4RxoHEE5 hD3Lav4sgeTtg== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id C4F015E7B4; Sat, 4 Apr 2026 15:32:20 -0600 (MDT) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Sat, 4 Apr 2026 15:28:57 -0600 Message-ID: <20260404213020.372253-22-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260404213020.372253-1-sjg@u-boot.org> References: <20260404213020.372253-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: LMXNQHTZC56HLJN43PIXOV3XNHM7GDZO X-Message-ID-Hash: LMXNQHTZC56HLJN43PIXOV3XNHM7GDZO 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 <sjg@chromium.org> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 21/37] patman: Fall back to database for patchwork link in status List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/LMXNQHTZC56HLJN43PIXOV3XNHM7GDZO/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
patman: Autolink fixes and AI-assisted patch review
|
|
Commit Message
Simon Glass
April 4, 2026, 9:28 p.m. UTC
From: Simon Glass <sjg@chromium.org> When 'patman status' cannot find a link for the current version in the commit's Series-links tag, look it up in the database. This handles the case where autolink runs without updating the commit, or the commit has not yet been rewritten. Signed-off-by: Simon Glass <sjg@chromium.org> --- tools/patman/status.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/tools/patman/status.py b/tools/patman/status.py index 8673eeb697e..205314aef3e 100644 --- a/tools/patman/status.py +++ b/tools/patman/status.py @@ -408,7 +408,26 @@ def find_link_and_show_status(series, branch, url, dest_branch, force, links = series.get('links') link = series.get_link_for_version(version, links) if not link: - raise ValueError(f'Series-links has no link for v{version}') + # Fall back to the database if the commit metadata does not + # have a link for this version (e.g. autolink ran without -u) + from patman import cseries + + cser = cseries.Cseries() + try: + cser.open_database() + name, _ = patchstream.split_name_version(branch) + ser = cser.get_series_by_name(name) + if ser: + svinfo = cser.get_ser_ver(ser.idnum, version) + if svinfo: + link = svinfo.link + except (ValueError, AttributeError): + pass + finally: + cser.close_database() + if not link: + raise ValueError(f'No patchwork link for v{version}; ' + 'try: patman series autolink') tout.debug(f"Link '{link}") if 'patchwork_url' in series: