def setup():
"""Do required setup before doing anything"""
- gitutil.Setup()
+ gitutil.setup()
-def prepare_patches(col, branch, count, start, end, ignore_binary):
+def prepare_patches(col, branch, count, start, end, ignore_binary, signoff):
"""Figure out what patches to generate, then generate them
The patch files are written to the current directory, e.g. 0001_xxx.patch
"""
if count == -1:
# Work out how many patches to send if we can
- count = (gitutil.CountCommitsToBranch(branch) - start)
+ count = (gitutil.count_commits_to_branch(branch) - start)
if not count:
str = 'No commits found to process - please use -c flag, or run:\n' \
# Read the metadata from the commits
to_do = count - end
series = patchstream.get_metadata(branch, start, to_do)
- cover_fname, patch_files = gitutil.CreatePatches(
- branch, start, to_do, ignore_binary, series)
+ cover_fname, patch_files = gitutil.create_patches(
+ branch, start, to_do, ignore_binary, series, signoff)
# Fix up the patch files to our liking, and insert the cover letter
patchstream.fix_patches(series, patch_files)
# Check the patches, and run them through 'git am' just to be sure
if run_checkpatch:
- ok = checkpatch.CheckPatches(verbose, patch_files)
+ ok = checkpatch.check_patches(verbose, patch_files)
else:
ok = True
return ok
# Email the patches out (giving the user time to check / cancel)
cmd = ''
if its_a_go:
- cmd = gitutil.EmailPatches(
+ cmd = gitutil.email_patches(
series, cover_fname, patch_files, dry_run, not ignore_bad_tags,
cc_file, in_reply_to=in_reply_to, thread=thread,
smtp_server=smtp_server)
col = terminal.Color()
series, cover_fname, patch_files = prepare_patches(
col, args.branch, args.count, args.start, args.end,
- args.ignore_binary)
+ args.ignore_binary, args.add_signoff)
ok = check_patches(series, patch_files, args.check_patch,
args.verbose)
- ok = ok and gitutil.CheckSuppressCCConfig()
+ ok = ok and gitutil.check_suppress_cc_config()
its_a_go = ok or args.ignore_errors
email_patches(
"""
if count == -1:
# Work out how many patches to send if we can
- count = (gitutil.CountCommitsToBranch(branch) - start)
+ count = (gitutil.count_commits_to_branch(branch) - start)
series = patchstream.get_metadata(branch, start, count - end)
warnings = 0