From patchwork Fri May 1 11:00:10 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 2261 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=1777633312; bh=jN+PNBITHkYDhK/retus0Wfj7X6AxsguiElZ68Ypw7g=; 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=RKF2fBOIpz+7rv1aOwRrk2rMr2Cx8AxZqpzbfddi9i5EMjJ2C7qu/6DQQeVoKsOKX 5y2Fvbj8nNsjY6wnTi8x72wRyp3yq2GkIRhIYv2aSO0bQv14y0lMbd4FfkYj2tR8kB EM6GuKs3cw/2QlZbN8Ks1wTZXyO2DRwcMwyk/Ruo= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 31A9B6A851 for ; Fri, 1 May 2026 05:01:52 -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 ZU9mlMElHc7d for ; Fri, 1 May 2026 05:01:52 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1777633312; bh=jN+PNBITHkYDhK/retus0Wfj7X6AxsguiElZ68Ypw7g=; 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=RKF2fBOIpz+7rv1aOwRrk2rMr2Cx8AxZqpzbfddi9i5EMjJ2C7qu/6DQQeVoKsOKX 5y2Fvbj8nNsjY6wnTi8x72wRyp3yq2GkIRhIYv2aSO0bQv14y0lMbd4FfkYj2tR8kB EM6GuKs3cw/2QlZbN8Ks1wTZXyO2DRwcMwyk/Ruo= Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 20C9D6A833 for ; Fri, 1 May 2026 05:01:52 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1777633310; bh=E3BdHgjYFOmcl6mZ1b8z3uAYFdyanbBgrKHHeCXc9W8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bgXSne2epRJMyYPefYEiSBO2I9QmnS6vFEp5gjPtLrJcadRsRM2IWBEGZO9kXG1DS 1ojrBtrmVkletCQRuvS6cAjB0gfho0BznxPpiyzjZzd1E8btSz0QaTisohOEFPtznG cdwQ1xhYhjiW2QtxLKruqVTbuplBXwXAeqD71C+k= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 8EC1C6A833; Fri, 1 May 2026 05:01:50 -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 Ea-ZOMDgCmbb; Fri, 1 May 2026 05:01:50 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1777633307; bh=fEjT3YJpCG6e1Ny9gZib1Y9xe86xR7CZ8Ic3tOclqkw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rRYWRuE7J5/+mHATEYnOW3ro3kjY0h87+MnCFreXougwaUJC4yPVzXDpMbxeo1K/C Ed5jVUSoScNlc9KB9mn/wu86yFezcMDHGnW7zZ1MqD4DfqhAe4mlrr9DiLEGahG8Ic wGjahJiL0ZiyzXHScXhAF/RJzdwCJcM75b+Zd+ps= Received: from u-boot.org (unknown [174.51.25.52]) by mail.u-boot.org (Postfix) with ESMTPSA id 039596A7AF; Fri, 1 May 2026 05:01:46 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Fri, 1 May 2026 05:00:10 -0600 Message-ID: <20260501110040.1874719-19-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: Z46K5X5MNJQTQB3QVZNMOMGWRI6RR7RE X-Message-ID-Hash: Z46K5X5MNJQTQB3QVZNMOMGWRI6RR7RE 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 18/29] patman: Rename review series flags to '-s/-S' 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 The current '-l/--link' and '-t/--title' flags collide with new flags being added for single-patch reviews ('-p/--patch' and '-P/--patch-title'). Rename them to '-s/--series' (still landing on the 'pw_link' attribute, so internal callers are unaffected) and '-S/--series-title' so the series and patch flag pairs stay symmetric. Update the docs and test invocations to match. While here, switch the rst examples that still write '--create-drafts' to the '-d' short form added earlier, and tidy up a stray ' - ' that should be ' -- '. Signed-off-by: Simon Glass --- tools/patman/cmdline.py | 6 +++--- tools/patman/patman.rst | 16 ++++++++-------- tools/patman/test_cseries.py | 28 +++++++++++----------------- 3 files changed, 22 insertions(+), 28 deletions(-) diff --git a/tools/patman/cmdline.py b/tools/patman/cmdline.py index 4ec9df7acb4..06442fc08cc 100644 --- a/tools/patman/cmdline.py +++ b/tools/patman/cmdline.py @@ -547,11 +547,11 @@ def add_review_subparser(subparsers): 'review', aliases=ALIASES['review'], help='AI-powered review of a patchwork series') review.add_argument( - '-l', '--link', type=str, dest='pw_link', + '-s', '--series', type=str, dest='pw_link', help='Patchwork series link/ID number') review.add_argument( - '-t', '--title', type=str, - help='Search for series by cover-letter title') + '-S', '--series-title', type=str, dest='title', + help='Search for a series by cover-letter title') review.add_argument( '-n', '--dry-run', action='store_true', dest='dry_run', default=False, diff --git a/tools/patman/patman.rst b/tools/patman/patman.rst index 0644f4d0e08..70e6b381cc8 100644 --- a/tools/patman/patman.rst +++ b/tools/patman/patman.rst @@ -1251,30 +1251,30 @@ Basic usage Review a series by Patchwork link:: - patman review -l 497923 -U us --reviewer 'Your Name ' + patman review -s 497923 -U us --reviewer 'Your Name ' Or search by cover-letter title:: - patman review -t 'boot/bootm: Disable interrupts' -U us \ + patman review -S 'boot/bootm: Disable interrupts' -U us \ --reviewer 'Your Name ' To create Gmail drafts threaded under the original emails:: - patman review -l 497923 -U us \ + patman review -s 497923 -U us \ --reviewer 'Your Name ' \ - --create-drafts --gmail-account your@email + -d --gmail-account your@email -Use ``-n`` with ``--create-drafts`` for a dry run that shows what would -be created without calling the Gmail API. +Use ``-n`` with ``-d`` for a dry run that shows what would be created +without calling the Gmail API. Use ``--apply-only`` to download and apply patches without running the -AI review - useful for checking that patches apply cleanly. +AI review -- useful for checking that patches apply cleanly. Use ``-f`` / ``--force`` to re-review a series that has already been reviewed. This deletes the old review records and runs the review again:: - patman review -l 497923 -U us -f --reviewer 'Your Name ' + patman review -s 497923 -U us -f --reviewer 'Your Name ' If the reviewer email (from ``--reviewer`` or git config) differs from the ``--gmail-account``, patman sets the From header on the draft so diff --git a/tools/patman/test_cseries.py b/tools/patman/test_cseries.py index 125e6db7b69..ea1ac32badc 100644 --- a/tools/patman/test_cseries.py +++ b/tools/patman/test_cseries.py @@ -4608,8 +4608,7 @@ Date: .* for m in mocks: stack.enter_context(m) with terminal.capture() as _: - self.run_review( '-l', str(self.REVIEW_LINK), - pwork=pwork) + self.run_review('-s', str(self.REVIEW_LINK), pwork=pwork) # Check the series was created with source='review' self.db_open() @@ -4640,8 +4639,7 @@ Date: .* for m in mocks: stack.enter_context(m) with terminal.capture() as _: - self.run_review( '-l', str(self.REVIEW_LINK), - pwork=pwork) + self.run_review('-s', str(self.REVIEW_LINK), pwork=pwork) # Review the same link again mocks = self._mock_review() @@ -4649,7 +4647,7 @@ Date: .* for m in mocks: stack.enter_context(m) with terminal.capture() as (out, err): - self.run_review('-l', str(self.REVIEW_LINK), pwork=pwork) + self.run_review('-s', str(self.REVIEW_LINK), pwork=pwork) self.assertIn('Already reviewed', out.getvalue()) def test_review_new_version(self): @@ -4664,8 +4662,7 @@ Date: .* for m in mocks: stack.enter_context(m) with terminal.capture() as _: - self.run_review( '-l', str(self.REVIEW_LINK), - pwork=pwork) + self.run_review('-s', str(self.REVIEW_LINK), pwork=pwork) # Now review v2 - should detect the previous review mocks = self._mock_review() @@ -4673,8 +4670,7 @@ Date: .* for m in mocks: stack.enter_context(m) with terminal.capture() as (out, _): - self.run_review( '-l', str(self.REVIEW_LINK_V2), - pwork=pwork) + self.run_review('-s', str(self.REVIEW_LINK_V2), pwork=pwork) self.assertIn('Previously reviewed', out.getvalue()) # Check both versions are under the same series @@ -4696,8 +4692,7 @@ Date: .* for m in mocks: stack.enter_context(m) with terminal.capture() as (out, _): - self.run_review( '-t', 'Disable interrupts', - pwork=pwork) + self.run_review('-S', 'Disable interrupts', pwork=pwork) # Should pick the most recent (v2) self.assertIn('Using most recent', out.getvalue()) @@ -4730,7 +4725,7 @@ Date: .* return_value='test'), \ mock.patch('patman.review._git_restore'): with terminal.capture() as _: - self.run_review('-l', str(self.REVIEW_LINK), + self.run_review('-s', str(self.REVIEW_LINK), pwork=pwork, expect_ret=1) def test_review_create_drafts_dry_run(self): @@ -4744,8 +4739,8 @@ Date: .* for m in mocks: stack.enter_context(m) with terminal.capture() as (out, _): - self.run_review( '-l', str(self.REVIEW_LINK), - '--create-drafts', '-n', pwork=pwork) + self.run_review('-s', str(self.REVIEW_LINK), '--create-drafts', + '-n', pwork=pwork) output = out.getvalue() self.assertIn('Would create draft', output) self.assertIn('author@posteo.net', output) @@ -4773,9 +4768,8 @@ Date: .* .list.return_value \ .execute.return_value = {'messages': []} with terminal.capture() as (out, _): - self.run_review( '-l', - str(self.REVIEW_LINK), - '--create-drafts', pwork=pwork) + self.run_review('-s', str(self.REVIEW_LINK), + '--create-drafts', pwork=pwork) output = out.getvalue() self.assertIn('Created 1 Gmail draft', output)