patchstream.InsertCoverLetter(cover_fname, series, count)
series.DoChecks()
cc_file = series.MakeCcFile(process_tags, cover_fname,
- not ignore_bad_tags, add_maintainers)
+ not ignore_bad_tags, add_maintainers,
+ None)
cmd = gitutil.EmailPatches(series, cover_fname, args,
dry_run, not ignore_bad_tags, cc_file,
in_reply_to=in_reply_to, thread=None)
parser.add_option('-m', '--no-maintainers', action='store_false',
dest='add_maintainers', default=True,
help="Don't cc the file maintainers automatically")
+parser.add_option('-l', '--limit-cc', dest='limit', type='int',
+ default=None, help='Limit the cc list to LIMIT entries [default: %default]')
parser.add_option('-n', '--dry-run', action='store_true', dest='dry_run',
default=False, help="Do a dry run (create but don't email patches)")
parser.add_option('-p', '--project', default=project.DetectProject(),
cc_file = series.MakeCcFile(options.process_tags, cover_fname,
not options.ignore_bad_tags,
- options.add_maintainers)
+ options.add_maintainers, options.limit)
# Email the patches out (giving the user time to check / cancel)
cmd = ''
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.
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
"""
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