]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
patman: Add Commit-cc as an alias for Patch-cc
authorSean Anderson <seanga2@gmail.com>
Fri, 19 Apr 2024 02:36:31 +0000 (22:36 -0400)
committerSimon Glass <sjg@chromium.org>
Wed, 3 Jul 2024 06:36:32 +0000 (07:36 +0100)
Most tags referring to commits (or patches) are named Commit-something. The
exception is Patch-cc. Add a Commit-cc alias so we can use whichever one is
convenient.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
tools/patman/func_test.py
tools/patman/patchstream.py
tools/patman/patman.rst
tools/patman/test/0002-fdt-Correct-cast-for-sandbox-in-fdtdec_setup_mem_siz.patch
tools/patman/test/test01.txt

index 9c016fb5e9a60c1f5eb58bca9e9e1313a0c2c409..3b4c9448882a6961ce1ed796bf3c11ea6ffec9cb 100644 (file)
@@ -211,6 +211,7 @@ class TestFunctional(unittest.TestCase):
             'u-boot': ['u-boot@lists.denx.de'],
             'simon': [self.leb],
             'fred': [self.fred],
+            'joe': [self.joe],
         }
 
         text = self._get_text('test01.txt')
@@ -259,6 +260,7 @@ class TestFunctional(unittest.TestCase):
         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.joe, next(lines))
         self.assertEqual('      Cc:  %s' % self.leb,
                          next(lines))
         self.assertEqual('      Cc:  %s' % mel, next(lines))
@@ -272,7 +274,8 @@ class TestFunctional(unittest.TestCase):
 
         self.assertEqual(('%s %s\0%s' % (args[0], rick, stefan)), cc_lines[0])
         self.assertEqual(
-            '%s %s\0%s\0%s\0%s' % (args[1], self.fred, self.leb, rick, stefan),
+            '%s %s\0%s\0%s\0%s\0%s' % (args[1], self.fred, self.joe, self.leb,
+                                       rick, stefan),
             cc_lines[1])
 
         expected = '''
index e2e2a83e677323e63dac8741f1434a512094104d..ec1ca874fb2654b86621917ca0085eea6721fe8e 100644 (file)
@@ -475,6 +475,8 @@ class PatchStream:
             elif name == 'changes':
                 self.in_change = 'Commit'
                 self.change_version = self._parse_version(value, line)
+            elif name == 'cc':
+                self.commit.add_cc(value.split(','))
             else:
                 self._add_warn('Line %d: Ignoring Commit-%s' %
                                (self.linenum, name))
index f4588c00fc11240e72bfbb018c02fc67c7014fde..9971fa8c0fd3e3decaa6e53a9b4a1fa7d01104f9 100644 (file)
@@ -350,7 +350,7 @@ Cover-changes: n
         - This line will only appear in the cover letter
         <blank line>
 
-Patch-cc: Their Name <email>
+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
     interpreted by git send-email if you use it.
index 56278a6ce9b10997f20044fd434d5ff2ca434650..55a0d6756aa2d588468b2939c641d45371102994 100644 (file)
@@ -21,6 +21,7 @@ Series-cc: Stefan Brüns <stefan.bruens@rwth-aachen.de>
 Cover-letter-cc: Lord Mëlchett <clergy@palace.gov>
 Series-version: 3
 Patch-cc: fred
+Commit-cc: joe
 Series-process-log: sort, uniq
 Series-changes: 4
 - Some changes
index fc3066e50b414cc65a9516c67ab654cc2b5ec92b..271d9bf043fcd183216f9303c39257bd7e209488 100644 (file)
@@ -49,6 +49,7 @@ Date:   Sat Apr 15 15:39:08 2017 -0600
     Cover-letter-cc: Lord Mëlchett <clergy@palace.gov>
     Series-version: 3
     Patch-cc: fred
+    Commit-cc: joe
     Series-process-log: sort, uniq
     Series-changes: 4
     - Some changes