aboutsummaryrefslogtreecommitdiff
path: root/bzr.rb
diff options
context:
space:
mode:
Diffstat (limited to 'bzr.rb')
-rw-r--r--bzr.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/bzr.rb b/bzr.rb
index 6c77717..973775e 100644
--- a/bzr.rb
+++ b/bzr.rb
@@ -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