diff options
author | Jamis Buck <jamis@37signals.com> | 2005-02-15 15:01:48 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2005-02-15 15:01:48 +0000 |
commit | 43c69d86c38b33461bd954c0a0b6d2017741c851 (patch) | |
tree | b59833c129dc6964fc055dc2ab9335a9f1cecb96 /util | |
parent | 693469bc5987f111db8fc6b4ee6916893954d180 (diff) | |
download | third_party-sqlite3-ruby-43c69d86c38b33461bd954c0a0b6d2017741c851.tar.gz third_party-sqlite3-ruby-43c69d86c38b33461bd954c0a0b6d2017741c851.tar.xz third_party-sqlite3-ruby-43c69d86c38b33461bd954c0a0b6d2017741c851.zip |
ChangeLog is dynamically generated again.
Diffstat (limited to 'util')
-rw-r--r-- | util/svn2cl.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/util/svn2cl.rb b/util/svn2cl.rb new file mode 100644 index 0000000..fe5216e --- /dev/null +++ b/util/svn2cl.rb @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby + +require 'time' + +def wrap( text, column, indent="" ) + wrapped = "" + while text.length > column + break_at = text.rindex( /[-\s]/, column ) || column + line = text[0,break_at+1].strip + text = text[break_at+1..-1].strip + wrapped << indent << line << "\n" + end + wrapped << indent << text +end + +output = `svn log`.split( /^-----*\n/ ) + +output[1..-2].each do |change| + lines = change.split(/\n/) + revision, user, stamp, size = lines.shift.split( /\|/ ) + lines.shift + msg = lines.join(' ') + date, time = stamp.match( /(\d\d\d\d-\d\d-\d\d) (\d\d:\d\d):\d\d/ )[1,2] + + puts "#{date} #{time} #{user.strip}" + puts + puts "\t* #{wrap(msg,60,"\t ").strip}" + puts +end |