]> git.notmuchmail.org Git - sup/commitdiff
better output
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Thu, 1 Feb 2007 21:47:36 +0000 (21:47 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Thu, 1 Feb 2007 21:47:36 +0000 (21:47 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@293 5c8cc53c-5e98-4d25-b20a-d8db53a31250

bin/sup-import

index a9487aa199144e99f5c80ba5c25922c979c0369b..f801246dd7596b82ccfdae93d9778f7a9cfe1c3b 100644 (file)
@@ -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