diff options
author | Sean Anderson <sean.anderson@seco.com> | 2021-10-23 02:07:04 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-10-31 21:26:44 +0300 |
commit | 082c119af98153fd558f57c7a66d660b7ca6c6c9 (patch) | |
tree | c8526ef4b4dac3ffa9f1aaceb663233d0f734216 /tools/patman/series.py | |
parent | 37f3758a250d4c590ffac671f100d9b5ec73b417 (diff) | |
download | u-boot-082c119af98153fd558f57c7a66d660b7ca6c6c9.tar.xz |
patman: Add "postfix" support to patch subjects
In some communities, it may be necessary to append something after PATCH
in the subject line. For example, the Linux networking subsystem
expects [1] patch subject prefixes like [RFC PATCH net-next 0/99]. This
adds support for such "postfix"s to patman. Although entirely cosmetic,
it is still nice to have.
[1] https://www.kernel.org/doc/html/latest/networking/netdev-FAQ.html#how-do-i-indicate-which-tree-net-vs-net-next-my-patch-should-be-in
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/series.py')
-rw-r--r-- | tools/patman/series.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/patman/series.py b/tools/patman/series.py index 8ae218d3a4..da734d92cf 100644 --- a/tools/patman/series.py +++ b/tools/patman/series.py @@ -16,7 +16,7 @@ from patman import tools # Series-xxx tags that we understand valid_series = ['to', 'cc', 'version', 'changes', 'prefix', 'notes', 'name', - 'cover_cc', 'process_log', 'links', 'patchwork_url'] + 'cover_cc', 'process_log', 'links', 'patchwork_url', 'postfix'] class Series(dict): """Holds information about a patch series, including all tags. @@ -133,6 +133,7 @@ class Series(dict): print('Cc:\t ', item) print('Version: ', self.get('version')) print('Prefix:\t ', self.get('prefix')) + print('Postfix:\t ', self.get('postfix')) if self.cover: print('Cover: %d lines' % len(self.cover)) cover_cc = gitutil.BuildEmailList(self.get('cover_cc', '')) @@ -322,4 +323,8 @@ class Series(dict): prefix = '' if self.get('prefix'): prefix = '%s ' % self['prefix'] - return '%s%sPATCH%s' % (git_prefix, prefix, version) + + postfix = '' + if self.get('postfix'): + postfix = ' %s' % self['postfix'] + return '%s%sPATCH%s%s' % (git_prefix, prefix, postfix, version) |