equal
deleted
inserted
replaced
|
1 #!/usr/bin/env python |
|
2 # $Id$ |
|
3 # Isabelle repository service |
|
4 |
|
5 # adjust python path if not a system-wide install: |
|
6 import sys |
|
7 sys.path.insert(0, "/home/isabelle/html-data/isabelle-repos/mercurial-www4/lib64/python2.4/site-packages") |
|
8 |
|
9 # enable importing on demand to reduce startup time |
|
10 from mercurial import demandimport; demandimport.enable() |
|
11 |
|
12 # to send python tracebacks to the browser if an error occurs: |
|
13 import cgitb |
|
14 cgitb.enable() |
|
15 |
|
16 # If you'd like to serve pages with UTF-8 instead of your default |
|
17 # locale charset, you can do so by uncommenting the following lines. |
|
18 # Note that this will cause your .hgrc files to be interpreted in |
|
19 # UTF-8 and all your repo files to be displayed using UTF-8. |
|
20 # |
|
21 import os |
|
22 os.environ["HGENCODING"] = "UTF-8" |
|
23 |
|
24 from mercurial.hgweb.hgweb_mod import hgweb |
|
25 import mercurial.hgweb.wsgicgi as wsgicgi |
|
26 |
|
27 application = hgweb("/home/isabelle/html-data/isabelle-repos/hg", "Isabelle repository") |
|
28 wsgicgi.launch(application) |