【问题标题】:Hgweb under iis: 'exceptions.RuntimeError'>: No hgweb templates found in []iis 下的 Hgweb: 'exceptions.RuntimeError'>: No hgweb templates found in []
【发布时间】:2023-03-06 14:21:01
【问题描述】:

我在 Windows 7 的 IIS 下使用 these instructions 设置 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 文件夹,还是应该在其他地方指定模板路径?

【问题讨论】:

    标签: windows iis mercurial


    【解决方案1】:

    您可以在 hgweb.config 文件中指定 Templates 文件夹的路径

    [web]
    templates = c:\inetpub\wwwroot\hg\Templates
    

    【讨论】:

      猜你喜欢
      • 2011-05-20
      • 1970-01-01
      • 2010-10-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多