commit f6873cee99602ce5aae601f67f3b514f0e11593a
parent 35d2d5b3d0b52b152539dc8075a830dee3bf5b71
Author: Michael Hamann <michael@content-space.de>
Date: Sun, 6 Sep 2009 23:04:22 +0200
sort labels in the dump
Sorting labels in the dump is useful when you e.g. want to keep track of
your dump using an incremental backup system that records diffs, with
this patch lines in the dump will only change when there is a real
change and no longer just because the random order of the labels
changes.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/sup-dump b/bin/sup-dump
@@ -26,5 +26,5 @@ Redwood::SourceManager.init
index.load
index.each_message :load_spam => true, :load_deleted => true, :load_killed => true do |m|
- puts "#{m.id} (#{m.labels.to_a * ' '})"
+ puts "#{m.id} (#{m.labels.to_a.sort_by { |l| l.to_s } * ' '})"
end