<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hello,<div>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.</div><div>Here is my setup:</div><div><ol><li>Mercurial 5.0 rc</li><li>Python 3.7.3</li><li>mod_wsig 4.6.5 (installed via pip)</li><li>Apache 2.4.39 VC15</li></ol><div>I installed the components in the following order:</div></div><div><ol><li>Python 3.7.3</li><li>mod_wsig 4.6.5 using pip install</li><li>Mercurial 5.0rc </li><ol><li>Downloaded the Mercurial 5.0rc source files</li><li>Downloaded/installed the 2019 Build tools for C</li><li>Build the Mercurial using python setup.py build</li><li>Install the Mercurial using python setup.py install</li></ol><li>Installed the apache server 2.4.39</li></ol><div>My httpd.config file (sections)</div></div><div>-------------------------------------------------------------    <br></div><div># Loading the wsgi_mod</div><div><div>LoadFile "c:/program files/python37/python37.dll"</div><div>LoadModule wsgi_module "c:/program files/python37/lib/site-packages/mod_wsgi/server/mod_wsgi.cp37-win_amd64.pyd"</div><div>WSGIPythonHome "c:/program files/python37"</div></div><div><br></div><div># Adding the Directory</div><div><div>WSGIScriptAlias /hg "c:/hg_server/hgweb.wsgi"</div><div><Directory "c:/hg_server"></div><div><span style="white-space:pre">    </span>AllowOverride None</div><div><span style="white-space:pre">    </span>Options None</div><div><span style="white-space:pre">  </span>Require all granted</div><div></Directory></div></div><div>-------------------------------------------------------------  <br></div><div><br></div><div><br></div><div>My hgweb.wsgi file</div><div>-------------------------------------------------------------   </div><div># An example WSGI for use with mod_wsgi, edit as necessary</div><div># See <a href="http://mercurial.selenic.com/wiki/modwsgi">http://mercurial.selenic.com/wiki/modwsgi</a> for more information</div><div><br></div><div># Path to repo or hgweb config to serve (see 'hg help hgweb')</div><div>config = "c:/hg_server/hgweb.config"</div><div><br></div><div># Uncomment and adjust if Mercurial is not installed system-wide:</div><div># import sys; sys.path.insert(0, "c:/program files/python37/lib/")</div><div><br></div><div># Uncomment to send python tracebacks to the browser if an error occurs:</div><div># import cgitb; cgitb.enable()</div><div><br></div><div># enable demandloading to reduce startup time</div><div>from mercurial import demandimport; demandimport.enable()</div><div><br></div><div>from mercurial.hgweb import hgweb</div><div>application = hgweb(config) <br></div><div>-------------------------------------------------------------   </div><div><br></div><div><br></div><div>My  hgweb.config file<br></div><div>-------------------------------------------------------------  </div><div>[paths]</div><div>/ = D:/hg_repos/*</div><div><br></div><div>[web]</div><div>style = coal</div><div>push_ssl = false </div><div>-------------------------------------------------------------   <br></div><div><br></div><div><br></div><div>This is the error trace I see on the error.log</div><div>-------------------------------------------------------------     <br></div><div><div>[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'.</div><div>[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'.</div><div>[Tue Apr 30 18:51:33.921850 2019] [wsgi:error] [pid 1628:tid 1360] [client ::1:58894] Traceback (most recent call last):\r</div><div>[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</div><div>[Tue Apr 30 18:51:33.921850 2019] [wsgi:error] [pid 1628:tid 1360] [client ::1:58894]     application = hgweb(config)\r</div><div>[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</div><div>[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</div><div>[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</div><div>[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</div><div>[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</div></div><div>-------------------------------------------------------------    </div><div><br></div><div>Which gives me a 500 error on the web interface.</div><div><br></div><div>Any help/guidance will be greatly appreciated!!!</div><div>Best Regards</div><div><br></div><div>Edgar Landazuri <br></div></div></div></div></div></div></div>