bin/sup-import in sup-0.0.3 vs bin/sup-import in sup-0.0.4
- old
+ new
@@ -74,11 +74,11 @@
[suri.host, s.username, s.password]
end.compact.uniq.sort_by { |h, u, p| h == uri.host ? 0 : 1 }
username, password = nil, nil
unless accounts.empty?
- say "Would you like to use the same account as for a previous source?"
+ say "Would you like to use the same account as for a previous source for #{uri}?"
choose do |menu|
accounts.each do |host, olduser, oldpw|
menu.choice("Use the account info for #{olduser}@#{host}") { username, password = olduser, oldpw }
end
menu.choice("Use a new account") { }
@@ -93,11 +93,10 @@
end
[username, password]
end
-
educate_user if ARGV.member? '--help'
archive = ARGV.delete "--archive"
unusual = ARGV.delete "--unusual"
force_archive = ARGV.delete "--force-archive"
@@ -178,10 +177,10 @@
else
found[m.id] = true
end
m.remove_label :unread if m.status == "RO" unless force_read
- puts "# message at #{offset}, labels: #{labels * ', '}"
+ puts "# message at #{offset}, labels: #{labels * ', '}" unless rebuild
if (rebuild || force_rebuild) &&
(docid, entry = index.load_entry_for_id(m.id)) && entry
if force_rebuild || entry[:source_info].to_i != offset
puts "replacing message #{m.id} labels #{entry[:label].inspect} (offset #{entry[:source_info]} => #{offset})"
m.labels = entry[:label].split.map { |l| l.intern }