sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 98d73f646561cbce16f5396c356f231412e4eda2
parent 970fd2006b80dc6dbd0e5df077150cf4b589cb32
Author: Rich Lane <rlane@club.cc.cmu.edu>
Date:   Fri, 19 Mar 2010 14:10:17 -0700

index version bump

Diffstat:
M lib/sup/index.rb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/sup/index.rb b/lib/sup/index.rb
@@ -21,7 +21,7 @@ class Index
   include InteractiveLock
 
   STEM_LANGUAGE = "english"
-  INDEX_VERSION = '2'
+  INDEX_VERSION = '3'
 
   ## dates are converted to integers for xapian, and are used for document ids,
   ## so we must ensure they're reasonably valid. this typically only affect
@@ -104,8 +104,8 @@ EOS
       @xapian = Xapian::WritableDatabase.new(path, Xapian::DB_OPEN)
       db_version = @xapian.get_metadata 'version'
       db_version = '0' if db_version.empty?
-      if db_version == '1'
-        info "Upgrading index format 1 to 2"
+      if db_version == '1' || db_version == '2'
+        info "Upgrading index format #{db_version} to #{INDEX_VERSION}"
         @xapian.set_metadata 'version', INDEX_VERSION
       elsif db_version != INDEX_VERSION
         fail "This Sup version expects a v#{INDEX_VERSION} index, but you have an existing v#{db_version} index. Please downgrade to your previous version and dump your labels before upgrading to this version (then run sup-sync --restore)."