Show More
@@ -318,7 +318,7 b' def handle_git_receive(repo_path, revs, ' | |||
|
318 | 318 | from rhodecode.model import init_model |
|
319 | 319 | from rhodecode.model.db import RhodeCodeUi |
|
320 | 320 | from rhodecode.lib.utils import make_ui |
|
321 | extras = json.loads(env['RHODECODE_EXTRAS']) | |
|
321 | extras = _extract_extras(env) | |
|
322 | 322 | |
|
323 | 323 | path, ini_name = os.path.split(extras['config']) |
|
324 | 324 | conf = appconfig('config:%s' % ini_name, relative_to=path) |
@@ -339,8 +339,6 b' def handle_git_receive(repo_path, revs, ' | |||
|
339 | 339 | |
|
340 | 340 | _hooks = dict(baseui.configitems('hooks')) or {} |
|
341 | 341 | |
|
342 | for k, v in extras.items(): | |
|
343 | baseui.setconfig('rhodecode_extras', k, v) | |
|
344 | 342 | if hook_type == 'pre': |
|
345 | 343 | repo = repo.scm_instance |
|
346 | 344 | else: |
@@ -583,13 +583,16 b' def get_server_url(environ):' | |||
|
583 | 583 | return req.host_url + req.script_name |
|
584 | 584 | |
|
585 | 585 | |
|
586 | def _extract_extras(): | |
|
586 | def _extract_extras(env=None): | |
|
587 | 587 | """ |
|
588 | 588 | Extracts the rc extras data from os.environ, and wraps it into named |
|
589 | 589 | AttributeDict object |
|
590 | 590 | """ |
|
591 | if not env: | |
|
592 | env = os.environ | |
|
593 | ||
|
591 | 594 | try: |
|
592 |
rc_extras = json.loads( |
|
|
595 | rc_extras = json.loads(env['RC_SCM_DATA']) | |
|
593 | 596 | except: |
|
594 | 597 | print os.environ |
|
595 | 598 | print >> sys.stderr, traceback.format_exc() |
General Comments 0
You need to be logged in to leave comments.
Login now