Skip to content

Fix hg export for author emails that are actually a URL.

Kevin J. McCarthy requested to merge (removed):hg-fix into master

Converting from hg to git, I had a commit in my repository of the form Author: Name http://blah/ with a URL where the email address would normally be.

During the export, the hg template {author|person} output "Name http://blah/", including the URL and brackets (probably because it realized the URL was not actually a valid email address.) At the same time, {author|email} was outputting the URL.

The resultant string was "Name http://blah/ http://blah/ date", which confused the Attribution parser. It tried to evaluate the second http://blah/ as a Date.

This patch removes any <...> string from the {author|person} part, using the hg template function sub().

Merge request reports