Skip to content
Snippets Groups Projects
Commit ba2aa962 authored by Georges Racinet's avatar Georges Racinet :squid:
Browse files

WSGI keeping track of the configuration path

When running under WSGI, if we need to spawn a subprocess,
as will be the case with clonebundles integration, we meed to
set `HGRCPATH` in the subprocess environment, hence we need
to remember the value.
parent 5358a64f
No related branches found
No related tags found
1 merge request!117clone-bundles: auto-generation for public projects
......@@ -65,6 +65,7 @@
'USERINFO_EMAIL',
'PROJECT_PATH',
'PROJECT_NAMESPACE_FULL_PATH',
'PUBLIC_REPOSITORY',
)
......@@ -98,6 +99,7 @@
# set up environment for new ui
extensions.loadall(self.ui)
extensions.populateui(self.ui)
self.conf_path = conf_path
if conf_path is not None:
for i, rcf in enumerate(conf_path.split(':')):
# ui.readconfig does a blank open(), but will later
......@@ -114,6 +116,7 @@
self.repos_root = root
def apply_heptapod_headers(self, environ):
environ['HEPTAPOD_HGRC'] = self.conf_path
perm_user = environ.get('HTTP_X_HEPTAPOD_PERMISSION_USER')
if perm_user is not None and environ['REMOTE_ADDR'] in ALLOWED_REMOTES:
environ['REMOTE_USER'] = perm_user
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment