diff options
author | Sean Anderson <sean.anderson@seco.com> | 2021-10-22 19:07:04 -0400 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-10-31 12:26:44 -0600 |
commit | 082c119af98153fd558f57c7a66d660b7ca6c6c9 (patch) | |
tree | c8526ef4b4dac3ffa9f1aaceb663233d0f734216 /tools/patman/func_test.py | |
parent | 37f3758a250d4c590ffac671f100d9b5ec73b417 (diff) |
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/func_test.py')
-rw-r--r-- | tools/patman/func_test.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/patman/func_test.py b/tools/patman/func_test.py index 2493e527f52..9f4e03e8822 100644 --- a/tools/patman/func_test.py +++ b/tools/patman/func_test.py @@ -122,6 +122,7 @@ class TestFunctional(unittest.TestCase): Series-to: u-boot Series-prefix: RFC + Series-postfix: some-branch Series-cc: Stefan Brüns <stefan.bruens@rwth-aachen.de> Cover-letter-cc: Lord Mëlchett <clergy@palace.gov> Series-version: 3 @@ -176,7 +177,7 @@ class TestFunctional(unittest.TestCase): - each patch has the correct subject - dry-run information prints out correctly - unicode is handled correctly - - Series-to, Series-cc, Series-prefix, Cover-letter + - Series-to, Series-cc, Series-prefix, Series-postfix, Cover-letter - Cover-letter-cc, Series-version, Series-changes, Series-notes - Commit-notes """ @@ -235,6 +236,7 @@ class TestFunctional(unittest.TestCase): self.assertEqual('Cc: %s' % stefan, next(lines)) self.assertEqual('Version: 3', next(lines)) self.assertEqual('Prefix:\t RFC', next(lines)) + self.assertEqual('Postfix:\t some-branch', next(lines)) self.assertEqual('Cover: 4 lines', next(lines)) self.assertEqual(' Cc: %s' % self.fred, next(lines)) self.assertEqual(' Cc: %s' % self.leb, @@ -285,7 +287,7 @@ Simon Glass (2): ''' lines = open(cover_fname, encoding='utf-8').read().splitlines() self.assertEqual( - 'Subject: [RFC PATCH v3 0/2] test: A test patch series', + 'Subject: [RFC PATCH some-branch v3 0/2] test: A test patch series', lines[3]) self.assertEqual(expected.splitlines(), lines[7:]) |