To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / extra / soundsoftware / get-repo-authormap.rb @ 1571:4c2b25b7e85f
History | View | Annotate | Download (625 Bytes)
| 1 |
|
|---|---|
| 2 |
# Print out an authormap file for hg-to-git conversion using
|
| 3 |
# hg-fast-export
|
| 4 |
#
|
| 5 |
# Invoke with the project identifier as argument, e.g.
|
| 6 |
#
|
| 7 |
# ./script/rails runner -e production extra/soundsoftware/get-repo-authormap.rb soundsoftware-site
|
| 8 |
|
| 9 |
proj_ident = ARGV.last
|
| 10 |
proj = Project.find_by_identifier(proj_ident)
|
| 11 |
repo = Repository.where(:project_id => proj.id).first |
| 12 |
csets = Changeset.where(:repository_id => repo.id) |
| 13 |
committers = csets.map do |c| c.committer end.sort.uniq |
| 14 |
committers.each do |c|
|
| 15 |
if not c =~ /[^<]+<.*@.*>/ then |
| 16 |
u = repo.find_committer_user c |
| 17 |
print "#{c}=#{u.name} <#{u.mail}>\n" unless u.nil? |
| 18 |
end
|
| 19 |
end
|