Mercurial 5.0 rc + Python 3.7 + Apache 2.4.39

Edgar Anjensen Landazuri Sánchez edgar.landazuri.sanchez at gmail.com
Tue Apr 30 20:13:18 EDT 2019


Hello,
I've been trying to setup a mercurial repository for a couple of days now.
After struggling with the different versions that are needed I ended up
going after the state of the art approach.
Here is my setup:

   1. Mercurial 5.0 rc
   2. Python 3.7.3
   3. mod_wsig 4.6.5 (installed via pip)
   4. Apache 2.4.39 VC15

I installed the components in the following order:

   1. Python 3.7.3
   2. mod_wsig 4.6.5 using pip install
   3. Mercurial 5.0rc
      1. Downloaded the Mercurial 5.0rc source files
      2. Downloaded/installed the 2019 Build tools for C
      3. Build the Mercurial using python setup.py build
      4. Install the Mercurial using python setup.py install
   4. Installed the apache server 2.4.39

My httpd.config file (sections)
-------------------------------------------------------------
# Loading the wsgi_mod
LoadFile "c:/program files/python37/python37.dll"
LoadModule wsgi_module "c:/program
files/python37/lib/site-packages/mod_wsgi/server/mod_wsgi.cp37-win_amd64.pyd"
WSGIPythonHome "c:/program files/python37"

# Adding the Directory
WSGIScriptAlias /hg "c:/hg_server/hgweb.wsgi"
<Directory "c:/hg_server">
AllowOverride None
Options None
Require all granted
</Directory>
-------------------------------------------------------------


My hgweb.wsgi file
-------------------------------------------------------------
# An example WSGI for use with mod_wsgi, edit as necessary
# See http://mercurial.selenic.com/wiki/modwsgi for more information

# Path to repo or hgweb config to serve (see 'hg help hgweb')
config = "c:/hg_server/hgweb.config"

# Uncomment and adjust if Mercurial is not installed system-wide:
# import sys; sys.path.insert(0, "c:/program files/python37/lib/")

# Uncomment to send python tracebacks to the browser if an error occurs:
# import cgitb; cgitb.enable()

# enable demandloading to reduce startup time
from mercurial import demandimport; demandimport.enable()

from mercurial.hgweb import hgweb
application = hgweb(config)
-------------------------------------------------------------


My  hgweb.config file
-------------------------------------------------------------
[paths]
/ = D:/hg_repos/*

[web]
style = coal
push_ssl = false
-------------------------------------------------------------


This is the error trace I see on the error.log
-------------------------------------------------------------
[Tue Apr 30 18:51:33.921850 2019] [wsgi:error] [pid 1628:tid 1360] [client
::1:58894] mod_wsgi (pid=1628): Failed to exec Python script file
'C:/hg_server/hgweb.wsgi'.
[Tue Apr 30 18:51:33.921850 2019] [wsgi:error] [pid 1628:tid 1360] [client
::1:58894] mod_wsgi (pid=1628): Exception occurred processing WSGI script
'C:/hg_server/hgweb.wsgi'.
[Tue Apr 30 18:51:33.921850 2019] [wsgi:error] [pid 1628:tid 1360] [client
::1:58894] Traceback (most recent call last):\r
[Tue Apr 30 18:51:33.921850 2019] [wsgi:error] [pid 1628:tid 1360] [client
::1:58894]   File "C:/hg_server/hgweb.wsgi", line 17, in <module>\r
[Tue Apr 30 18:51:33.921850 2019] [wsgi:error] [pid 1628:tid 1360] [client
::1:58894]     application = hgweb(config)\r
[Tue Apr 30 18:51:33.921850 2019] [wsgi:error] [pid 1628:tid 1360] [client
::1:58894]   File "c:\\program
files\\python37\\lib\\site-packages\\mercurial\\hgweb\\__init__.py", line
45, in hgweb\r
[Tue Apr 30 18:51:33.921850 2019] [wsgi:error] [pid 1628:tid 1360] [client
::1:58894]     return hgweb_mod.hgweb(config, name=name, baseui=baseui)\r
[Tue Apr 30 18:51:33.921850 2019] [wsgi:error] [pid 1628:tid 1360] [client
::1:58894]   File "c:\\program
files\\python37\\lib\\site-packages\\mercurial\\hgweb\\hgweb_mod.py", line
223, in __init__\r
[Tue Apr 30 18:51:33.921850 2019] [wsgi:error] [pid 1628:tid 1360] [client
::1:58894]     r.ui.setconfig('ui', 'report_untrusted', 'off', 'hgweb')\r
[Tue Apr 30 18:51:33.921850 2019] [wsgi:error] [pid 1628:tid 1360] [client
::1:58894] AttributeError: 'str' object has no attribute 'ui'\r
-------------------------------------------------------------

Which gives me a 500 error on the web interface.

Any help/guidance will be greatly appreciated!!!
Best Regards

Edgar Landazuri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20190430/fabcdefb/attachment.html>


More information about the Mercurial-devel mailing list