Show More
@@ -296,6 +296,18 b' allow_repo_location_change = True' | |||||
296 | ## allows to setup custom hooks in settings page |
|
296 | ## allows to setup custom hooks in settings page | |
297 | allow_custom_hooks_settings = True |
|
297 | allow_custom_hooks_settings = True | |
298 |
|
298 | |||
|
299 | ## extra extensions for indexing, space separated and without the leading '.'. | |||
|
300 | # index.extensions = | |||
|
301 | # gemfile | |||
|
302 | # lock | |||
|
303 | ||||
|
304 | ## extra filenames for indexing, space separated | |||
|
305 | # index.filenames = | |||
|
306 | # .dockerignore | |||
|
307 | # .editorconfig | |||
|
308 | # INSTALL | |||
|
309 | # CHANGELOG | |||
|
310 | ||||
299 | #################################### |
|
311 | #################################### | |
300 | ### CELERY CONFIG #### |
|
312 | ### CELERY CONFIG #### | |
301 | #################################### |
|
313 | #################################### |
@@ -293,6 +293,18 b' allow_repo_location_change = True' | |||||
293 | <%text>## allows to setup custom hooks in settings page</%text> |
|
293 | <%text>## allows to setup custom hooks in settings page</%text> | |
294 | allow_custom_hooks_settings = True |
|
294 | allow_custom_hooks_settings = True | |
295 |
|
295 | |||
|
296 | <%text>## extra extensions for indexing, space separated and without the leading '.'.</%text> | |||
|
297 | # index.extensions = | |||
|
298 | # gemfile | |||
|
299 | # lock | |||
|
300 | ||||
|
301 | <%text>## extra filenames for indexing, space separated</%text> | |||
|
302 | # index.filenames = | |||
|
303 | # .dockerignore | |||
|
304 | # .editorconfig | |||
|
305 | # INSTALL | |||
|
306 | # CHANGELOG | |||
|
307 | ||||
296 | <%text>####################################</%text> |
|
308 | <%text>####################################</%text> | |
297 | <%text>### CELERY CONFIG ####</%text> |
|
309 | <%text>### CELERY CONFIG ####</%text> | |
298 | <%text>####################################</%text> |
|
310 | <%text>####################################</%text> |
@@ -289,6 +289,18 b' allow_repo_location_change = True' | |||||
289 | ## allows to setup custom hooks in settings page |
|
289 | ## allows to setup custom hooks in settings page | |
290 | allow_custom_hooks_settings = True |
|
290 | allow_custom_hooks_settings = True | |
291 |
|
291 | |||
|
292 | ## extra extensions for indexing, space separated and without the leading '.'. | |||
|
293 | # index.extensions = | |||
|
294 | # gemfile | |||
|
295 | # lock | |||
|
296 | ||||
|
297 | ## extra filenames for indexing, space separated | |||
|
298 | # index.filenames = | |||
|
299 | # .dockerignore | |||
|
300 | # .editorconfig | |||
|
301 | # INSTALL | |||
|
302 | # CHANGELOG | |||
|
303 | ||||
292 | #################################### |
|
304 | #################################### | |
293 | ### CELERY CONFIG #### |
|
305 | ### CELERY CONFIG #### | |
294 | #################################### |
|
306 | #################################### |
@@ -34,7 +34,7 b' from kallithea.config.routing import mak' | |||||
34 | from kallithea.lib import helpers |
|
34 | from kallithea.lib import helpers | |
35 | from kallithea.lib.auth import set_available_permissions |
|
35 | from kallithea.lib.auth import set_available_permissions | |
36 | from kallithea.lib.utils import repo2db_mapper, make_ui, set_app_settings,\ |
|
36 | from kallithea.lib.utils import repo2db_mapper, make_ui, set_app_settings,\ | |
37 | load_rcextensions, check_git_version, set_vcs_config |
|
37 | load_rcextensions, check_git_version, set_vcs_config, set_indexer_config | |
38 | from kallithea.lib.utils2 import engine_from_config, str2bool |
|
38 | from kallithea.lib.utils2 import engine_from_config, str2bool | |
39 | from kallithea.lib.db_manage import DbManage |
|
39 | from kallithea.lib.db_manage import DbManage | |
40 | from kallithea.model import init_model |
|
40 | from kallithea.model import init_model | |
@@ -130,6 +130,7 b' def load_environment(global_conf, app_co' | |||||
130 | # pylons |
|
130 | # pylons | |
131 | kallithea.CONFIG.update(config) |
|
131 | kallithea.CONFIG.update(config) | |
132 | set_vcs_config(kallithea.CONFIG) |
|
132 | set_vcs_config(kallithea.CONFIG) | |
|
133 | set_indexer_config(kallithea.CONFIG) | |||
133 |
|
134 | |||
134 | #check git version |
|
135 | #check git version | |
135 | check_git_version() |
|
136 | check_git_version() |
@@ -418,6 +418,21 b' def set_vcs_config(config):' | |||||
418 | 'utf8'), sep=',') |
|
418 | 'utf8'), sep=',') | |
419 |
|
419 | |||
420 |
|
420 | |||
|
421 | def set_indexer_config(config): | |||
|
422 | """ | |||
|
423 | Update Whoosh index mapping | |||
|
424 | ||||
|
425 | :param config: kallithea.CONFIG | |||
|
426 | """ | |||
|
427 | from kallithea.config import conf | |||
|
428 | ||||
|
429 | log.debug('adding extra into INDEX_EXTENSIONS') | |||
|
430 | conf.INDEX_EXTENSIONS.extend(re.split('\s+', config.get('index.extensions', ''))) | |||
|
431 | ||||
|
432 | log.debug('adding extra into INDEX_FILENAMES') | |||
|
433 | conf.INDEX_FILENAMES.extend(re.split('\s+', config.get('index.filenames', ''))) | |||
|
434 | ||||
|
435 | ||||
421 | def map_groups(path): |
|
436 | def map_groups(path): | |
422 | """ |
|
437 | """ | |
423 | Given a full path to a repository, create all nested groups that this |
|
438 | Given a full path to a repository, create all nested groups that this |
@@ -297,6 +297,18 b' allow_repo_location_change = True' | |||||
297 | ## allows to setup custom hooks in settings page |
|
297 | ## allows to setup custom hooks in settings page | |
298 | allow_custom_hooks_settings = True |
|
298 | allow_custom_hooks_settings = True | |
299 |
|
299 | |||
|
300 | ## extra extensions for indexing, space separated and without the leading '.'. | |||
|
301 | # index.extensions = | |||
|
302 | # gemfile | |||
|
303 | # lock | |||
|
304 | ||||
|
305 | ## extra filenames for indexing, space separated | |||
|
306 | # index.filenames = | |||
|
307 | # .dockerignore | |||
|
308 | # .editorconfig | |||
|
309 | # INSTALL | |||
|
310 | # CHANGELOG | |||
|
311 | ||||
300 | #################################### |
|
312 | #################################### | |
301 | ### CELERY CONFIG #### |
|
313 | ### CELERY CONFIG #### | |
302 | #################################### |
|
314 | #################################### |
General Comments 0
You need to be logged in to leave comments.
Login now