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 @ 1553:baac54711ee9
History | View | Annotate | Download (625 Bytes)
| 1 | 1536:e2a3230f61fa | Chris | |
|---|---|---|---|
| 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 | 1537:e55cbb9ba8bf | Chris | proj_ident = ARGV.last
|
| 10 | 1536:e2a3230f61fa | Chris | 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 | 1537:e55cbb9ba8bf | Chris | 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 | 1536:e2a3230f61fa | Chris | end |