]> git.sur5r.net Git - u-boot/blobdiff - tools/patman/series.py
Merge git://git.denx.de/u-boot-dm
[u-boot] / tools / patman / series.py
index d526d4ee91d3a6b5a7ee119e3a89c22cf81be6a0..2735afaf88feab0eb3e4546dac7912f088fe37bc 100644 (file)
@@ -202,7 +202,7 @@ class Series(dict):
             print(col.Color(col.RED, str))
 
     def MakeCcFile(self, process_tags, cover_fname, raise_on_error,
-                   add_maintainers):
+                   add_maintainers, limit):
         """Make a cc file for us to use for per-commit Cc automation
 
         Also stores in self._generated_cc to make ShowActions() faster.
@@ -215,6 +215,7 @@ class Series(dict):
             add_maintainers: Either:
                 True/False to call the get_maintainers to CC maintainers
                 List of maintainers to include (for testing)
+            limit: Limit the length of the Cc list
         Return:
             Filename of temp file created
         """
@@ -238,6 +239,8 @@ class Series(dict):
                 print(col.Color(col.YELLOW, 'Skipping "%s"' % x))
             cc = set(cc) - set(settings.bounces)
             cc = [m.encode('utf-8') if type(m) != str else m for m in cc]
+            if limit is not None:
+                cc = cc[:limit]
             all_ccs += cc
             print(commit.patch, ', '.join(set(cc)), file=fd)
             self._generated_cc[commit.patch] = cc