Show More
@@ -125,9 +125,6 b' def load_environment(global_conf, app_co' | |||
|
125 | 125 | repos_path = list(db_cfg.items('paths'))[0][1] |
|
126 | 126 | config['base_path'] = repos_path |
|
127 | 127 | |
|
128 | config['vcs.hooks.direct_calls'] = _use_direct_hook_calls(config) | |
|
129 | config['vcs.hooks.protocol'] = _get_vcs_hooks_protocol(config) | |
|
130 | ||
|
131 | 128 | # store db config also in main global CONFIG |
|
132 | 129 | set_rhodecode_config(config) |
|
133 | 130 | |
@@ -144,18 +141,6 b' def load_environment(global_conf, app_co' | |||
|
144 | 141 | return config |
|
145 | 142 | |
|
146 | 143 | |
|
147 | def _use_direct_hook_calls(config): | |
|
148 | default_direct_hook_calls = 'false' | |
|
149 | direct_hook_calls = str2bool( | |
|
150 | config.get('vcs.hooks.direct_calls', default_direct_hook_calls)) | |
|
151 | return direct_hook_calls | |
|
152 | ||
|
153 | ||
|
154 | def _get_vcs_hooks_protocol(config): | |
|
155 | protocol = config.get('vcs.hooks.protocol', 'pyro4').lower() | |
|
156 | return protocol | |
|
157 | ||
|
158 | ||
|
159 | 144 | def load_pyramid_environment(global_config, settings): |
|
160 | 145 | # Some parts of the code expect a merge of global and app settings. |
|
161 | 146 | settings_merged = global_config.copy() |
@@ -49,20 +49,18 b' def configure_vcs(config):' | |||
|
49 | 49 | Patch VCS config with some RhodeCode specific stuff |
|
50 | 50 | """ |
|
51 | 51 | from rhodecode.lib.vcs import conf |
|
52 | from rhodecode.lib.utils2 import aslist | |
|
53 | 52 | conf.settings.BACKENDS = { |
|
54 | 53 | 'hg': 'rhodecode.lib.vcs.backends.hg.MercurialRepository', |
|
55 | 54 | 'git': 'rhodecode.lib.vcs.backends.git.GitRepository', |
|
56 | 55 | 'svn': 'rhodecode.lib.vcs.backends.svn.SubversionRepository', |
|
57 | 56 | } |
|
58 | 57 | |
|
59 | conf.settings.GIT_REV_FILTER = shlex.split( | |
|
60 | config.get('git_rev_filter', '--all').strip()) | |
|
61 | conf.settings.DEFAULT_ENCODINGS = aslist(config.get('default_encoding', | |
|
62 | 'UTF-8'), sep=',') | |
|
63 |
conf.settings.ALIASES[:] = config |
|
|
64 |
conf.settings.SVN_COMPATIBLE_VERSION = config |
|
|
65 | 'vcs.svn.compatible_version') | |
|
58 | conf.settings.HOOKS_PROTOCOL = config['vcs.hooks.protocol'] | |
|
59 | conf.settings.HOOKS_DIRECT_CALLS = config['vcs.hooks.direct_calls'] | |
|
60 | conf.settings.GIT_REV_FILTER = shlex.split(config['git_rev_filter']) | |
|
61 | conf.settings.DEFAULT_ENCODINGS = config['default_encoding'] | |
|
62 | conf.settings.ALIASES[:] = config['vcs.backends'] | |
|
63 | conf.settings.SVN_COMPATIBLE_VERSION = config['vcs.svn.compatible_version'] | |
|
66 | 64 | |
|
67 | 65 | |
|
68 | 66 | def initialize_database(config): |
@@ -88,8 +86,7 b' def initialize_test_environment(settings' | |||
|
88 | 86 | |
|
89 | 87 | |
|
90 | 88 | def get_vcs_server_protocol(config): |
|
91 |
|
|
|
92 | return protocol | |
|
89 | return config['vcs.server.protocol'] | |
|
93 | 90 | |
|
94 | 91 | |
|
95 | 92 | def set_instance_id(config): |
General Comments 0
You need to be logged in to leave comments.
Login now