Changeset 3094 for lang/ruby/coderepos_stat/Rakefile
- Timestamp:
- 12/12/07 23:44:29 (13 months ago)
- Files:
-
- 1 modified
-
lang/ruby/coderepos_stat/Rakefile (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/coderepos_stat/Rakefile
r3041 r3094 6 6 file 'svn_log.txt' do |t| 7 7 # FIXME: it's better to user can specify revision range and limit number 8 sh % {svn log --xml -v -r 1:HEAD --limit 100 http://svn.coderepos.org/share/ > svn_log.txt}8 sh %[svn log --xml -v -r {2007-12-01}:HEAD http://svn.coderepos.org/share/ > svn_log.txt] 9 9 end 10 10 … … 44 44 end 45 45 46 desc 'commit count by committer from svn_log.txt' 47 task 'commit_ranking' => ['svn_log.txt'] do 48 require 'hpricot' 49 50 doc = Hpricot.parse(open('svn_log.txt').read) 51 commit_count_of = Hash.new(0) 52 doc.search('/log/logentry') do |logentry| 53 author = logentry.search('/author').inner_text 54 commit_count_of[author] += 1 55 end 56 commit_count_of.sort_by {|key,val| -1 * val }.each do |arr| 57 author, commit_count = *arr 58 puts "#{author}\t#{commit_count}" 59 end 60 end 61 46 62 desc 'cleanbackup' 47 63 task :cleanbackup do
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)