svn: moving svn http support out of labs settings.
This commit is contained in:
parent
d01caa9cea
commit
ca1ec404c2
4 changed files with 44 additions and 19 deletions
|
|
@ -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/')
|
||||
),
|
||||
|
||||
]
|
||||
|
|
|
|||
|
|
@ -389,6 +389,9 @@ class _BaseVcsSettingsForm(formencode.Schema):
|
|||
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
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -124,6 +124,28 @@
|
|||
<h3 class="panel-title">${_('Subversion Settings')}</h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="field">
|
||||
<div class="content" >
|
||||
<label>${_('Subversion HTTP Support')}</label><br/>
|
||||
</div>
|
||||
<div class="checkbox">
|
||||
${h.checkbox('rhodecode_proxy_subversion_http_requests' + suffix, 'True', **kwargs)}
|
||||
<label for="rhodecode_proxy_subversion_http_requests${suffix}">${_('Proxy subversion HTTP requests')}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="label">
|
||||
<label for="rhodecode_subversion_http_server_url">${_('Subversion HTTP Server URL')}</label><br/>
|
||||
</div>
|
||||
<div class="input">
|
||||
${h.text('rhodecode_subversion_http_server_url',size=59)}
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="label">
|
||||
<span class="help-block">${_('e.g. http://localhost:8080/')}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="content" >
|
||||
<label>${_('Repository patterns')}</label><br/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue