changeset 10587:a48d256cc7d9 stable

Merge with stable
author Sune Foldager <cryo@cyanite.org>
date Thu, 04 Mar 2010 13:11:29 +0100
parents 37db57bc7fd7 (current diff) efd3b71fc293 (diff)
children b0b19d61d79a
files
diffstat 1 files changed, 16 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/win32/hgwebdir_wsgi.py	Thu Mar 04 10:05:12 2010 +0100
+++ b/contrib/win32/hgwebdir_wsgi.py	Thu Mar 04 13:11:29 2010 +0100
@@ -1,10 +1,14 @@
 # An example WSGI script for IIS/isapi-wsgi to export multiple hgweb repos
 # Copyright 2010 Sune Foldager <cryo@cyanite.org>
 #
+# This software may be used and distributed according to the terms of the
+# GNU General Public License version 2 or any later version.
+#
 # 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.
@@ -17,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
@@ -42,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