diff options
author | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2009-11-23 13:25:07 +0100 |
---|---|---|
committer | Benjamin Kellermann <Benjamin.Kellermann@gmx.de> | 2009-11-23 13:25:07 +0100 |
commit | 6bcb17d78da2ed2df16c4d994c866dcf57ebe3f4 (patch) | |
tree | 2039349e5df09c308b81ce1b0fd142491799209c /bzr.rb | |
parent | 587e9f38c972217f15a8fc09eba0c9180da8d147 (diff) |
own log class for history
Diffstat (limited to '')
-rw-r--r-- | bzr.rb | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -17,10 +17,11 @@ # along with dudle. If not, see <http://www.gnu.org/licenses/>. # ############################################################################ -BZRCMD="export LC_ALL=de_DE.UTF-8; bzr" require "time" +require "log" class VCS + BZRCMD="export LC_ALL=de_DE.UTF-8; bzr" def VCS.init `#{BZRCMD} init` end @@ -39,12 +40,13 @@ class VCS def VCS.history log = `#{BZRCMD} log --forward`.split("-"*60) + ret = Log.new log.shift - log.collect{|s| - a = s.scan(/\nrevno:.*\ncommitter.*\n.*\ntimestamp: (.*)\nmessage:\n (.*)/).flatten - h = {"timestamp" => Time.parse(a[0]), - "commit message" => a[1]} + log.each{|s| + a = s.scan(/\nrevno:(.*)\ncommitter.*\n.*\ntimestamp: (.*)\nmessage:\n (.*)/).flatten + ret.add(a[0].to_i, Time.parse(a[1]), a[2]) } + ret end def VCS.longhistory dir |