action = 'store_true'),
make_option('-n', '--name',
help = 'use NAME as the patch name'),
action = 'store_true'),
make_option('-n', '--name',
help = 'use NAME as the patch name'),
make_option('-e', '--edit',
help = 'invoke an editor for the patch description',
action = 'store_true'),
make_option('-e', '--edit',
help = 'invoke an editor for the patch description',
action = 'store_true'),
def __parse_mail(filename = None):
"""Parse the input file in a mail format and return (description,
authname, authemail, authdate)
def __parse_mail(filename = None):
"""Parse the input file in a mail format and return (description,
authname, authemail, authdate)
line = line.strip()
if re.match('from:\s+', line, re.I):
auth = re.findall('^.*?:\s+(.*)$', line)[0]
line = line.strip()
if re.match('from:\s+', line, re.I):
auth = re.findall('^.*?:\s+(.*)$', line)[0]
descr += '\n\n'
else:
raise CmdException, 'Subject: line not found'
# the rest of the patch description
descr += '\n\n'
else:
raise CmdException, 'Subject: line not found'
# the rest of the patch description
# the first 'Signed-of-by:' is the author
if not authname and re.match('signed-off-by:\s+', line, re.I):
auth = re.findall('^.*?:\s+(.*)$', line)[0]
authname, authemail = name_email(auth)
# the first 'Signed-of-by:' is the author
if not authname and re.match('signed-off-by:\s+', line, re.I):
auth = re.findall('^.*?:\s+(.*)$', line)[0]
authname, authemail = name_email(auth)
crt_series.refresh_patch(edit = options.edit,
show_patch = options.showpatch)
crt_series.refresh_patch(edit = options.edit,
show_patch = options.showpatch)