aboutsummaryrefslogtreecommitdiff
path: root/tools/gen_authors.rb
blob: 96f2679db1cf660266cf1a4e99643071cb4b5732 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env ruby
# Generate list of authors from repository commits

log = `hg log --template='{author}'%`

authors = Hash.new(0)
log.split('%').each do |i|
  authors[i] += 1
end

# sort list by descending number of commits
authors = authors.sort_by {|k, v| v}.reverse

# print out authors
authors.each do |k, v|
  #print "    #{k} (#{v})\n"
  print "    #{k}\n"
end