]> source.dussan.org Git - redmine.git/commitdiff
Trac and Mantis importers: check that default configuration is loaded before processing.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 9 Mar 2008 17:23:22 +0000 (17:23 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 9 Mar 2008 17:23:22 +0000 (17:23 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1221 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/tasks/migrate_from_mantis.rake
lib/tasks/migrate_from_trac.rake

index 5f9663a39d1ae7c628ec40c0c5ee59dbf59a4c81..bf3c32ccddd9d3fe1a1af5e3ba3930832c58a6e4 100644 (file)
@@ -460,6 +460,14 @@ task :migrate_from_mantis => :environment do
   end\r
   \r
   puts\r
+  if Redmine::DefaultData::Loader.no_data?\r
+    puts "Redmine configuration need to be loaded before importing data."\r
+    puts "Please, run this first:"\r
+    puts\r
+    puts "  rake redmine:load_default_data RAILS_ENV=\"#{ENV['RAILS_ENV']}\""\r
+    exit\r
+  end\r
+  \r
   puts "WARNING: Your Redmine data will be deleted during this process."\r
   print "Are you sure you want to continue ? [y/N] "\r
   break unless STDIN.gets.match(/^y$/i)\r
index d61640bfbca1c7d4d501d33ee7f992c4e7a51140..9ece2cf39ff202e532ed1b252c91726d734b727f 100644 (file)
@@ -571,6 +571,14 @@ namespace :redmine do
     end
     
     puts
+    if Redmine::DefaultData::Loader.no_data?
+      puts "Redmine configuration need to be loaded before importing data."
+      puts "Please, run this first:"
+      puts
+      puts "  rake redmine:load_default_data RAILS_ENV=\"#{ENV['RAILS_ENV']}\""
+      exit
+    end
+    
     puts "WARNING: a new project will be added to Redmine during this process."
     print "Are you sure you want to continue ? [y/N] "
     break unless STDIN.gets.match(/^y$/i)