remote-hg: handle another funny author line from http://scelenic.com/hg

In this case: David Soria Parra <dsp <at> php.net>.

With this last of three Postel patches, remote-hg can import the
Mercurial repository completely.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin
2012-04-07 00:56:31 -05:00
committed by Pat Thoyts
parent fac173a5d8
commit 3d3cd442af

View File

@@ -84,7 +84,13 @@ class GitHg(object):
email = a.group(2)
extra = a.group(4)
if not extra is None and len(extra) > 0:
name += ' ext:(' + urllib.quote(extra) + ')'
if email.endswith(' <at'):
extra = extra.replace(' ', '')
extra = extra.replace(' <dot> ', '.')
extra = extra.replace('>', '')
email = email[:-4] + '@' + extra
else:
name += ' ext:(' + urllib.quote(extra) + ')'
author = name + ' <' + email + '>'
else:
if author.find('<') >= 0: