public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Sean Anderson <seanga2@gmail.com>
To: u-boot@lists.denx.de, Simon Glass <sjg@chromium.org>
Cc: Sean Anderson <seanga2@gmail.com>,
	Douglas Anderson <dianders@chromium.org>
Subject: [PATCH 3/3] patman: Add a tag for when a patch gets added to a series
Date: Thu, 18 Apr 2024 22:36:32 -0400	[thread overview]
Message-ID: <20240419023632.29078-4-seanga2@gmail.com> (raw)
In-Reply-To: <20240419023632.29078-1-seanga2@gmail.com>

When a patch is added to a series after the initial version, there are no
changes to note except that it is new. This is typically done to suppress
the "(no changes in vN)" message. It's also nice to add a change to the
cover letter so reviewers know there is an additional patch. Add a tag to
automate this process a bit.

There are two nits with the current approach:

- It favors '-' as a bullet point, but some people may prefer '*' (or
  something else)
- Tags (e.g. 'patman: ' in 'patman: foo bar') are not stripped. They are
  probably just noise in most series, but they may be useful for treewide
  series to distinguish 'gpio: frobnicate' from 'reset: frobnicate', so
  I've left them in.

Suggestions for the above appreciated.

Suggested-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

 tools/patman/func_test.py                           |  2 ++
 tools/patman/patchstream.py                         |  5 +++++
 tools/patman/patman.rst                             | 13 +++++++++++++
 ...t-cast-for-sandbox-in-fdtdec_setup_mem_siz.patch |  1 +
 tools/patman/test/test01.txt                        |  1 +
 5 files changed, 22 insertions(+)

diff --git a/tools/patman/func_test.py b/tools/patman/func_test.py
index 3b4c9448882..af6c025a441 100644
--- a/tools/patman/func_test.py
+++ b/tools/patman/func_test.py
@@ -293,6 +293,7 @@ Changes in v4:
   change
 - Some changes
 - Some notes for the cover letter
+- fdt: Correct cast for sandbox in fdtdec_setup_mem_size_base()
 
 Simon Glass (2):
   pci: Correct cast for sandbox
@@ -342,6 +343,7 @@ Changes in v4:
 - Multi
   line
   change
+- New
 - Some changes
 
 Changes in v2:
diff --git a/tools/patman/patchstream.py b/tools/patman/patchstream.py
index ec1ca874fb2..a09ae9c7371 100644
--- a/tools/patman/patchstream.py
+++ b/tools/patman/patchstream.py
@@ -477,6 +477,11 @@ class PatchStream:
                 self.change_version = self._parse_version(value, line)
             elif name == 'cc':
                 self.commit.add_cc(value.split(','))
+            elif name == 'added-in':
+                version = self._parse_version(value, line)
+                self.commit.add_change(version, '- New')
+                self.series.AddChange(version, None, '- %s' %
+                                      self.commit.subject)
             else:
                 self._add_warn('Line %d: Ignoring Commit-%s' %
                                (self.linenum, name))
diff --git a/tools/patman/patman.rst b/tools/patman/patman.rst
index 9971fa8c0fd..63b95a6b161 100644
--- a/tools/patman/patman.rst
+++ b/tools/patman/patman.rst
@@ -350,6 +350,19 @@ Cover-changes: n
         - This line will only appear in the cover letter
         <blank line>
 
+Commit-added-in: n
+    Add a change noting the version this commit was added in. This is
+    equivalent to::
+
+        Commit-changes: n
+        - New
+
+        Cover-changes: n
+        - <commit subject>
+
+    It is a convenient shorthand for suppressing the '(no changes in vN)'
+    message.
+
 Patch-cc / Commit-cc: Their Name <email>
     This copies a single patch to another email address. Note that the
     Cc: used by git send-email is ignored by patman, but will be
diff --git a/tools/patman/test/0002-fdt-Correct-cast-for-sandbox-in-fdtdec_setup_mem_siz.patch b/tools/patman/test/0002-fdt-Correct-cast-for-sandbox-in-fdtdec_setup_mem_siz.patch
index 55a0d6756aa..48ea1793b47 100644
--- a/tools/patman/test/0002-fdt-Correct-cast-for-sandbox-in-fdtdec_setup_mem_siz.patch
+++ b/tools/patman/test/0002-fdt-Correct-cast-for-sandbox-in-fdtdec_setup_mem_siz.patch
@@ -23,6 +23,7 @@ Series-version: 3
 Patch-cc: fred
 Commit-cc: joe
 Series-process-log: sort, uniq
+Commit-added-in: 4
 Series-changes: 4
 - Some changes
 - Multi
diff --git a/tools/patman/test/test01.txt b/tools/patman/test/test01.txt
index 271d9bf043f..b2d73c5972c 100644
--- a/tools/patman/test/test01.txt
+++ b/tools/patman/test/test01.txt
@@ -51,6 +51,7 @@ Date:   Sat Apr 15 15:39:08 2017 -0600
     Patch-cc: fred
     Commit-cc: joe
     Series-process-log: sort, uniq
+    Commit-added-in: 4
     Series-changes: 4
     - Some changes
     - Multi
-- 
2.37.1


  parent reply	other threads:[~2024-04-19  2:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-19  2:36 [PATCH 0/3] patman: A fix and some new tags Sean Anderson
2024-04-19  2:36 ` [PATCH 1/3] patman: Fix tests if add_maintainers is set to False Sean Anderson
2024-07-01 13:57   ` Simon Glass
2024-07-15 13:31     ` Simon Glass
2024-04-19  2:36 ` [PATCH 2/3] patman: Add Commit-cc as an alias for Patch-cc Sean Anderson
2024-07-01 13:57   ` Simon Glass
2024-07-15 13:31     ` Simon Glass
2024-04-19  2:36 ` Sean Anderson [this message]
2024-04-29 16:49   ` [PATCH 3/3] patman: Add a tag for when a patch gets added to a series Doug Anderson
2024-07-01 13:57     ` Simon Glass
2024-07-15 13:31       ` Simon Glass
2024-12-14  0:51   ` Doug Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240419023632.29078-4-seanga2@gmail.com \
    --to=seanga2@gmail.com \
    --cc=dianders@chromium.org \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox