commit 7a06106d92ebc89384eff86b73268a55f9e4eb85
parent 1bc4fcb8ca70611b7d6d35dcae690d9ee62cd2f2
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date: Thu, 1 Feb 2007 21:47:36 +0000
better output
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@293 5c8cc53c-5e98-4d25-b20a-d8db53a31250
Diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/bin/sup-import b/bin/sup-import
@@ -96,10 +96,12 @@ begin
end
## update if...
- if entry.nil? || # it's a new message; or
- opts[:full_rebuild] || # we're updating everyone; or
+ if entry.nil? # it's a new message; or
+ puts "# adding message at #{offset}, labels: #{m.labels * ' '}" if opts[:verbose]
+ m
+ elsif opts[:full_rebuild] || # we're updating everyone; or
(opts[:rebuild] && (entry[:source_id].to_i != source.id || entry[:source_info].to_i != offset)) # we're updating just the changed ones
- puts "# message at #{offset}, labels: #{m.labels * ' '}" if opts[:verbose]
+ puts "# updating message at #{offset}, source #{entry[:source_id]} => #{source.id}, offset #{entry[:source_info]} => #{offset}, labels: #{m.labels * ' '}" if opts[:verbose]
m
else
nil