]> git.cworth.org Git - sup/blobdiff - bin/sup-dump
sort labels in the dump
[sup] / bin / sup-dump
index c18a767ec262947649bc99e93aa3daf65c72d074..7b33be5d583b925da8241854f423f74f10bf0245 100755 (executable)
@@ -21,10 +21,10 @@ No options.
 EOS
 end
 
-index = Redwood::Index.new
-Redwood::SourceManager.new
+index = Redwood::Index.init
+Redwood::SourceManager.init
 index.load
 
-index.each_message do |m|
-  puts "#{m.id} (#{m.labels * ' '})"
+index.each_message :load_spam => true, :load_deleted => true, :load_killed => true do |m|
+  puts "#{m.id} (#{m.labels.to_a.sort_by { |l| l.to_s } * ' '})"
 end