Mercurial > kallithea
changeset 3832:07f8039ef090 beta
Use repo-scann at latest possible state.
- we can ensure every config/checks were made before that step
- it should fix issues with custom GIT paths
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 09 May 2013 14:52:05 +0200 |
parents | bd39c1f70e35 |
children | 5055dd385118 |
files | rhodecode/config/environment.py |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/config/environment.py Thu May 09 14:44:26 2013 +0200 +++ b/rhodecode/config/environment.py Thu May 09 14:52:05 2013 +0200 @@ -87,19 +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] - if str2bool(config.get('initial_repo_scan', True)): - 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) @@ -114,6 +109,12 @@ # store config reference into our module to skip import magic of # pylons rhodecode.CONFIG.update(config) + set_vcs_config(rhodecode.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