Mercurial > kallithea
diff rhodecode/lib/hooks.py @ 2877:d6ac3baaa15a
merged beta into stable
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Fri, 28 Sep 2012 23:28:10 +0200 |
parents | f7a52d548fd0 17556a81ec6f |
children | 3148c08cf86f |
line wrap: on
line diff
--- a/rhodecode/lib/hooks.py Wed Sep 19 23:02:36 2012 +0200 +++ b/rhodecode/lib/hooks.py Fri Sep 28 23:28:10 2012 +0200 @@ -317,8 +317,9 @@ from rhodecode.model import init_model from rhodecode.model.db import RhodeCodeUi from rhodecode.lib.utils import make_ui + extras = json.loads(env['RHODECODE_EXTRAS']) - path, ini_name = os.path.split(env['RHODECODE_CONFIG_FILE']) + path, ini_name = os.path.split(extras['config']) conf = appconfig('config:%s' % ini_name, relative_to=path) load_environment(conf.global_conf, conf.local_conf) @@ -327,8 +328,8 @@ baseui = make_ui('db') # fix if it's not a bare repo - if repo_path.endswith('.git'): - repo_path = repo_path[:-4] + if repo_path.endswith(os.sep + '.git'): + repo_path = repo_path[:-5] repo = Repository.get_by_full_path(repo_path) if not repo: @@ -337,7 +338,6 @@ _hooks = dict(baseui.configitems('hooks')) or {} - extras = json.loads(env['RHODECODE_EXTRAS']) for k, v in extras.items(): baseui.setconfig('rhodecode_extras', k, v) repo = repo.scm_instance