Mercurial > kallithea
comparison rhodecode/config/environment.py @ 691:7486da5f0628 beta
Refactor codes for scm model
Some test updates, added test for admin user controller
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 14 Nov 2010 22:54:16 +0100 |
parents | 8acbfa837180 |
children | fb7a3b291e64 |
comparison
equal
deleted
inserted
replaced
690:4685f3eafd35 | 691:7486da5f0628 |
---|---|
4 from pylons.error import handle_mako_error | 4 from pylons.error import handle_mako_error |
5 from rhodecode.config.routing import make_map | 5 from rhodecode.config.routing import make_map |
6 from rhodecode.lib.auth import set_available_permissions, set_base_path | 6 from rhodecode.lib.auth import set_available_permissions, set_base_path |
7 from rhodecode.lib.utils import repo2db_mapper, make_ui, set_rhodecode_config | 7 from rhodecode.lib.utils import repo2db_mapper, make_ui, set_rhodecode_config |
8 from rhodecode.model import init_model | 8 from rhodecode.model import init_model |
9 from rhodecode.model.hg import HgModel | 9 from rhodecode.model.scm import ScmModel |
10 from sqlalchemy import engine_from_config | 10 from sqlalchemy import engine_from_config |
11 import logging | 11 import logging |
12 import os | 12 import os |
13 import rhodecode.lib.app_globals as app_globals | 13 import rhodecode.lib.app_globals as app_globals |
14 import rhodecode.lib.helpers | 14 import rhodecode.lib.helpers |
69 init_model(sa_engine_db1) | 69 init_model(sa_engine_db1) |
70 #init baseui | 70 #init baseui |
71 config['pylons.app_globals'].baseui = make_ui('db') | 71 config['pylons.app_globals'].baseui = make_ui('db') |
72 | 72 |
73 g = config['pylons.app_globals'] | 73 g = config['pylons.app_globals'] |
74 repo2db_mapper(HgModel().repo_scan(g.paths[0][1], g.baseui, initial)) | 74 repo2db_mapper(ScmModel().repo_scan(g.paths[0][1], g.baseui, initial)) |
75 set_available_permissions(config) | 75 set_available_permissions(config) |
76 set_base_path(config) | 76 set_base_path(config) |
77 set_rhodecode_config(config) | 77 set_rhodecode_config(config) |
78 # CONFIGURATION OPTIONS HERE (note: all config options will override | 78 # CONFIGURATION OPTIONS HERE (note: all config options will override |
79 # any Pylons config options) | 79 # any Pylons config options) |