diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-03-16 14:54:36 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-03-16 14:54:36 +0000 |
commit | 2d01398d67dd43b594445a7fca31243585b22172 (patch) | |
tree | d244b2b5c11b6008d97fd109bfc0a7a3716e9356 /lib/tasks | |
parent | f5b5688e8ad80dbfc3b2da13ac0ae245f541da48 (diff) | |
download | redmine-2d01398d67dd43b594445a7fca31243585b22172.tar.gz redmine-2d01398d67dd43b594445a7fca31243585b22172.zip |
Trac importer:
* prevent duplication of associated trackers when the target project already exists (closes #829)
* warn user if the target project already exists
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1263 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/migrate_from_trac.rake | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/tasks/migrate_from_trac.rake b/lib/tasks/migrate_from_trac.rake index f1d754109..2308e787b 100644 --- a/lib/tasks/migrate_from_trac.rake +++ b/lib/tasks/migrate_from_trac.rake @@ -538,9 +538,14 @@ namespace :redmine do puts "Unable to create a project with identifier '#{identifier}'!" unless project.save # enable issues and wiki for the created project project.enabled_module_names = ['issue_tracking', 'wiki'] - end - project.trackers << TRACKER_BUG - project.trackers << TRACKER_FEATURE + else + puts + puts "This project already exists in your Redmine database." + print "Are you sure you want to append data to this project ? [Y/n] " + exit if STDIN.gets.match(/^n$/i) + end + project.trackers << TRACKER_BUG unless project.trackers.include?(TRACKER_BUG) + project.trackers << TRACKER_FEATURE unless project.trackers.include?(TRACKER_FEATURE) @target_project = project.new_record? ? nil : project end |