Mercurial > kallithea
comparison rhodecode/lib/utils.py @ 3340:f1491bad8339 beta
unified RhodeCode paster commands
- moved them to commont paster_commands package
- re-use sqlalchemy session initializaiton
- some docs updates
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 09 Feb 2013 22:21:31 +0100 |
parents | ba2e2514a01a |
children | 7000fc4aa569 |
comparison
equal
deleted
inserted
replaced
3339:b76a595b7a5e | 3340:f1491bad8339 |
---|---|
702 | 702 |
703 self.path_to_ini_file = os.path.realpath(conf) | 703 self.path_to_ini_file = os.path.realpath(conf) |
704 conf = paste.deploy.appconfig('config:' + self.path_to_ini_file) | 704 conf = paste.deploy.appconfig('config:' + self.path_to_ini_file) |
705 pylonsconfig.init_app(conf.global_conf, conf.local_conf) | 705 pylonsconfig.init_app(conf.global_conf, conf.local_conf) |
706 | 706 |
707 def _init_session(self): | |
708 """ | |
709 Inits SqlAlchemy Session | |
710 """ | |
711 logging.config.fileConfig(self.path_to_ini_file) | |
712 from pylons import config | |
713 from rhodecode.model import init_model | |
714 from rhodecode.lib.utils2 import engine_from_config | |
715 | |
716 #get to remove repos !! | |
717 add_cache(config) | |
718 engine = engine_from_config(config, 'sqlalchemy.db1.') | |
719 init_model(engine) | |
720 | |
707 | 721 |
708 def check_git_version(): | 722 def check_git_version(): |
709 """ | 723 """ |
710 Checks what version of git is installed in system, and issues a warning | 724 Checks what version of git is installed in system, and issues a warning |
711 if it's too old for RhodeCode to properly work. | 725 if it's too old for RhodeCode to properly work. |