changeset 1542:60acfbd8f6d6 live

Use simpler saved committer list; ignore -e option (used for env)
author Chris Cannam
date Tue, 02 Jun 2015 12:25:31 +0100
parents 2696466256ff
children 05d639e5d59b e9e55585ebf2 3107eacaddf7
files extra/soundsoftware/create-repo-authormaps.rb
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/extra/soundsoftware/create-repo-authormaps.rb	Tue Jun 02 12:24:46 2015 +0100
+++ b/extra/soundsoftware/create-repo-authormaps.rb	Tue Jun 02 12:25:31 2015 +0100
@@ -29,7 +29,8 @@
 
 opts = GetoptLong.new(
                       ['--scm-dir',      '-s', GetoptLong::REQUIRED_ARGUMENT],
-                      ['--out-dir',      '-o', GetoptLong::REQUIRED_ARGUMENT]
+                      ['--out-dir',      '-o', GetoptLong::REQUIRED_ARGUMENT],
+                      ['--environment',  '-e', GetoptLong::REQUIRED_ARGUMENT]
 )
 
 $repos_base   = ''
@@ -81,17 +82,16 @@
   repo_url = repo.url
   repo_url = repo_url.gsub(/^file:\/*/, "/");
   if repo_url != File.join($repos_base, proj.identifier)
-    puts 'Project #{proj.identifier} has repo in unsupported location #{repo_url}, skipping'
+    puts "Project #{proj.identifier} has repo in unsupported location #{repo_url}, skipping"
     next
   end
 
-  csets = repo.changesets
-  committers = csets.map do |c| c.committer end.sort.uniq
+  committers = repo.committers
 
   authormap = ""
-  committers.each do |c|
+  committers.each do |c, uid|
     if not c =~ /[^<]+<.*@.*>/ then
-      user = repo.find_committer_user c
+      user = User.find_by_id uid
       authormap << "#{c}=#{user.name} <#{user.mail}>\n" unless user.nil?
     end
   end