# HG changeset patch # User Marcin Kuzminski # Date 1368103925 -7200 # Node ID 07f8039ef090e7f62b9bcff17303199423797724 # Parent bd39c1f70e357fe738fe67f89bdf15edb82812dc 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 diff -r bd39c1f70e35 -r 07f8039ef090 rhodecode/config/environment.py --- 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