Permalink
Browse files

fix: add option to fix committers as well

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
  • Loading branch information...
felipec committed Oct 29, 2012
1 parent 04fd857 commit c6e92b1650231c362fb0856eb83a54f624f39b5a
Showing with 9 additions and 3 deletions.
  1. +7 −1 fix
  2. +2 −2 fix-commits.rb
View
8 fix
@@ -6,6 +6,7 @@ require './util'
$commit_authors = {}
$commit_svn_authors = {}
+$commit_committers = {}
$commit_messages = {}
$commit_map_git = {}
$commit_map_mtn = {}
@@ -63,12 +64,16 @@ File.open('svn-authors').each do |l|
end
end
-def fix_commit(rev, author = '')
+def fix_commit(rev, author = '', committer = '')
id = @mtn_map[rev]
author.scan(/(.*) <(.*)>/) do |name, email|
$commit_authors[id] = [name, email]
end
+ committer.scan(/(.*) <(.*)>/) do |name, email|
+ $commit_committers[id] = [name, email]
+ end
+
return if not block_given?
$commit_messages[id] = yield
@@ -131,6 +136,7 @@ class Commit
end
@author = $commit_authors[@id] if $commit_authors[@id]
+ @committer = $commit_committers[@id] if $commit_committers[@id]
if $commit_svn_authors[@id]
@committer = @author # mercurial conv did this
View
@@ -1,8 +1,8 @@
#!/usr/bin/env ruby
# encoding: utf-8
-fix_commit("2d6f9e6fefcb1cc3acf077976fb4563ec6195f82", "Tomáš Kebert <tom342@gmail.com>")
-fix_commit("e8b2e1e7ac4597ec67db53c64064e2e8e7f3cbc1", "Tomáš Kebert <tom342@gmail.com>")
+fix_commit("2d6f9e6fefcb1cc3acf077976fb4563ec6195f82", "Tomáš Kebert <tom342@gmail.com>", "Richard Laager <rlaager@pidgin.im>")
+fix_commit("e8b2e1e7ac4597ec67db53c64064e2e8e7f3cbc1", "Tomáš Kebert <tom342@gmail.com>", "Richard Laager <rlaager@pidgin.im>")
fix_commit("73e463add9a124c86554c2958526e1a6ee5fc22f") do
<<EOF

0 comments on commit c6e92b1

Please sign in to comment.