From patchwork Thu Feb 26 20:00:21 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1952 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=1772136148; bh=U9qhuT8WFP0PglI+IzEoDbxs1yeQmgnLbSrX0Yhz7LI=; 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=IGfTtSmQP4vulvlTLa2kuhtZEoQDCjvJTR3R16pKicYBQx0eErW+4dzh7me51eeyT IM3/nNJkT653lhEbBLTtXwCgiFFoVjupkTs/cY9cUhXuem529DLqQMgoZfMKs5K3Wf fI/g3ttrKhnL7Pm12DmYYq4N7XEftll2/wQupycH2ZUoSMrlM3NONh6Xj/MQUjRls1 6tG6qck3f7QxypM/xqzjEp3HWFn0XmMZ4q4mTI+1BRhnX8IbiQvTg9hJun08+x+sMd KD5nnpYDnMxJpDP1b8uzYNSOy3ZGWm5vLyiwuFhjMphrprdF9NBwWYKeleY2qbEVqZ FSqljH0pEOQkg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 932B569E35 for ; Thu, 26 Feb 2026 13:02:28 -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 Gtoe5K5A5rGe for ; Thu, 26 Feb 2026 13:02:28 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1772136146; bh=U9qhuT8WFP0PglI+IzEoDbxs1yeQmgnLbSrX0Yhz7LI=; 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=UhxN7NHNuD/ll9c0bYIrn4rCK3sWZUsZC8l3xHKWh5lqh3UfaFxzgS6HTk0DYzuqt CuzNqZuAf5SxGpYC8gGyU7LoWA6fmPzA1mEnXOU6Cp376n8EqeQdKyXNuDgZNKm7D4 TV9neZoIQTbll5jZ+oGdFgmbh/5yI3y97Dpv3KtsHRuaCdYfS3EdKCGd+kbGXySu1g nNcXyXD1wEzpaW/Gkh3feOGyLXsnP+Cq2yInawoCkEM1blL9YYkTPHGS61vSTTXSHv rcCVc3nQHmQ68C2I5XDkyJrZDGNvm7yRJCFEjnuBHobOM2wUvGX6h9LuzHHSGPrkro sdXG0PQEXMDvA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A042269E3A for ; Thu, 26 Feb 2026 13:02:26 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1772136143; bh=UXRAp/pr8ank+NVrOIPHMoXtrNv8XYvb2d2GOMw2Ijw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LPoU5hsx3aPfuj4tWnGTHe6BzOPc45/uYjJ+3CPmihpfs+6AhEHeDwyevQjpoZoJj GmfBerU6htabybFUVmBayF5xGa/WXfRRh8ufmFlJQWiBhE8j0lw5ymZEXKVeKwXOa7 0m1uq2NCHb2gFGDuKdsdID5LFyW71p/yNY4rRrpaknBty80OxbqVTfDf5cdQqEvwVq yECb8TAOeYgcHAtjllN3/kOiOREFcLjGoX5QjXbFqd5Yj5Asfxi8sTCQa6sNP0+6HF dg8gmkW2wIOZ/UgZoy82yO1iVYRyRNdsnQ7LITKHnUDk6d7+OtL5blYiBqX9/1VdZv OIWtZtK4YFQgA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A28CD69D4A; Thu, 26 Feb 2026 13:02:23 -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 of6BD_lGhGqd; Thu, 26 Feb 2026 13:02:23 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1772136143; bh=7JL6rU5lIZ1XuHlwGn++Vb5kAKczgbmDD6ehiNfY/C8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HB8dbUQxkvs9Snfe1D6Y/6JQbcrnXb65N5SrjblrI7CBw2FrG6YAXjWtm7xBP2r1R 9qsekznTYW0cowhv4nQ0A5Zw0UUsV60ncyY9yTA7wisL3M7husGVgoO36y5GSjFJIq l1PNXyIr/QYnWOH1wpVJrTvdNCKyrT/SAfefmFGy/nB9ivd9QMJ3tobvWzx72EboDL 6/grvNr/tfT9a72lbxMnK1qFxvFHio6yM10EHwTgDGemknuXC9Ckxe51Ku1BTJr/jt NEAHszLucGutY0asgaYHYEZoq31Qwk/69GH0IpmOO7ibRGMZ+DDUC1vYD9qdvWucJG deK49ZsqT0sJw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 13D0A69D79; Thu, 26 Feb 2026 13:02:23 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Thu, 26 Feb 2026 13:00:21 -0700 Message-ID: <20260226200106.1727176-16-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: CK2BR2VO4JYISDR6LSZGYZ6HLW3BF7ZE X-Message-ID-Hash: CK2BR2VO4JYISDR6LSZGYZ6HLW3BF7ZE 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 15/32] patman: Group remotes by project in patchwork list 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 A project can have multiple remotes, so group them on a single line rather than showing one row per remote. Sort by project name then upstream in the patchwork table query. Signed-off-by: Simon Glass --- tools/patman/cseries.py | 13 +++++++++++-- tools/patman/database.py | 2 +- tools/patman/test_cseries.py | 9 ++++++--- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/tools/patman/cseries.py b/tools/patman/cseries.py index 3d24dd62fae..7237dd575cd 100644 --- a/tools/patman/cseries.py +++ b/tools/patman/cseries.py @@ -689,11 +689,20 @@ class Cseries(cser_helper.CseriesHelper): if not settings: print('No patchwork projects configured') return - print(f"{'Project':20} {'ID':>4} {'Link name':15} Remote") + print(f"{'Project':20} {'ID':>4} {'Link name':15} Remotes") border = f"{'-' * 20} {'-' * 4} {'-' * 15} {'-' * 15}" print(border) + + # Group remotes by project + projects = OrderedDict() for name, proj_id, link_name, ups in settings: - print(f'{name:20} {proj_id:4} {link_name:15} {ups or ""}') + key = (name, proj_id, link_name) + projects.setdefault(key, []) + if ups: + projects[key].append(ups) + for (name, proj_id, link_name), remotes in projects.items(): + rlist = ' '.join(sorted(remotes)) + print(f'{name:20} {proj_id:4} {link_name:15} {rlist}') print(border) def remove(self, name, dry_run=False): diff --git a/tools/patman/database.py b/tools/patman/database.py index 396cf52aa48..2f21e62605f 100644 --- a/tools/patman/database.py +++ b/tools/patman/database.py @@ -896,7 +896,7 @@ class Database: # pylint:disable=R0904 """ res = self.execute( 'SELECT name, proj_id, link_name, upstream FROM patchwork ' - 'ORDER BY upstream') + 'ORDER BY name, upstream') return res.fetchall() def patchwork_get(self, ups=None): diff --git a/tools/patman/test_cseries.py b/tools/patman/test_cseries.py index b9be1680199..2a31815932c 100644 --- a/tools/patman/test_cseries.py +++ b/tools/patman/test_cseries.py @@ -2518,11 +2518,13 @@ Tested-by: Mary Smith # yak self.assertEqual('No patchwork projects configured', out.getvalue().strip()) - # Add projects for two upstreams + # Add two remotes for U-Boot and one for Linux cser.db.upstream_add('us', 'https://us.example.com') cser.db.upstream_add('ci', 'https://ci.example.com') + cser.db.upstream_add('linus', 'https://linus.example.com') cser.db.patchwork_update('U-Boot', 6, 'uboot', 'us') - cser.db.patchwork_update('Linux', 10, 'linux', 'ci') + cser.db.patchwork_update('U-Boot', 6, 'uboot', 'ci') + cser.db.patchwork_update('Linux', 10, 'linux', 'linus') cser.db.commit() with terminal.capture() as (out, _): @@ -2530,8 +2532,9 @@ Tested-by: Mary Smith # yak lines = out.getvalue().splitlines() self.assertEqual(5, len(lines)) self.assertIn('Linux', lines[2]) - self.assertIn('ci', lines[2]) + self.assertIn('linus', lines[2]) self.assertIn('U-Boot', lines[3]) + self.assertIn('ci', lines[3]) self.assertIn('us', lines[3]) def test_patchwork_upstream(self):