]> git.cworth.org Git - sup/commitdiff
various minor bugfixes
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 23 May 2007 01:36:18 +0000 (01:36 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Wed, 23 May 2007 01:36:18 +0000 (01:36 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@411 5c8cc53c-5e98-4d25-b20a-d8db53a31250

bin/sup
bin/sup-sync
doc/TODO
lib/sup/buffer.rb

diff --git a/bin/sup b/bin/sup
index e9638dbf71fa35c0bf85e26b045304f1ad28b402..c28aba561030e3db2573a144a98e29bc7fb4ccaf 100644 (file)
--- a/bin/sup
+++ b/bin/sup
@@ -204,7 +204,7 @@ begin
             BufferManager.spawn "Edit message", r
             r.edit
           else
-            b = BufferManager.spawn_unless_exists(:draft) do
+            b = BufferManager.spawn_unless_exists("All drafts") do
               mode = LabelSearchResultsMode.new [:draft]
             end
             b.mode.load_threads :num => b.content_height
index 12a830a1e872b1c3f247a5af4c1890d4612a577c..00557a38206d7b3a0c87d5a1dfb18b01cbfc1a37 100644 (file)
@@ -192,6 +192,8 @@ begin
     $stderr.puts "Scanned #{num_scanned}, added #{num_added}, updated #{num_updated} messages from #{source}."
     $stderr.puts "Restored state on #{num_restored} (#{100.0 * num_restored / num_scanned}%) messages." if num_restored > 0
   end
+rescue FatalSourceError => e
+  $stderr.puts "Sorry, I couldn't communicate with a source: #{e.message}"
 rescue Exception => e
   File.open("sup-exception-log.txt", "w") { |f| f.puts e.backtrace }
   raise
index d596648521f4c7b8db241e93305019dc4b573e00..9185e056f09affc88896f4f0ca9e9fc514666a67 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -7,7 +7,7 @@ _ bugfix: ferret flakiness: just added message but can't find it.
 _ bugfix: when one new message comes into an imap folder, we don't
    catch it until a reload (sometimes?)
 _ bugfix: add new message counts until keypress
-_ bugfix: readlock
+_ bugfix: deadlock
 _ split out threading & message chunk parsing to a separate library
 _ decode RFC 2047 ("encoded word") headers
   - see: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/101949, http://dev.rubyonrails.org/ticket/6807
index 5642727884c1a94dd4bfd0531c34202ed762ae9b..80eb18e3a22191256c5531f58cbe90cd6cce6abb 100644 (file)
@@ -196,6 +196,7 @@ class BufferManager
   def [] n; @name_map[n]; end
   def []= n, b
     raise ArgumentError, "duplicate buffer name" if b && @name_map.member?(n)
+    raise ArgumentError, "title must be a string" unless n.is_a? String
     @name_map[n] = b
   end
 
@@ -258,6 +259,7 @@ class BufferManager
   end
 
   def spawn title, mode, opts={}
+    raise ArgumentError, "title must be a string" unless title.is_a? String
     realtitle = title
     num = 2
     while @name_map.member? realtitle