Mercurial > kallithea
diff rhodecode/config/environment.py @ 3960:5293d4bbb1ea
Merged dev into stable/default/master branch
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 07 Jun 2013 00:31:11 +0200 |
parents | 3563bb7b4b82 07f8039ef090 |
children | ffd45b185016 |
line wrap: on
line diff
--- a/rhodecode/config/environment.py Mon May 20 12:26:09 2013 +0200 +++ b/rhodecode/config/environment.py Fri Jun 07 00:31:11 2013 +0200 @@ -18,7 +18,7 @@ from rhodecode.lib import helpers from rhodecode.lib.auth import set_available_permissions from rhodecode.lib.utils import repo2db_mapper, make_ui, set_rhodecode_config,\ - load_rcextensions, check_git_version + load_rcextensions, check_git_version, set_vcs_config from rhodecode.lib.utils2 import engine_from_config, str2bool from rhodecode.lib.db_manage import DbManage from rhodecode.model import init_model @@ -87,18 +87,14 @@ if not int(os.environ.get('RC_WHOOSH_TEST_DISABLE', 0)): create_test_index(TESTS_TMP_PATH, config, True) - #check git version - check_git_version() DbManage.check_waitress() # MULTIPLE DB configs # Setup the SQLAlchemy database engine sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.') init_model(sa_engine_db1) + set_available_permissions(config) repos_path = make_ui('db').configitems('paths')[0][1] - repo2db_mapper(ScmModel().repo_scan(repos_path), - remove_obsolete=False, install_git_hook=False) - set_available_permissions(config) config['base_path'] = repos_path set_rhodecode_config(config) @@ -113,4 +109,12 @@ # store config reference into our module to skip import magic of # pylons rhodecode.CONFIG.update(config) + set_vcs_config(rhodecode.CONFIG) + + #check git version + check_git_version() + + if str2bool(config.get('initial_repo_scan', True)): + repo2db_mapper(ScmModel().repo_scan(repos_path), + remove_obsolete=False, install_git_hook=False) return config