#989 load global configuration in hgweb on Mercurial 4.1 and later

This commit is contained in:
Matt Harbison
2018-06-22 16:06:35 -04:00
parent e826b833cc
commit a051eb159c

View File

@@ -36,7 +36,11 @@ from mercurial.hgweb import hgweb, wsgicgi
demandimport.enable()
u = uimod.ui()
try:
u = uimod.ui.load()
except AttributeError:
# For installations earlier than Mercurial 4.1
u = uimod.ui()
# pass SCM_HTTP_POST_ARGS to enable experimental httppostargs protocol of mercurial
# SCM_HTTP_POST_ARGS is set by HgCGIServlet