Mercurial > hg > soundsoftware-site
view extra/soundsoftware/get-repo-authormap.rb @ 1539:22d57b0e0a77 live
OK, this script works now, but it should be using the API
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Thu, 21 May 2015 17:31:06 +0100 |
parents | e55cbb9ba8bf |
children |
line wrap: on
line source
# Print out an authormap file for hg-to-git conversion using # hg-fast-export # # Invoke with the project identifier as argument, e.g. # # ./script/rails runner -e production extra/soundsoftware/get-repo-authormap.rb soundsoftware-site proj_ident = ARGV.last proj = Project.find_by_identifier(proj_ident) repo = Repository.where(:project_id => proj.id).first csets = Changeset.where(:repository_id => repo.id) committers = csets.map do |c| c.committer end.sort.uniq committers.each do |c| if not c =~ /[^<]+<.*@.*>/ then u = repo.find_committer_user c print "#{c}=#{u.name} <#{u.mail}>\n" unless u.nil? end end