]> git.cworth.org Git - sup/blobdiff - bin/sup-dump
Merge branch 'master' into next
[sup] / bin / sup-dump
index 29f6d6ee7cb3ad4a3d95e3a381c77feca7b053a6..8b5bf07f07be990e49ffdb96ff90b623e69a1a9a 100755 (executable)
@@ -21,11 +21,10 @@ No options.
 EOS
 end
 
-index = Redwood::Index.new
+index = Redwood::Index.init
+Redwood::SourceManager.init
 index.load
 
-(1 ... index.index.reader.max_doc).each do |i|
-  next if index.index.deleted? i
-  d = index.index[i]
-  puts [d[:message_id], "(" + d[:label] + ")"] * " "
+index.each_message :load_spam => true, :load_deleted => true, :load_killed => true do |m|
+  puts "#{m.id} (#{m.labels.to_a * ' '})"
 end