[PATCH 3/3] patman: Add a tag for when a patch gets added to a series

Doug Anderson dianders at chromium.org
Sat Dec 14 01:51:34 CET 2024


Hi,

On Thu, Apr 18, 2024 at 7:36 PM Sean Anderson <seanga2 at gmail.com> wrote:
>
> 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 at chromium.org>
> Signed-off-by: Sean Anderson <seanga2 at 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)

I won't have a chance to track this down right now, but I figured I'd
at least report it. Maybe it's already been looked at?

Once before when I used this I saw a case where using
"Commit-added-in" was doubling tags. AKA I end up seeing:

- New
- New

When I came back to try to look at it later I couldn't reproduce it.
I'm seeing it again now. I did the bare minimum to debug and I see
that the code in process_line() is being run twice for the same line.
The first seems to be in get_metadata_for_list() and the second in
process_stream().

I can do a quick-n-dirty fix for this, but presumably it would be
better to dig into the real root cause?


-Doug


More information about the U-Boot mailing list