##// END OF EJS Templates
svn: expose file path for generated config.
marcink -
r4337:8e74dd85 default
parent child Browse files
Show More
@@ -41,9 +41,9 b' class SvnConfigAdminSettingsView(BaseApp'
41 def vcs_svn_generate_config(self):
41 def vcs_svn_generate_config(self):
42 _ = self.request.translate
42 _ = self.request.translate
43 try:
43 try:
44 generate_mod_dav_svn_config(self.request.registry)
44 file_path = generate_mod_dav_svn_config(self.request.registry)
45 msg = {
45 msg = {
46 'message': _('Apache configuration for Subversion generated.'),
46 'message': _('Apache configuration for Subversion generated at `{}`.').format(file_path),
47 'level': 'success',
47 'level': 'success',
48 }
48 }
49 except Exception:
49 except Exception:
@@ -37,7 +37,7 b' log = logging.getLogger(__name__)'
37
37
38 def write_mod_dav_svn_config(settings):
38 def write_mod_dav_svn_config(settings):
39 use_ssl = str2bool(settings['force_https'])
39 use_ssl = str2bool(settings['force_https'])
40
40 file_path = settings[config_keys.config_file_path]
41 config = _render_mod_dav_svn_config(
41 config = _render_mod_dav_svn_config(
42 use_ssl=use_ssl,
42 use_ssl=use_ssl,
43 parent_path_root=get_rhodecode_base_path(),
43 parent_path_root=get_rhodecode_base_path(),
@@ -45,7 +45,8 b' def write_mod_dav_svn_config(settings):'
45 location_root=settings[config_keys.location_root],
45 location_root=settings[config_keys.location_root],
46 repo_groups=RepoGroup.get_all_repo_groups(),
46 repo_groups=RepoGroup.get_all_repo_groups(),
47 realm=get_rhodecode_realm(), template=settings[config_keys.template])
47 realm=get_rhodecode_realm(), template=settings[config_keys.template])
48 _write_mod_dav_svn_config(config, settings[config_keys.config_file_path])
48 _write_mod_dav_svn_config(config, file_path)
49 return file_path
49
50
50
51
51 def generate_mod_dav_svn_config(registry):
52 def generate_mod_dav_svn_config(registry):
@@ -56,11 +57,11 b' def generate_mod_dav_svn_config(registry'
56 repositories organized in sub folders.
57 repositories organized in sub folders.
57 """
58 """
58 settings = registry.settings
59 settings = registry.settings
59 write_mod_dav_svn_config(settings)
60 file_path = write_mod_dav_svn_config(settings)
60
61
61 # Trigger an event on mod dav svn configuration change.
62 # Trigger an event on mod dav svn configuration change.
62 trigger(ModDavSvnConfigChange(), registry)
63 trigger(ModDavSvnConfigChange(), registry)
63
64 return file_path
64
65
65 def _render_mod_dav_svn_config(
66 def _render_mod_dav_svn_config(
66 parent_path_root, list_parent_path, location_root, repo_groups, realm,
67 parent_path_root, list_parent_path, location_root, repo_groups, realm,
General Comments 0
You need to be logged in to leave comments. Login now