Signed-off-by: Karl Hasselström <kha@treskal.com>
"""Return a tuple consisting of the name and email parsed from a
standard 'name <email>' or 'email (name)' string
"""
"""Return a tuple consisting of the name and email parsed from a
standard 'name <email>' or 'email (name)' string
"""
- address = re.sub('[\\\\"]', '\\\\\g<0>', address)
+ address = re.sub(r'[\\"]', r'\\\g<0>', address)
str_list = re.findall('^(.*)\s*<(.*)>\s*$', address)
if not str_list:
str_list = re.findall('^(.*)\s*\((.*)\)\s*$', address)
str_list = re.findall('^(.*)\s*<(.*)>\s*$', address)
if not str_list:
str_list = re.findall('^(.*)\s*\((.*)\)\s*$', address)
"""Return a tuple consisting of the name, email and date parsed
from a 'name <email> date' string
"""
"""Return a tuple consisting of the name, email and date parsed
from a 'name <email> date' string
"""
- address = re.sub('[\\\\"]', '\\\\\g<0>', address)
+ address = re.sub(r'[\\"]', r'\\\g<0>', address)
str_list = re.findall('^(.*)\s*<(.*)>\s*(.*)\s*$', address)
if not str_list:
raise CmdException, 'Incorrect "name <email> date" string: %s' % address
str_list = re.findall('^(.*)\s*<(.*)>\s*(.*)\s*$', address)
if not str_list:
raise CmdException, 'Incorrect "name <email> date" string: %s' % address
help = 'send a patch or series of patches by e-mail'
help = 'send a patch or series of patches by e-mail'
-usage = """%prog [options] [<patch1>] [<patch2>] [<patch3>..<patch4>]
+usage = r"""%prog [options] [<patch1>] [<patch2>] [<patch3>..<patch4>]
Send a patch or a range of patches by e-mail using the SMTP server
specified by the 'stgit.smtpserver' configuration option, or the
Send a patch or a range of patches by e-mail using the SMTP server
specified by the 'stgit.smtpserver' configuration option, or the
%(commemail)s - committer's e-mail
%(commname)s - committer's name
%(diff)s - unified diff of the patch
%(commemail)s - committer's e-mail
%(commname)s - committer's name
%(diff)s - unified diff of the patch
- %(fromauth)s - 'From: author\\n\\n' if different from sender
+ %(fromauth)s - 'From: author\n\n' if different from sender
%(longdescr)s - the rest of the patch description, after the first line
%(patch)s - patch name
%(prefix)s - 'prefix ' string passed on the command line
%(longdescr)s - the rest of the patch description, after the first line
%(patch)s - patch name
%(prefix)s - 'prefix ' string passed on the command line