diff --git a/rhodecode/apps/admin/views/settings.py b/rhodecode/apps/admin/views/settings.py --- a/rhodecode/apps/admin/views/settings.py +++ b/rhodecode/apps/admin/views/settings.py @@ -32,7 +32,7 @@ from pyramid.response import Response from rhodecode.apps._base import BaseAppView from rhodecode.apps._base.navigation import navigation_list -from rhodecode.apps.svn_support.config_keys import generate_config +from rhodecode.apps.svn_support import config_keys from rhodecode.lib import helpers as h from rhodecode.lib.auth import ( LoginRequired, HasPermissionAllDecorator, CSRFRequired) @@ -113,10 +113,8 @@ class AdminSettingsView(BaseAppView): model = VcsSettingsModel() c.svn_branch_patterns = model.get_global_svn_branch_patterns() c.svn_tag_patterns = model.get_global_svn_tag_patterns() - - settings = self.request.registry.settings - c.svn_generate_config = settings[generate_config] - c.svn_config_path = rhodecode.ConfigGet().get_str('svn.proxy.config_file_path') + c.svn_generate_config = rhodecode.ConfigGet().get_bool(config_keys.generate_config) + c.svn_config_path = rhodecode.ConfigGet().get_str(config_keys.config_file_path) defaults = self._form_defaults() model.create_largeobjects_dirs_if_needed(defaults['paths_root_path']) @@ -143,9 +141,8 @@ class AdminSettingsView(BaseAppView): c.svn_branch_patterns = model.get_global_svn_branch_patterns() c.svn_tag_patterns = model.get_global_svn_tag_patterns() - settings = self.request.registry.settings - c.svn_generate_config = settings[generate_config] - c.svn_config_path = rhodecode.ConfigGet().get_str('svn.proxy.config_file_path') + c.svn_generate_config = rhodecode.ConfigGet().get_bool(config_keys.generate_config) + c.svn_config_path = rhodecode.ConfigGet().get_str(config_keys.config_file_path) application_form = ApplicationUiSettingsForm(self.request.translate)() try: diff --git a/rhodecode/apps/repository/views/repo_settings_vcs.py b/rhodecode/apps/repository/views/repo_settings_vcs.py --- a/rhodecode/apps/repository/views/repo_settings_vcs.py +++ b/rhodecode/apps/repository/views/repo_settings_vcs.py @@ -24,7 +24,9 @@ from pyramid.httpexceptions import HTTPF from pyramid.response import Response from pyramid.renderers import render +import rhodecode from rhodecode.apps._base import RepoAppView +from rhodecode.apps.svn_support import config_keys from rhodecode.lib import helpers as h from rhodecode.lib.auth import ( LoginRequired, HasRepoPermissionAnyDecorator, CSRFRequired) @@ -38,8 +40,6 @@ log = logging.getLogger(__name__) class RepoSettingsVcsView(RepoAppView): def load_default_context(self): c = self._get_local_tmpl_context() - - return c def _vcs_form_defaults(self, repo_name): @@ -77,6 +77,9 @@ class RepoSettingsVcsView(RepoAppView): c.svn_branch_patterns = model.get_repo_svn_branch_patterns() c.svn_tag_patterns = model.get_repo_svn_tag_patterns() + c.svn_generate_config = rhodecode.ConfigGet().get_bool(config_keys.generate_config) + c.svn_config_path = rhodecode.ConfigGet().get_str(config_keys.config_file_path) + defaults = self._vcs_form_defaults(self.db_repo_name) c.inherit_global_settings = defaults['inherit_global_settings'] @@ -103,6 +106,8 @@ class RepoSettingsVcsView(RepoAppView): c.global_svn_tag_patterns = model.get_global_svn_tag_patterns() c.svn_branch_patterns = model.get_repo_svn_branch_patterns() c.svn_tag_patterns = model.get_repo_svn_tag_patterns() + c.svn_generate_config = rhodecode.ConfigGet().get_bool(config_keys.generate_config) + c.svn_config_path = rhodecode.ConfigGet().get_str(config_keys.config_file_path) defaults = self._vcs_form_defaults(self.db_repo_name) c.inherit_global_settings = defaults['inherit_global_settings'] diff --git a/rhodecode/templates/admin/settings/settings_vcs.mako b/rhodecode/templates/admin/settings/settings_vcs.mako --- a/rhodecode/templates/admin/settings/settings_vcs.mako +++ b/rhodecode/templates/admin/settings/settings_vcs.mako @@ -49,16 +49,5 @@ unlockpath(); } - /* On click handler for the `Generate Apache Config` button. It sends a - POST request to trigger the (re)generation of the mod_dav_svn config. */ - $('#vcs_svn_generate_cfg').on('click', function(event) { - event.preventDefault(); - var url = "${h.route_path('admin_settings_vcs_svn_generate_cfg')}"; - var jqxhr = $.post(url, {'csrf_token': CSRF_TOKEN}); - jqxhr.done(function(data) { - $.Topic('/notifications').publish(data); - }); - }); - }); diff --git a/rhodecode/templates/base/vcs_settings.mako b/rhodecode/templates/base/vcs_settings.mako --- a/rhodecode/templates/base/vcs_settings.mako +++ b/rhodecode/templates/base/vcs_settings.mako @@ -148,6 +148,7 @@