Last active
December 15, 2015 23:59
-
-
Save masao/5344493 to your computer and use it in GitHub Desktop.
Fix log messages for converting dump using cvs2git.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "nkf" | |
ARGF.each do |line| | |
case line | |
when /^data\s+(\d+)$/ | |
log_msg = ARGF.read( $1.to_i ) | |
log_msg = NKF.nkf( "-wm0", log_msg ) | |
puts "data #{ log_msg.size }" | |
print log_msg | |
when /^committer\s+/ | |
line.sub!( /masao(\s+\<\>)?/, "masao <tmasao@acm.org>" ) | |
line.sub!( /yuka(\s+\<\>)?/, "yegusa <yuka@nier.go.jp>" ) | |
print line | |
else | |
print line | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment