Mercurial > hg-stable
changeset 10586:efd3b71fc293
win32/hgwebdir_wsgi: clarify documentation and clean up script a bit
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Thu, 04 Mar 2010 13:10:48 +0100 |
parents | 36715cd6ee3d |
children | a48d256cc7d9 df92846d590b |
files | contrib/win32/hgwebdir_wsgi.py |
diffstat | 1 files changed, 13 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/win32/hgwebdir_wsgi.py Wed Mar 03 20:35:20 2010 +0100 +++ b/contrib/win32/hgwebdir_wsgi.py Thu Mar 04 13:10:48 2010 +0100 @@ -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 @@ 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