diff --git a/kallithea/bin/kallithea_cli_base.py b/kallithea/bin/kallithea_cli_base.py --- a/kallithea/bin/kallithea_cli_base.py +++ b/kallithea/bin/kallithea_cli_base.py @@ -79,7 +79,7 @@ def register_command(needs_config_file=F if needs_config_file: annotated(*args, config=config, **kwargs) if config_file_initialize_app: - kallithea.config.application.make_app(config.global_conf, **config.local_conf) + kallithea.config.application.make_app_raw(config.global_conf, **config.local_conf) annotated(*args, **kwargs) return cli_command(runtime_wrapper) return annotator diff --git a/kallithea/bin/kallithea_cli_celery.py b/kallithea/bin/kallithea_cli_celery.py --- a/kallithea/bin/kallithea_cli_celery.py +++ b/kallithea/bin/kallithea_cli_celery.py @@ -40,7 +40,7 @@ def celery_run(celery_args, config): kallithea.CELERY_APP.config_from_object(celery_app.make_celery_config(config)) - kallithea.CELERY_APP.loader.on_worker_process_init = lambda: kallithea.config.application.make_app(config.global_conf, **config.local_conf) + kallithea.CELERY_APP.loader.on_worker_process_init = lambda: kallithea.config.application.make_app_raw(config.global_conf, **config.local_conf) args = list(celery_args) # args[0] is generally ignored when prog_name is specified, but -h *needs* it to be 'worker' ... but will also suggest that users specify 'worker' explicitly diff --git a/kallithea/bin/vcs_hooks.py b/kallithea/bin/vcs_hooks.py --- a/kallithea/bin/vcs_hooks.py +++ b/kallithea/bin/vcs_hooks.py @@ -116,7 +116,7 @@ def _git_hook_environment(repo_path): path_to_ini_file = extras['config'] config = paste.deploy.appconfig('config:' + path_to_ini_file) #logging.config.fileConfig(ini_file_path) # Note: we are in a different process - don't use configured logging - kallithea.config.application.make_app(config.global_conf, **config.local_conf) + kallithea.config.application.make_app_raw(config.global_conf, **config.local_conf) # fix if it's not a bare repo if repo_path.endswith(os.sep + '.git'): diff --git a/kallithea/config/application.py b/kallithea/config/application.py --- a/kallithea/config/application.py +++ b/kallithea/config/application.py @@ -48,6 +48,12 @@ def wrap_app(app): def make_app(global_conf, **app_conf): + """Return WSGI app with logging Mercurial stdout/stderr - to be used as + Paste or mod_wsgi entry point""" + return make_app_raw(global_conf, **app_conf) + + +def make_app_raw(global_conf, **app_conf): """ Set up Kallithea with the settings found in the PasteDeploy configuration file used. diff --git a/kallithea/tests/scripts/manual_test_concurrency.py b/kallithea/tests/scripts/manual_test_concurrency.py --- a/kallithea/tests/scripts/manual_test_concurrency.py +++ b/kallithea/tests/scripts/manual_test_concurrency.py @@ -47,7 +47,7 @@ from kallithea.tests.base import HG_REPO rel_path = dirname(dirname(dirname(dirname(os.path.abspath(__file__))))) conf = appconfig('config:development.ini', relative_to=rel_path) -kallithea.config.application.make_app(conf.global_conf, **conf.local_conf) +kallithea.config.application.make_app_raw(conf.global_conf, **conf.local_conf) USER = TEST_USER_ADMIN_LOGIN PASS = TEST_USER_ADMIN_PASS