Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

print nice error message when the whistlepig index format changes

  • Loading branch information...
commit dac4e54e40ffe3d1e04543159e3b70f2b2a6ce7b 1 parent 8473b71
@wmorgan authored
Showing with 20 additions and 1 deletion.
  1. +20 −1 bin/heliotrope-server
21 bin/heliotrope-server
@@ -642,7 +642,26 @@ end
FileUtils.mkdir_p opts.dir
FileUtils.mkdir_p File.join(opts.dir, "index")
store = File.join(opts.dir, "store")
-index = File.join(opts.dir, "index", "whistlepig")
+index = begin
+ File.join(opts.dir, "index", "whistlepig")
+rescue Whistlepig::VersionError => e
+ puts <<EOS
+Whistlepig index incompatibility detected!
+Details: #{e.message}
+You have upgraded to a version of Whistlepig that represents its data
+differently. You need to rebuild your index. To do this, please run:
+ heliotrope-reindex --dir #{opts.dir}
+And then restart the server. Heliotrope apologizes for any inconvenience.
+ abort
hooks = File.join(opts.dir, "hooks")
metaindex = Heliotrope::MetaIndex.load_or_die! store, index, hooks
zmbox = File.join(opts.dir, "messages")
Please sign in to comment.
Something went wrong with that request. Please try again.