Chris@1536: Chris@1536: # Print out an authormap file for hg-to-git conversion using Chris@1536: # hg-fast-export Chris@1536: # Chris@1536: # Invoke with the project identifier as argument, e.g. Chris@1536: # Chris@1536: # ./script/rails runner -e production extra/soundsoftware/get-repo-authormap.rb soundsoftware-site Chris@1536: Chris@1537: proj_ident = ARGV.last Chris@1536: proj = Project.find_by_identifier(proj_ident) Chris@1536: repo = Repository.where(:project_id => proj.id).first Chris@1536: csets = Changeset.where(:repository_id => repo.id) Chris@1536: committers = csets.map do |c| c.committer end.sort.uniq Chris@1536: committers.each do |c| Chris@1537: if not c =~ /[^<]+<.*@.*>/ then Chris@1537: u = repo.find_committer_user c Chris@1537: print "#{c}=#{u.name} <#{u.mail}>\n" unless u.nil? Chris@1537: end Chris@1536: end