diff --git a/config/settings.yml b/config/settings.yml
index bb501823..616665f2 100644
--- a/config/settings.yml
+++ b/config/settings.yml
@@ -59,6 +59,15 @@ protocol:
feeds_limit:
format: int
default: 15
+enabled_scm:
+ serialized: true
+ default:
+ - Subversion
+ - Darcs
+ - Mercurial
+ - Cvs
+ - Bazaar
+ - Git
autofetch_changesets:
default: 1
sys_api_enabled:
diff --git a/lang/bg.yml b/lang/bg.yml
index 6ab6f26c..5f354868 100644
--- a/lang/bg.yml
+++ b/lang/bg.yml
@@ -623,3 +623,4 @@ mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d
mail_subject_reminder: "%d issue(s) due in the next days"
text_user_wrote: '%s wrote:'
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/lang/cs.yml b/lang/cs.yml
index 7413b79d..26e0f513 100644
--- a/lang/cs.yml
+++ b/lang/cs.yml
@@ -628,3 +628,4 @@ mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d
mail_subject_reminder: "%d issue(s) due in the next days"
text_user_wrote: '%s wrote:'
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/lang/da.yml b/lang/da.yml
index 2107498a..b2f18db4 100644
--- a/lang/da.yml
+++ b/lang/da.yml
@@ -625,3 +625,4 @@ mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d
mail_subject_reminder: "%d issue(s) due in the next days"
text_user_wrote: '%s wrote:'
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/lang/de.yml b/lang/de.yml
index 27d22fc5..1e4040f3 100644
--- a/lang/de.yml
+++ b/lang/de.yml
@@ -624,3 +624,4 @@ mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d
mail_subject_reminder: "%d issue(s) due in the next days"
text_user_wrote: '%s wrote:'
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/lang/en.yml b/lang/en.yml
index 262570f1..b7f217e6 100644
--- a/lang/en.yml
+++ b/lang/en.yml
@@ -213,6 +213,7 @@ setting_per_page_options: Objects per page options
setting_user_format: Users display format
setting_activity_days_default: Days displayed on project activity
setting_display_subprojects_issues: Display subprojects issues on main projects by default
+setting_enabled_scm: Enabled SCM
project_module_issue_tracking: Issue tracking
project_module_time_tracking: Time tracking
diff --git a/lang/es.yml b/lang/es.yml
index 62528e68..c0ecb997 100644
--- a/lang/es.yml
+++ b/lang/es.yml
@@ -626,3 +626,4 @@ mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d
mail_subject_reminder: "%d issue(s) due in the next days"
text_user_wrote: '%s wrote:'
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/lang/fi.yml b/lang/fi.yml
index b32bbb25..6ac4aea7 100644
--- a/lang/fi.yml
+++ b/lang/fi.yml
@@ -623,3 +623,4 @@ mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d
mail_subject_reminder: "%d issue(s) due in the next days"
text_user_wrote: '%s wrote:'
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/lang/fr.yml b/lang/fr.yml
index 8b040463..4db2f8f3 100644
--- a/lang/fr.yml
+++ b/lang/fr.yml
@@ -214,6 +214,7 @@ setting_per_page_options: Options d'objets affichés par page
setting_user_format: Format d'affichage des utilisateurs
setting_activity_days_default: Nombre de jours affichés sur l'activité des projets
setting_display_subprojects_issues: Afficher par défaut les demandes des sous-projets sur les projets principaux
+setting_enabled_scm: SCM activés
project_module_issue_tracking: Suivi des demandes
project_module_time_tracking: Suivi du temps passé
diff --git a/lang/he.yml b/lang/he.yml
index da31812c..e23698d3 100644
--- a/lang/he.yml
+++ b/lang/he.yml
@@ -623,3 +623,4 @@ mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d
mail_subject_reminder: "%d issue(s) due in the next days"
text_user_wrote: '%s wrote:'
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/lang/hu.yml b/lang/hu.yml
index 2a399bc1..64518271 100644
--- a/lang/hu.yml
+++ b/lang/hu.yml
@@ -624,3 +624,4 @@ mail_body_reminder: "%d neked kiosztott feladat határidős az elkövetkező %d
mail_subject_reminder: "%d feladat határidős az elkövetkező napokban"
text_user_wrote: '%s írta:'
label_duplicated_by: duplikálta
+setting_enabled_scm: Enabled SCM
diff --git a/lang/it.yml b/lang/it.yml
index e5557f91..5ab9ad31 100644
--- a/lang/it.yml
+++ b/lang/it.yml
@@ -623,3 +623,4 @@ mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d
mail_subject_reminder: "%d issue(s) due in the next days"
text_user_wrote: '%s wrote:'
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/lang/ja.yml b/lang/ja.yml
index 1ae9ab1b..c693d68e 100644
--- a/lang/ja.yml
+++ b/lang/ja.yml
@@ -624,3 +624,4 @@ mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d
mail_subject_reminder: "%d issue(s) due in the next days"
text_user_wrote: '%s wrote:'
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/lang/ko.yml b/lang/ko.yml
index c00a9e9a..af1c768a 100644
--- a/lang/ko.yml
+++ b/lang/ko.yml
@@ -623,3 +623,4 @@ mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d
mail_subject_reminder: "%d issue(s) due in the next days"
text_user_wrote: '%s wrote:'
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/lang/lt.yml b/lang/lt.yml
index 140631fc..ff8f6b69 100644
--- a/lang/lt.yml
+++ b/lang/lt.yml
@@ -625,3 +625,4 @@ mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d
mail_subject_reminder: "%d issue(s) due in the next days"
text_user_wrote: '%s wrote:'
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/lang/nl.yml b/lang/nl.yml
index 62bbc146..9ee91384 100644
--- a/lang/nl.yml
+++ b/lang/nl.yml
@@ -624,3 +624,4 @@ mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d
mail_subject_reminder: "%d issue(s) due in the next days"
text_user_wrote: '%s wrote:'
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/lang/no.yml b/lang/no.yml
index a31751da..e3b88b11 100644
--- a/lang/no.yml
+++ b/lang/no.yml
@@ -624,3 +624,4 @@ default_activity_development: Utvikling
enumeration_issue_priorities: Sakssprioriteringer
enumeration_doc_categories: Dokument-kategorier
enumeration_activities: Aktiviteter (tidssporing)
+setting_enabled_scm: Enabled SCM
diff --git a/lang/pl.yml b/lang/pl.yml
index adf67621..75e04ecd 100644
--- a/lang/pl.yml
+++ b/lang/pl.yml
@@ -623,3 +623,4 @@ mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d
mail_subject_reminder: "%d issue(s) due in the next days"
text_user_wrote: '%s wrote:'
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/lang/pt-br.yml b/lang/pt-br.yml
index ca9b9073..dabab5bf 100644
--- a/lang/pt-br.yml
+++ b/lang/pt-br.yml
@@ -623,3 +623,4 @@ mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d
mail_subject_reminder: "%d issue(s) due in the next days"
text_user_wrote: '%s wrote:'
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/lang/pt.yml b/lang/pt.yml
index f9472b7e..2845f390 100644
--- a/lang/pt.yml
+++ b/lang/pt.yml
@@ -623,3 +623,4 @@ mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d
mail_subject_reminder: "%d issue(s) due in the next days"
text_user_wrote: '%s wrote:'
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/lang/ro.yml b/lang/ro.yml
index 840fa707..dd51e59b 100644
--- a/lang/ro.yml
+++ b/lang/ro.yml
@@ -623,3 +623,4 @@ mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d
mail_subject_reminder: "%d issue(s) due in the next days"
text_user_wrote: '%s wrote:'
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/lang/ru.yml b/lang/ru.yml
index 37f2aef3..c3ec9189 100644
--- a/lang/ru.yml
+++ b/lang/ru.yml
@@ -627,3 +627,4 @@ mail_body_reminder: "%d назначенных на вас задач на сл
mail_subject_reminder: "%d назначенных на вас задач в ближайшие дни"
text_user_wrote: '%s написал:'
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/lang/sr.yml b/lang/sr.yml
index d507a1d9..92906760 100644
--- a/lang/sr.yml
+++ b/lang/sr.yml
@@ -624,3 +624,4 @@ mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d
mail_subject_reminder: "%d issue(s) due in the next days"
text_user_wrote: '%s wrote:'
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/lang/sv.yml b/lang/sv.yml
index fbd7c5c4..f08e45eb 100644
--- a/lang/sv.yml
+++ b/lang/sv.yml
@@ -624,3 +624,4 @@ mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d
mail_subject_reminder: "%d issue(s) due in the next days"
text_user_wrote: '%s wrote:'
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/lang/th.yml b/lang/th.yml
index 9dfaf286..85a1f8c0 100644
--- a/lang/th.yml
+++ b/lang/th.yml
@@ -626,3 +626,4 @@ mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d
mail_subject_reminder: "%d issue(s) due in the next days"
text_user_wrote: '%s wrote:'
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/lang/uk.yml b/lang/uk.yml
index beabfd1f..ae8c5cbc 100644
--- a/lang/uk.yml
+++ b/lang/uk.yml
@@ -625,3 +625,4 @@ mail_body_reminder: "%d issue(s) that are assigned to you are due in the next %d
mail_subject_reminder: "%d issue(s) due in the next days"
text_user_wrote: '%s wrote:'
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/lang/zh-tw.yml b/lang/zh-tw.yml
index c3cd096a..2ee595dc 100644
--- a/lang/zh-tw.yml
+++ b/lang/zh-tw.yml
@@ -624,3 +624,4 @@ default_activity_development: 開發
enumeration_issue_priorities: 項目優先權
enumeration_doc_categories: 文件分類
enumeration_activities: 活動 (時間追蹤)
+setting_enabled_scm: Enabled SCM
diff --git a/lang/zh.yml b/lang/zh.yml
index 9e22e687..d8236341 100644
--- a/lang/zh.yml
+++ b/lang/zh.yml
@@ -624,3 +624,4 @@ enumeration_issue_priorities: 问题优先级
enumeration_doc_categories: 文档类别
enumeration_activities: 活动(时间跟踪)
label_duplicated_by: duplicated by
+setting_enabled_scm: Enabled SCM
diff --git a/test/unit/repository_test.rb b/test/unit/repository_test.rb
index 7764ee04..270b0bea 100644
--- a/test/unit/repository_test.rb
+++ b/test/unit/repository_test.rb
@@ -45,6 +45,14 @@ class RepositoryTest < Test::Unit::TestCase
assert_equal repository, project.repository
end
+ def test_should_not_create_with_disabled_scm
+ # disable Subversion
+ Setting.enabled_scm = ['Darcs', 'Git']
+ repository = Repository::Subversion.new(:project => Project.find(3), :url => "svn://localhost")
+ assert !repository.save
+ assert_equal :activerecord_error_invalid, repository.errors.on(:type)
+ end
+
def test_scan_changesets_for_issue_ids
# choosing a status to apply to fix issues
Setting.commit_fix_status_id = IssueStatus.find(:first, :conditions => ["is_closed = ?", true]).id