Skip to content
Snippets Groups Projects
Commit efd3b71f authored by Sune Foldager's avatar Sune Foldager
Browse files

win32/hgwebdir_wsgi: clarify documentation and clean up script a bit

parent 36715cd6
No related branches found
No related tags found
No related merge requests found
......@@ -6,4 +6,6 @@
#
# Requirements:
# - Python 2.6
# - PyWin32 build 214 or newer
# - Mercurial installed from source (python setup.py install)
# - IIS 7
......@@ -9,5 +11,4 @@
# - 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,6 +21,6 @@
#
# - 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.
......@@ -24,5 +25,5 @@
#
# - 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
......@@ -27,6 +28,6 @@
#
# - 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,7 +46,14 @@
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'
......@@ -49,12 +57,5 @@
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
......@@ -59,6 +60,5 @@
import isapi_wsgi
from mercurial import demandimport; demandimport.enable()
from mercurial.hgweb.hgwebdir_mod import hgwebdir
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment