##// END OF EJS Templates
There's no need to use special env variable for config file, it's already passed in in extras now
marcink -
r2870:cbf0775f beta
parent child Browse files
Show More
@@ -317,8 +317,9 b' def handle_git_receive(repo_path, revs, '
317 from rhodecode.model import init_model
317 from rhodecode.model import init_model
318 from rhodecode.model.db import RhodeCodeUi
318 from rhodecode.model.db import RhodeCodeUi
319 from rhodecode.lib.utils import make_ui
319 from rhodecode.lib.utils import make_ui
320 extras = json.loads(env['RHODECODE_EXTRAS'])
320
321
321 path, ini_name = os.path.split(env['RHODECODE_CONFIG_FILE'])
322 path, ini_name = os.path.split(extras['config'])
322 conf = appconfig('config:%s' % ini_name, relative_to=path)
323 conf = appconfig('config:%s' % ini_name, relative_to=path)
323 load_environment(conf.global_conf, conf.local_conf)
324 load_environment(conf.global_conf, conf.local_conf)
324
325
@@ -337,7 +338,6 b' def handle_git_receive(repo_path, revs, '
337
338
338 _hooks = dict(baseui.configitems('hooks')) or {}
339 _hooks = dict(baseui.configitems('hooks')) or {}
339
340
340 extras = json.loads(env['RHODECODE_EXTRAS'])
341 for k, v in extras.items():
341 for k, v in extras.items():
342 baseui.setconfig('rhodecode_extras', k, v)
342 baseui.setconfig('rhodecode_extras', k, v)
343 repo = repo.scm_instance
343 repo = repo.scm_instance
@@ -118,18 +118,15 b' class GitRepository(object):'
118
118
119 try:
119 try:
120 gitenv = os.environ
120 gitenv = os.environ
121 from rhodecode import CONFIG
122 from rhodecode.lib.compat import json
121 from rhodecode.lib.compat import json
123 gitenv['RHODECODE_EXTRAS'] = json.dumps(self.extras)
122 gitenv['RHODECODE_EXTRAS'] = json.dumps(self.extras)
124 # forget all configs
123 # forget all configs
125 gitenv['GIT_CONFIG_NOGLOBAL'] = '1'
124 gitenv['GIT_CONFIG_NOGLOBAL'] = '1'
126 # we need current .ini file used to later initialize rhodecode
127 # env and connect to db
128 gitenv['RHODECODE_CONFIG_FILE'] = CONFIG['__file__']
129 opts = dict(
125 opts = dict(
130 env=gitenv,
126 env=gitenv,
131 cwd=os.getcwd()
127 cwd=os.getcwd()
132 )
128 )
129
133 out = subprocessio.SubprocessIOChunker(
130 out = subprocessio.SubprocessIOChunker(
134 r'git %s --stateless-rpc "%s"' % (git_command[4:],
131 r'git %s --stateless-rpc "%s"' % (git_command[4:],
135 self.content_path),
132 self.content_path),
General Comments 0
You need to be logged in to leave comments. Login now