From patchwork Fri May 1 11:00:03 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 2254 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=1777633293; bh=LYUNpjkDxQAy623DYQFLdZ+UY+bQEJ6/fecjIYGY5WY=; 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=spBVNEWxsT3GKTz2alQrC5ztW0jtQHcF1HREK+uvcKTb3tr7NIIN6r86SZXunyKD4 YkWrEBLS8FOBrBRUXtZqmWa+1IiGDdUy1MInhP44EMDTggRfYDdsC3UYVuwPaTUerh n4w4HWJ50kUnqJ2TF6hwkx6Dt1Mk/s5iGQBaQ/wY= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id BB8426A836 for ; Fri, 1 May 2026 05:01:33 -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 nhqjeIMKTHqh for ; Fri, 1 May 2026 05:01:33 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1777633293; bh=LYUNpjkDxQAy623DYQFLdZ+UY+bQEJ6/fecjIYGY5WY=; 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=spBVNEWxsT3GKTz2alQrC5ztW0jtQHcF1HREK+uvcKTb3tr7NIIN6r86SZXunyKD4 YkWrEBLS8FOBrBRUXtZqmWa+1IiGDdUy1MInhP44EMDTggRfYDdsC3UYVuwPaTUerh n4w4HWJ50kUnqJ2TF6hwkx6Dt1Mk/s5iGQBaQ/wY= Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id AA2B26A833 for ; Fri, 1 May 2026 05:01:33 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1777633293; bh=jaR3qSDzkJyHhnrrVcN2mX7OE/X62RNmFe334Xx6DMU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jF1k96v1Jd9vBFJoHbnDcPwNg3IKo0aGI8yhH7T/pBJRfZiw2jFwh8mhoA3Leu3Yf 57c3w406AwqZsgT+05fZLxNhE46+hqv77omwgryvSLkO5PMkxDh+HxzFIWOXXm7NMt sguAsZBZu6MZuVDIIITlZfyzIwKBDS1A1S2VMRKA= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 34CF36A82E; Fri, 1 May 2026 05:01:33 -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 dUZha7CCAfgo; Fri, 1 May 2026 05:01:33 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1777633287; bh=YniseeuF3ucIqAGaKY9Bwu731/WFkxyAcTVCVOnsjjk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LnnsgaTHRKSpBoAfuiL3Udp7Al/mZLH42WVds1Eda01TxF+X+Jj/Oo0P3tylQ8/vE k23mJLnHZAJE21gpvw39vdIyFBAzZ4MJoWroEcQMVCbJjJqIWhuHj7L63QNhHF8C/g EM5IDEbgkWvfT/U3MyFTJ10dsNk5Oiy+zDEhCuAs= Received: from u-boot.org (unknown [174.51.25.52]) by mail.u-boot.org (Postfix) with ESMTPSA id AAFED6A78B; Fri, 1 May 2026 05:01:27 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Fri, 1 May 2026 05:00:03 -0600 Message-ID: <20260501110040.1874719-12-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260501110040.1874719-1-sjg@u-boot.org> References: <20260501110040.1874719-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: BUZTMI23AEXD7EMR25FW4S2FASU2SEQR X-Message-ID-Hash: BUZTMI23AEXD7EMR25FW4S2FASU2SEQR 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/29] patman: Detect when a series is accepted upstream 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 After gathering tags from patchwork, check whether all patches in the series version have state 'accepted'. If so, notify the user that the series has been applied upstream. This runs after both 'patman series gather' (single series) and 'patman series gather-all' (all series), giving immediate visibility when a maintainer applies the patches. Signed-off-by: Simon Glass --- tools/patman/cser_helper.py | 23 +++++++++++++++++++++++ tools/patman/cseries.py | 7 +++++++ 2 files changed, 30 insertions(+) diff --git a/tools/patman/cser_helper.py b/tools/patman/cser_helper.py index 31a5e3663dc..032d5218e9e 100644 --- a/tools/patman/cser_helper.py +++ b/tools/patman/cser_helper.py @@ -1378,6 +1378,29 @@ class CseriesHelper: return updated, 1 if cover else 0 + def check_applied(self, svid, series_name, version): + """Check if all patches in a series version are accepted + + If every patch has state 'accepted', notify the user that the + series has been applied upstream. + + Args: + svid (int): Ser/ver ID + series_name (str): Series name (for display) + version (int): Version number (for display) + + Returns: + bool: True if all patches are accepted + """ + pclist = self.db.pcommit_get_list(svid) + if not pclist: + return False + if all(pc.state == 'accepted' for pc in pclist): + tout.notice(f"Series '{series_name}' v{version}: all patches " + 'accepted upstream') + return True + return False + async def _gather(self, pwork, link, show_cover_comments): """Sync the series status from patchwork diff --git a/tools/patman/cseries.py b/tools/patman/cseries.py index 74e86eeeb37..5ffc2989dd5 100644 --- a/tools/patman/cseries.py +++ b/tools/patman/cseries.py @@ -1343,6 +1343,7 @@ class Cseries(cser_helper.CseriesHelper): if not dry_run: self.commit() + self.check_applied(svid, ser.name, version) else: self.rollback() tout.info('Dry run completed') @@ -1377,8 +1378,14 @@ class Cseries(cser_helper.CseriesHelper): f"{tot_cover} cover letter{'s' if tot_cover != 1 else ''} " f'updated, {missing} missing ' f"link{'s' if missing != 1 else ''} ({requests} requests)") + applied = [] if not dry_run: self.commit() + for svid, sync in to_fetch.items(): + if self.check_applied(svid, sync.series_name, sync.version): + applied.append(sync.series_name) + if applied: + tout.notice(f'{len(applied)} series applied upstream') else: self.rollback() tout.info('Dry run completed')