%(diffstat)s - diff statistics
%(date)s - current date/time
%(version)s - ' version' string passed on the command line (or empty)
+ %(prefix)s - 'prefix ' string passed on the command line
%(patchnr)s - patch number
%(totalnr)s - total number of patches to be sent
%(number)s - empty if only one patch is sent or ' patchnr/totalnr'
action = 'store_true'),
make_option('-v', '--version', metavar = 'VERSION',
help = 'add VERSION to the [PATCH ...] prefix'),
+ make_option('--prefix', metavar = 'PREFIX',
+ help = 'add PREFIX to the [... PATCH ...] prefix'),
make_option('-t', '--template', metavar = 'FILE',
help = 'use FILE as the message template'),
make_option('-c', '--cover', metavar = 'FILE',
else:
version_str = ''
+ if options.prefix:
+ prefix_str = options.prefix + ' '
+ else:
+ prefix_str = ''
+
total_nr_str = str(total_nr)
patch_nr_str = '0'.zfill(len(total_nr_str))
if total_nr > 1:
'endofheaders': headers_end,
'date': email.Utils.formatdate(localtime = True),
'version': version_str,
+ 'prefix': prefix_str,
'patchnr': patch_nr_str,
'totalnr': total_nr_str,
'number': number_str}
else:
version_str = ''
+ if options.prefix:
+ prefix_str = options.prefix + ' '
+ else:
+ prefix_str = ''
+
total_nr_str = str(total_nr)
patch_nr_str = str(patch_nr).zfill(len(total_nr_str))
if total_nr > 1:
rev2 = git_id('%s//top' % patch)),
'date': email.Utils.formatdate(localtime = True),
'version': version_str,
+ 'prefix': prefix_str,
'patchnr': patch_nr_str,
'totalnr': total_nr_str,
'number': number_str,