# HG changeset patch # User Chris Cannam # Date 1452683982 0 # Node ID baac54711ee92860080ef20a62e399cd34304677 # Parent 3a2254124fa8d55476e7dd53be178d8f63abbc9d Attempt to fix that properly diff -r 3a2254124fa8 -r baac54711ee9 extra/soundsoftware/create-repo-authormaps.rb --- a/extra/soundsoftware/create-repo-authormaps.rb Wed Jan 13 11:14:28 2016 +0000 +++ b/extra/soundsoftware/create-repo-authormaps.rb Wed Jan 13 11:19:42 2016 +0000 @@ -101,12 +101,21 @@ # # I don't know how it got like that... If the committer has more # than one '<' in it, truncate it just before the first one, and - # then we look up the author name again. + # then look up the author name again. + # if c =~ /<.*/ then + user = User.find_by_id uid + if user.nil? then + # because the given committer is bogus, we must write something in the map + authormap << "#{c}=#{user.name} \n" + else + authormap << "#{c}=#{user.name} <#{user.mail}>\n" + end + elsif not c =~ /[^<]+<.*@.*>/ then + # This is the "normal" case that needs work, where a user has + # their name in the commit but no email address user = User.find_by_id uid authormap << "#{c}=#{user.name} <#{user.mail}>\n" unless user.nil? end