# HG changeset patch # User Chris Cannam # Date 1452683668 0 # Node ID 3a2254124fa8d55476e7dd53be178d8f63abbc9d # Parent 36dddb6755f62c51d4000d20337e78b733b43ae0 Discard certain malformed email addresses diff -r 36dddb6755f6 -r 3a2254124fa8 extra/soundsoftware/create-repo-authormaps.rb --- a/extra/soundsoftware/create-repo-authormaps.rb Tue Jan 12 17:55:48 2016 +0000 +++ b/extra/soundsoftware/create-repo-authormaps.rb Wed Jan 13 11:14:28 2016 +0000 @@ -93,6 +93,19 @@ authormap = "" committers.each do |c, uid| + + # Some of our repos have broken email addresses in them: e.g. one + # changeset has a committer name of the form + # + # NAME + # + # 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. + if c =~ /<.*/ then user = User.find_by_id uid authormap << "#{c}=#{user.name} <#{user.mail}>\n" unless user.nil?