From 55e0e4ec37e5805e2d1a6cb80664e1e661bb7536 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Sat, 7 Apr 2012 00:56:31 -0500 Subject: [PATCH] remote-hg: handle another funny author line from http://scelenic.com/hg In this case: David Soria Parra php.net>. With this last of three Postel patches, remote-hg can import the Mercurial repository completely. Signed-off-by: Johannes Schindelin --- git_remote_helpers/hg/hg.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/git_remote_helpers/hg/hg.py b/git_remote_helpers/hg/hg.py index cdd13fa513..d835ed47e4 100644 --- a/git_remote_helpers/hg/hg.py +++ b/git_remote_helpers/hg/hg.py @@ -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(' ', '.') + extra = extra.replace('>', '') + email = email[:-4] + '@' + extra + else: + name += ' ext:(' + urllib.quote(extra) + ')' author = name + ' <' + email + '>' else: if author.find('<') >= 0: -- 2.11.4.GIT