changeset 1537:e55cbb9ba8bf live

Authormap generator works, but is far too slow to run through runner
author Chris Cannam
date Tue, 19 May 2015 17:33:38 +0100
parents e2a3230f61fa
children 87bea4981d6d
files extra/soundsoftware/get-repo-authormap.rb
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/extra/soundsoftware/get-repo-authormap.rb	Tue May 19 16:14:34 2015 +0100
+++ b/extra/soundsoftware/get-repo-authormap.rb	Tue May 19 17:33:38 2015 +0100
@@ -6,13 +6,14 @@
 #
 # ./script/rails runner -e production extra/soundsoftware/get-repo-authormap.rb soundsoftware-site
 
-proj_ident = ARGV[1]
-
+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|
-  u = repo.find_committer_user c
-  print "#{c}=#{u.name} <#{u.mail}>\n" unless u.nil?
+  if not c =~ /[^<]+<.*@.*>/ then
+    u = repo.find_committer_user c
+    print "#{c}=#{u.name} <#{u.mail}>\n" unless u.nil?
+  end
 end