Show More
@@ -6,8 +6,9 b'' | |||||
6 | # |
|
6 | # | |
7 | # Requirements: |
|
7 | # Requirements: | |
8 | # - Python 2.6 |
|
8 | # - Python 2.6 | |
|
9 | # - PyWin32 build 214 or newer | |||
|
10 | # - Mercurial installed from source (python setup.py install) | |||
9 | # - IIS 7 |
|
11 | # - IIS 7 | |
10 | # - PyWin32 build 214 or newer |
|
|||
11 | # |
|
12 | # | |
12 | # Earlier versions will in general work as well, but the PyWin32 version is |
|
13 | # Earlier versions will in general work as well, but the PyWin32 version is | |
13 | # necessary for win32traceutil to work correctly. |
|
14 | # necessary for win32traceutil to work correctly. | |
@@ -20,13 +21,13 b'' | |||||
20 | # |
|
21 | # | |
21 | # - Run this script (i.e. python hgwebdir_wsgi.py) to get a shim dll. The |
|
22 | # - Run this script (i.e. python hgwebdir_wsgi.py) to get a shim dll. The | |
22 | # shim is identical for all scripts, so you can just copy and rename one |
|
23 | # shim is identical for all scripts, so you can just copy and rename one | |
23 |
# from an earlier run |
|
24 | # from an earlier run, if you wish. | |
24 | # |
|
25 | # | |
25 | # - Setup an IIS application where your hgwebdir is to be served from. |
|
26 | # - Setup an IIS application where your hgwebdir is to be served from. | |
26 |
# |
|
27 | # On 64-bit systems, make sure it's assigned a 32-bit app pool. | |
27 | # |
|
28 | # | |
28 | # - In the application, setup a wildcard script handler mapping of type |
|
29 | # - In the application, setup a wildcard script handler mapping of type | |
29 |
# IpsapiModule |
|
30 | # IpsapiModule with the shim dll as its executable. This file MUST reside | |
30 | # in the same directory as the shim. Remove all other handlers, if you wish. |
|
31 | # in the same directory as the shim. Remove all other handlers, if you wish. | |
31 | # |
|
32 | # | |
32 | # - Make sure the ISAPI and CGI restrictions (configured globally on the |
|
33 | # - Make sure the ISAPI and CGI restrictions (configured globally on the | |
@@ -45,20 +46,19 b' path_prefix = 1 # This many path elemen' | |||||
45 |
|
46 | |||
46 | import sys |
|
47 | import sys | |
47 |
|
48 | |||
48 | # To stop serving pages in UTF-8, remove the two lines below |
|
|||
49 | import os |
|
|||
50 | os.environ['HGENCODING'] = 'UTF-8' |
|
|||
51 |
|
||||
52 | # Adjust python path if this is not a system-wide install |
|
49 | # Adjust python path if this is not a system-wide install | |
53 |
#sys.path.insert(0, |
|
50 | #sys.path.insert(0, r'c:\path\to\python\lib') | |
54 |
|
||||
55 |
|
51 | |||
56 | # Enable tracing. Run 'python -m win32traceutil' to debug |
|
52 | # Enable tracing. Run 'python -m win32traceutil' to debug | |
57 |
if hasattr(sys, 'isapidllhandle'): |
|
53 | if hasattr(sys, 'isapidllhandle'): | |
58 | import win32traceutil |
|
54 | import win32traceutil | |
59 |
|
55 | |||
|
56 | # To serve pages in local charset instead of UTF-8, remove the two lines below | |||
|
57 | import os | |||
|
58 | os.environ['HGENCODING'] = 'UTF-8' | |||
|
59 | ||||
|
60 | ||||
60 | import isapi_wsgi |
|
61 | import isapi_wsgi | |
61 |
|
||||
62 | from mercurial import demandimport; demandimport.enable() |
|
62 | from mercurial import demandimport; demandimport.enable() | |
63 | from mercurial.hgweb.hgwebdir_mod import hgwebdir |
|
63 | from mercurial.hgweb.hgwebdir_mod import hgwebdir | |
64 |
|
64 |
General Comments 0
You need to be logged in to leave comments.
Login now