From 6e37966d535b347f03c91933ed28a166d0f2b94d Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Sat, 13 Oct 2018 14:50:32 +0200 Subject: [PATCH] #997 fixed loading of global mercurial configuration --- .../src/main/resources/sonia/scm/python/hgweb.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/python/hgweb.py b/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/python/hgweb.py index e2e7d8e931..cf55a95a52 100644 --- a/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/python/hgweb.py +++ b/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/python/hgweb.py @@ -36,7 +36,12 @@ from mercurial.hgweb import hgweb, wsgicgi demandimport.enable() -u = uimod.ui() +# uimod.ui.load() is not available in older mercurial installations +# Issue 997: https://bitbucket.org/sdorra/scm-manager/issues/997/since-the-fix-for-issue-970-etc-mercurial +if hasattr(uimod.ui, 'load'): + u = uimod.ui.load() +else: + u = uimod.ui() # pass SCM_HTTP_POST_ARGS to enable experimental httppostargs protocol of mercurial # SCM_HTTP_POST_ARGS is set by HgCGIServlet