aboutsummaryrefslogtreecommitdiff
path: root/bzr.rb
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-07-02 08:33:04 +0200
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2009-07-02 08:33:04 +0200
commit46e8e97a9decde2d0af4d1346bbec33d3d4c89bc (patch)
treec1ff4fba6f1feac95f0158d5f145417a4a21d825 /bzr.rb
parent6203b064af34f4a0504c2f975867f3bcd0dee06d (diff)
struktur von atom.cgi geƤndert
Diffstat (limited to 'bzr.rb')
-rw-r--r--bzr.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/bzr.rb b/bzr.rb
index 8f74edb..80ed128 100644
--- a/bzr.rb
+++ b/bzr.rb
@@ -1,4 +1,6 @@
BZRCMD="export LC_ALL=de_DE.UTF-8; bzr"
+require "time"
+
class VCS
def VCS.init
`#{BZRCMD} init`
@@ -19,6 +21,13 @@ class VCS
def VCS.history
`#{BZRCMD} log --forward`.split("-"*60)
end
+
+ def VCS.longhistory dir
+ log = `#{BZRCMD} log -r -10.. "#{dir}"`.split("-"*60)
+ log.collect!{|s| s.scan(/\nrevno: (.*)\ncommitter.*\n.*\ntimestamp: (.*)\nmessage:\n (.*)/).flatten}
+ log.shift
+ log.collect!{|r,t,c| [r.to_i,Time.parse(t),c]}
+ end
def VCS.commit comment
tmpfile = "/tmp/commitcomment.#{rand(10000)}"