windows-server-2003 – Windows 2003上的Mercurial浏览器在显示
发布时间:2020-12-25 05:51:40 所属栏目:Windows 来源:网络整理
导读:当尝试浏览我的Mercurial存储库时,通常需要多次刷新才能显示存储库列表.配置如下: Windows Server 2003(由http://www.server4you.com/托管的专用机器. 网站使用自签名SSL进行匿名密码保护. Mercurial 1.5.3 Python 2.6.5 Python for Windows 32扩展214 py
当尝试浏览我的Mercurial存储库时,通常需要多次刷新才能显示存储库列表.配置如下: > Windows Server 2003(由http://www.server4you.com/托管的专用机器. 使用标准hgwebdir_wspi.py文件(复制到后面)通过??ISAPI提供存储库. 在进行克隆/推送/等之前,我必须首先浏览存储库,否则我本地计算机上的hg无法找到该网站. 我该怎么做才能开始追踪这个问题? hgwebdir_wsgi.py # Configuration file location hgweb_config = r'C:PublicMercurialWebSitehgweb.config' # Global settings for IIS path translation path_strip = 0 # Strip this many path elements off (when using url rewrite) path_prefix = 0 # This many path elements are prefixes (depends on the # virtual path of the IIS application). import sys # Adjust python path if this is not a system-wide install #sys.path.insert(0,r'c:pathtopythonlib') # Enable tracing. Run 'python -m win32traceutil' to debug if hasattr(sys,'isapidllhandle'): import win32traceutil # To serve pages in local charset instead of UTF-8,remove the two lines below import os os.environ['HGENCODING'] = 'UTF-8' import isapi_wsgi from mercurial import demandimport; demandimport.enable() from mercurial.hgweb.hgwebdir_mod import hgwebdir # Example tweak: Replace isapi_wsgi's handler to provide better error message # Other stuff could also be done here,like logging errors etc. class WsgiHandler(isapi_wsgi.IsapiWsgiHandler): error_status = '500 Internal Server Error' # less silly error message isapi_wsgi.IsapiWsgiHandler = WsgiHandler # Only create the hgwebdir instance once application = hgwebdir(hgweb_config) def handler(environ,start_response): # Translate IIS's weird URLs url = environ['SCRIPT_NAME'] + environ['PATH_INFO'] paths = url[1:].split('/')[path_strip:] script_name = '/' + '/'.join(paths[:path_prefix]) path_info = '/'.join(paths[path_prefix:]) if path_info: path_info = '/' + path_info environ['SCRIPT_NAME'] = script_name environ['PATH_INFO'] = path_info return application(environ,start_response) def __ExtensionFactory__(): return isapi_wsgi.ISAPISimpleHandler(handler) if __name__=='__main__': from isapi.install import * params = ISAPIParameters() HandleCommandLine(params) hgweb.config [paths] / = C:PublicMercurialRepositories* [web] allow_archive = bz2 gz zip ; Allows archive downloads. allow_push = ######## ; Users that are allowed to push.听起来IIS 6正在缓存你的网页(你没有定义你是否使用Apache,所以我假设它是一个Windows服务器) 使用此link from Microsoft并将站点设置为立即过期. (编辑:徐州站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
站长推荐
- 数不清的Chrome插件 ,适合开发者的只有这几个!
- 微软向所有Windows 11用户开放新Emoji被用户吐槽
- 微软发布Wndows 11更新 解决PC降速、性能变缓等问
- windows – 是否有针对Microsoft堆栈的推荐自动化
- Windows 11设置应用将要可以管理微软和Office账号
- 如何在Windows 10 64位中运行16位应用程序
- xsos:一个在Linux上阅读SOSReport的工具
- Windows 11将从次年起将终端作为默认命令行工具
- windows-server-2003 – 如何判断哪台计算机在网
- windows-server-2008-r2 – 在Windows Server 20
热点阅读