aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2010-05-14 07:35:01 +0200
committerBenjamin Kellermann <Benjamin.Kellermann@gmx.de>2010-05-14 07:35:01 +0200
commitaa524e806cc317793b00a74d45dd7ca03e27ba16 (patch)
tree07d7e27a85d0163b6efc6ae7115236c9b7ea4c5c
parent85543db60fe31f32217667240333a31c70351976 (diff)
bugfix: atom didn't worked with git
-rwxr-xr-xatom.rb12
-rw-r--r--bzr.rb7
-rw-r--r--git.rb8
3 files changed, 6 insertions, 21 deletions
diff --git a/atom.rb b/atom.rb
index c7b2383..ffdb74f 100755
--- a/atom.rb
+++ b/atom.rb
@@ -43,13 +43,13 @@ feed.updated = File.new("data.yaml").mtime
feed.authors << Atom::Person.new(:name => 'dudle automatic notificator')
feed.links << Atom::Link.new(:href => SITEURL + "atom.cgi", :rel => "self")
-log = VCS.longhistory "."
-log.each {|rev,time,comment|
+log = VCS.history
+log.reverse_each {|l|
feed.entries << Atom::Entry.new do |e|
- e.title = comment
- e.links << Atom::Link.new(:href => "#{SITEURL}?revision=#{rev}")
- e.id = "urn:#{poll.class}:#{poll.name}:rev=#{rev}"
- e.updated = time
+ e.title = l.comment
+ e.links << Atom::Link.new(:href => "#{SITEURL}history.cgi?revision=#{l.rev}")
+ e.id = "urn:#{poll.class}:#{poll.name}:rev=#{l.rev}"
+ e.updated = l.timestamp
end
}
diff --git a/bzr.rb b/bzr.rb
index 11b1b5a..618ca44 100644
--- a/bzr.rb
+++ b/bzr.rb
@@ -48,13 +48,6 @@ class VCS
}
ret
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)}"
diff --git a/git.rb b/git.rb
index 2976f57..4d6f011 100644
--- a/git.rb
+++ b/git.rb
@@ -49,14 +49,6 @@ class VCS
ret
end
- #FIXME
- def VCS.longhistory dir
- log = `#{GITCMD} 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)}"
File.open(tmpfile,"w"){|f|