我使用these instructions在Windows 7上的IIS下设置Mercurial 我已经到了测试空存储库的地步,我收到以下错误
C:\inetpub\wwwroot\hg\hgweb.cgi in ()
15
16 from mercurial import demandimport; demandimport.enable()
17 from mercurial.hgweb import hgweb, wsgicgi
18 application = hgweb('c:\inetpub\wwwroot\hg\hgweb.config')
=> 19 wsgicgi.launch(application)
wsgicgi = <module 'mercurial.hgweb.wsgicgi' from 'c:\inetpub\wwwroot\hg\mercurial\hgweb\wsgicgi.pyc'>, wsgicgi.launch = <function launch>, application = <mercurial.hgweb.hgwebdir_mod.hgwebdir object>
C:\inetpub\wwwroot\mercurial\hgweb\wsgicgi.pyc in launch(application=<mercurial.hgweb.hgwebdir_mod.hgwebdir object>)
C:\inetpub\wwwroot\mercurial\hgweb\hgwebdir_mod.pyc in __call__(self=<mercurial.hgweb.hgwebdir_mod.hgwebdir object>, env={'ALLUSERSPROFILE': r'C:\ProgramData', 'APPDATA': r'C:\Windows\system32\config\systemprofile\AppData\Roaming', 'APP_POOL_ID': 'DefaultAppPool', 'AUTH_PASSWORD': '', 'AUTH_TYPE': '', 'AUTH_USER': '', 'CERT_COOKIE': '', 'CERT_FLAGS': '', 'CERT_ISSUER': '', 'CERT_SERIALNUMBER': '', ...}, respond=<function start_response>)
C:\inetpub\wwwroot\mercurial\hgweb\hgwebdir_mod.pyc in run_wsgi(self=<mercurial.hgweb.hgwebdir_mod.hgwebdir object>, req=<mercurial.hgweb.request.wsgirequest object>)
C:\inetpub\wwwroot\mercurial\hgweb\hgwebdir_mod.pyc in templater(self=<mercurial.hgweb.hgwebdir_mod.hgwebdir object>, req=<mercurial.hgweb.request.wsgirequest object>)
C:\inetpub\wwwroot\mercurial\templater.pyc in stylemap(styles=(None, None, 'paper'), paths=[])
<type 'exceptions.RuntimeError'>: No hgweb templates found in []
args = ('No hgweb templates found in []',)
message = 'No hgweb templates found in []'.
我已将Templates文件夹从C:\ Program Files(x86)\ Mercurial \ Templates复制到C:\ inetpub \ wwwroot \ hg \ Templates。有些说明涉及'模板'文件夹,因此我尝试将模板重命名为模板,没有任何区别。
我应该在其他地方放置Templates文件夹,还是在某处我应该指定模板路径?
答案 0 :(得分:0)
您可以在hgweb.config文件中指定Templates文件夹的路径
[web]
templates = c:\inetpub\wwwroot\hg\Templates