commit 4f60a9edc6ed003c69c0200dae955522a81ed5d8
parent d3093211872207e898cea6f197bd5a29fab3e221
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date: Sun, 11 Feb 2007 21:16:37 +0000
unbroke
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@322 5c8cc53c-5e98-4d25-b20a-d8db53a31250
Diffstat:
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/History.txt b/History.txt
@@ -1,12 +1,13 @@
== 0.0.7 / XXXXXX
* Moving messages between sources now preserves state.
* Split sup-import into two bits: sup-import and sup-add.
-* sup-import --force_rebuild is now --full-rebuild.
+* Command-line arguments now handled by trollop.
* Better error handling for IMAP and svn+ssh.
-* Hit 'a' in thread-view-mode to alias a contact. Hit 'S' to search for
- all email to/from them.
-* Removed hoe dependency; added trollop dependency.
-* Many internal code improvements.
+* New commands in thread-view-mode
+ - 'a' to add an email to the addressbook
+ - 'S' to search for all email to/from an email address
+ - 'A' to kill buffer and archive thread in one swell foop
+* Removed hoe dependency.
== 0.0.6 / 2007-01-06
* Very minor fix to support more types of IMAP authentication.
diff --git a/bin/sup-import b/bin/sup-import
@@ -105,16 +105,18 @@ begin
if entry.nil? # it's a new message; or
puts "Adding message at #{offset}, labels: #{m.labels * ' '}" if opts[:verbose]
num_added += 1
+ found[m.id] = true
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 "Updating message at #{offset} (from #{m.from.longname}, subject '#{m.subj}'), source #{entry[:source_id]} => #{source.id}, offset #{entry[:source_info]} => #{offset}, labels: {#{m.labels * ', '}}" if opts[:verbose]
num_updated += 1 unless found[m.id]
+ found[m.id] = true
m
else
+ found[m.id] = true
nil
end
- found[m.id] = true
end
puts "Added #{num_added}, updated #{num_updated} messages from #{source}."
end
@@ -142,7 +144,7 @@ if opts[:rebuild] || opts[:full_rebuild]
mid = index.index[docid][:message_id]
# puts "got #{mid}"
next if found[mid]
- puts "Deleting #{mid} (from #{m.from.longname}, subject '#{m.subj}')" if opts[:verbose]
+ puts "Deleting #{mid}" if opts[:verbose]
index.index.delete docid
numdel += 1
end