## snippet for displaying vcs settings ## usage: ## <%namespace name="vcss" file="/base/vcssettings.mako"/> ## ${vcss.vcs_settings_fields()} <%def name="vcs_settings_fields(suffix='', svn_branch_patterns=None, svn_tag_patterns=None, repo_type=None, display_globals=False, allow_repo_location_change=False, **kwargs)"> % if display_globals:

${_('General')}

${h.checkbox('web_push_ssl' + suffix, 'True')}
${_('Activate to set RhodeCode to require SSL for pushing or pulling. If SSL certificate is missing it will return a HTTP Error 406: Not Acceptable.')}
% endif % if display_globals:

${_('Main Storage Location')}

%if allow_repo_location_change: ${h.text('paths_root_path',size=59,readonly="readonly", class_="disabled")}
%else: ${_('Repository location change is disabled. You can enable this by changing the `allow_repo_location_change` inside .ini file.')} ## form still requires this but we cannot internally change it anyway ${h.hidden('paths_root_path',size=30,readonly="readonly", class_="disabled")} %endif
${_('Filesystem location where repositories should be stored. After changing this value a restart and rescan of the repository folder are required.')}
% endif % if display_globals or repo_type in ['git', 'hg']:

${_('Internal Hooks')}

${h.checkbox('hooks_changegroup_repo_size' + suffix, 'True', **kwargs)}
${_('Trigger a hook that calculates repository size after each push.')}
${h.checkbox('hooks_changegroup_push_logger' + suffix, 'True', **kwargs)}
${_('Execute Built in pre/post push hooks. This also executes rcextensions hooks.')}
${h.checkbox('hooks_outgoing_pull_logger' + suffix, 'True', **kwargs)}
${_('Execute Built in pre/post pull hooks. This also executes rcextensions hooks.')}
% endif % if display_globals or repo_type in ['hg']:

${_('Mercurial Settings')}

${h.checkbox('extensions_largefiles' + suffix, 'True', **kwargs)}
% if display_globals: ${_('Enable Largefiles extensions for all repositories.')} % else: ${_('Enable Largefiles extensions for this repository.')} % endif
% if display_globals:
${h.text('largefiles_usercache' + suffix, size=59)}
${_('Filesystem location where Mercurial largefile objects should be stored.')}
% endif
${h.checkbox('phases_publish' + suffix, 'True', **kwargs)}
${_('When this is enabled all commits in the repository are seen as public commits by clients.')}
% if display_globals:
${h.checkbox('extensions_hgsubversion' + suffix,'True')}
${_('Requires hgsubversion library to be installed. Allows cloning remote SVN repositories and migrates them to Mercurial type.')}
% endif
${h.checkbox('extensions_evolve' + suffix, 'True', **kwargs)}
% if display_globals: ${_('Enable evolve extension for all repositories.')} % else: ${_('Enable evolve extension for this repository.')} % endif
% endif % if display_globals or repo_type in ['git']:

${_('Git Settings')}

${h.checkbox('vcs_git_lfs_enabled' + suffix, 'True', **kwargs)}
% if display_globals: ${_('Enable lfs extensions for all repositories.')} % else: ${_('Enable lfs extensions for this repository.')} % endif
% if display_globals:
${h.text('vcs_git_lfs_store_location' + suffix, size=59)}
${_('Filesystem location where Git lfs objects should be stored.')}
% endif
% endif % if display_globals:

${_('Global Subversion Settings')}

${h.checkbox('vcs_svn_proxy_http_requests_enabled' + suffix, 'True', **kwargs)}
${_('Subversion HTTP Support. Enables communication with SVN over HTTP protocol.')} ${_('SVN Protocol setup Documentation')}.

${h.text('vcs_svn_proxy_http_server_url',size=59)} % if c.svn_proxy_generate_config: % endif
% endif % if display_globals or repo_type in ['svn']:

${_('Subversion Settings')}


${_('Patterns for identifying SVN branches and tags. For recursive search, use "*". Eg.: "/branches/*"')}

% if svn_branch_patterns: % for branch in svn_branch_patterns:
${h.hidden('branch_ui_key' + suffix, branch.ui_key)} ${h.text('branch_value_%d' % branch.ui_id + suffix, branch.ui_value, size=59, readonly="readonly", class_='disabled')} % if kwargs.get('disabled') != 'disabled': ${_('Delete')} % endif
% endfor %endif
% if kwargs.get('disabled') != 'disabled':
${h.text('new_svn_branch',size=59,placeholder='New branch pattern')}
% endif

% if svn_tag_patterns: % for tag in svn_tag_patterns:
${h.hidden('tag_ui_key' + suffix, tag.ui_key)} ${h.text('tag_ui_value_new_%d' % tag.ui_id + suffix, tag.ui_value, size=59, readonly="readonly", class_='disabled tag_input')} % if kwargs.get('disabled') != 'disabled': ${_('Delete')} %endif
% endfor % endif
% if kwargs.get('disabled') != 'disabled':
${h.text('new_svn_tag' + suffix, size=59, placeholder='New tag pattern')}
%endif
% else: ${h.hidden('new_svn_branch' + suffix, '')} ${h.hidden('new_svn_tag' + suffix, '')} % endif % if display_globals or repo_type in ['hg', 'git']:

${_('Pull Request Settings')}

${h.checkbox('rhodecode_pr_merge_enabled' + suffix, 'True', **kwargs)}
${_('Note: when this feature is enabled, it only runs hooks defined in the rcextension package. Custom hooks added on the Admin -> Settings -> Hooks page will not be run when pull requests are automatically merged from the web interface.')}
${h.checkbox('rhodecode_use_outdated_comments' + suffix, 'True', **kwargs)}
${_('During the update of a pull request, the position of inline comments will be updated and outdated inline comments will be hidden.')}
% endif % if display_globals or repo_type in ['hg', 'git', 'svn']:

${_('Diff cache')}

${h.checkbox('rhodecode_diff_cache' + suffix, 'True', **kwargs)}
% endif % if display_globals or repo_type in ['hg',]:

${_('Mercurial Pull Request Settings')}

## Specific HG settings
${h.checkbox('rhodecode_hg_use_rebase_for_merging' + suffix, 'True', **kwargs)}
${_('Use rebase instead of creating a merge commit when merging via web interface.')}
${h.checkbox('rhodecode_hg_close_branch_before_merging' + suffix, 'True', **kwargs)}
${_('Close branch before merging it into destination branch. No effect when rebase strategy is use.')}
% endif ## DISABLED FOR GIT FOR NOW as the rebase/close is not supported yet ## % if display_globals or repo_type in ['git']: ##
##
##

${_('Git Pull Request Settings')}

##
##
##
## ${h.checkbox('rhodecode_git_use_rebase_for_merging' + suffix, 'True', **kwargs)} ## ##
##
## ${_('Use rebase instead of creating a merge commit when merging via web interface.')} ##
## ##
## ${h.checkbox('rhodecode_git_close_branch_before_merging' + suffix, 'True', **kwargs)} ## ##
##
## ${_('Delete branch after merging it into destination branch. No effect when rebase strategy is use.')} ##
##
##
## % endif