diff --git a/rhodecode/controllers/admin/settings.py b/rhodecode/controllers/admin/settings.py --- a/rhodecode/controllers/admin/settings.py +++ b/rhodecode/controllers/admin/settings.py @@ -789,18 +789,5 @@ LabSetting = collections.namedtuple( # This list has to be kept in sync with the form # rhodecode.model.forms.LabsSettingsForm. _LAB_SETTINGS = [ - LabSetting( - key='rhodecode_proxy_subversion_http_requests', - type='bool', - group=lazy_ugettext('Subversion HTTP Support'), - label=lazy_ugettext('Proxy subversion HTTP requests'), - help='' # Do not translate the empty string! - ), - LabSetting( - key='rhodecode_subversion_http_server_url', - type='str', - group=lazy_ugettext('Subversion HTTP Server URL'), - label='', # Do not translate the empty string! - help=lazy_ugettext('e.g. http://localhost:8080/') - ), + ] diff --git a/rhodecode/model/forms.py b/rhodecode/model/forms.py --- a/rhodecode/model/forms.py +++ b/rhodecode/model/forms.py @@ -389,6 +389,9 @@ class _BaseVcsSettingsForm(formencode.Sc rhodecode_use_outdated_comments = v.StringBoolean(if_missing=False) rhodecode_hg_use_rebase_for_merging = v.StringBoolean(if_missing=False) + rhodecode_proxy_subversion_http_requests = v.StringBoolean(if_missing=False) + rhodecode_subversion_http_server_url = v.UnicodeString( + strip=True, if_missing=None) def ApplicationUiSettingsForm(): class _ApplicationUiSettingsForm(_BaseVcsSettingsForm): @@ -421,11 +424,6 @@ def LabsSettingsForm(): allow_extra_fields = True filter_extra_fields = False - rhodecode_proxy_subversion_http_requests = v.StringBoolean( - if_missing=False) - rhodecode_subversion_http_server_url = v.UnicodeString( - strip=True, if_missing=None) - return _LabSettingsForm diff --git a/rhodecode/model/settings.py b/rhodecode/model/settings.py --- a/rhodecode/model/settings.py +++ b/rhodecode/model/settings.py @@ -411,6 +411,9 @@ class VcsSettingsModel(object): HG_SETTINGS = ( ('extensions', 'largefiles'), ('phases', 'publish')) GLOBAL_HG_SETTINGS = HG_SETTINGS + (('extensions', 'hgsubversion'), ) + GLOBAL_SVN_SETTINGS = ( + 'rhodecode_proxy_subversion_http_requests', + 'rhodecode_subversion_http_server_url') SVN_BRANCH_SECTION = 'vcs_svn_branch' SVN_TAG_SECTION = 'vcs_svn_tag' SSL_SETTING = ('web', 'push_ssl') @@ -546,6 +549,21 @@ class VcsSettingsModel(object): self._create_or_update_ui( self.global_settings, *subversion, active=data[subversion_key]) + def create_or_update_global_svn_settings(self, data): + rhodecode_proxy_subversion_http_requests, + rhodecode_subversion_http_server_url = self.GLOBAL_SVN_SETTINGS + rhodecode_proxy_subversion_http_requests_key, + rhodecode_subversion_http_server_url_key = self._get_svn_settings( + self.GLOBAL_SVN_SETTINGS, data) + self._create_or_update_ui( + self.global_settings, + *rhodecode_proxy_subversion_http_requests, + value=safe_str(data[rhodecode_proxy_subversion_http_requests_key])) + self._create_or_update_ui( + self.global_settings, + *rhodecode_subversion_http_server_url, + active=data[rhodecode_subversion_http_server_url_key]) + def update_global_ssl_setting(self, value): self._create_or_update_ui( self.global_settings, *self.SSL_SETTING, value=value) diff --git a/rhodecode/templates/base/vcs_settings.html b/rhodecode/templates/base/vcs_settings.html --- a/rhodecode/templates/base/vcs_settings.html +++ b/rhodecode/templates/base/vcs_settings.html @@ -126,6 +126,28 @@
+
+
+
+ ${h.checkbox('rhodecode_proxy_subversion_http_requests' + suffix, 'True', **kwargs)} + +
+
+
+
+
+
+
+ ${h.text('rhodecode_subversion_http_server_url',size=59)} +
+
+
+
+ ${_('e.g. http://localhost:8080/')} +
+
+
+