diff --git a/contrib/win32/hgwebdir_wsgi.py b/contrib/win32/hgwebdir_wsgi.py --- a/contrib/win32/hgwebdir_wsgi.py +++ b/contrib/win32/hgwebdir_wsgi.py @@ -6,8 +6,9 @@ # # Requirements: # - Python 2.6 +# - PyWin32 build 214 or newer +# - Mercurial installed from source (python setup.py install) # - IIS 7 -# - PyWin32 build 214 or newer # # Earlier versions will in general work as well, but the PyWin32 version is # necessary for win32traceutil to work correctly. @@ -20,13 +21,13 @@ # # - Run this script (i.e. python hgwebdir_wsgi.py) to get a shim dll. The # shim is identical for all scripts, so you can just copy and rename one -# from an earlier run instead. +# from an earlier run, if you wish. # # - Setup an IIS application where your hgwebdir is to be served from. -# Make sure it's assigned a 32-bit app pool. +# On 64-bit systems, make sure it's assigned a 32-bit app pool. # # - In the application, setup a wildcard script handler mapping of type -# IpsapiModule, with the shim dll as its executable. This file MUST reside +# IpsapiModule with the shim dll as its executable. This file MUST reside # in the same directory as the shim. Remove all other handlers, if you wish. # # - Make sure the ISAPI and CGI restrictions (configured globally on the @@ -45,20 +46,19 @@ path_prefix = 1 # This many path elemen import sys -# To stop serving pages in UTF-8, remove the two lines below +# Adjust python path if this is not a system-wide install +#sys.path.insert(0, r'c:\path\to\python\lib') + +# 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' -# Adjust python path if this is not a system-wide install -#sys.path.insert(0, "/path/to/python/lib") - - -# Enable tracing. Run 'python -m win32traceutil' to debug -if hasattr(sys, 'isapidllhandle'): - import win32traceutil import isapi_wsgi - from mercurial import demandimport; demandimport.enable() from mercurial.hgweb.hgwebdir_mod import hgwebdir