1 # An example WSGI (use with mod_wsgi) script to export multiple hgweb repos
3 # adjust python path if not a system-wide install:
5 #sys.path.insert(0, "/path/to/python/lib")
7 # enable demandloading to reduce startup time
8 from mercurial import demandimport; demandimport.enable()
9 from mercurial.hgweb.hgwebdir_mod import hgwebdir
11 # If you'd like to serve pages with UTF-8 instead of your default
12 # locale charset, you can do so by uncommenting the following lines.
13 # Note that this will cause your .hgrc files to be interpreted in
14 # UTF-8 and all your repo files to be displayed using UTF-8.
17 #os.environ["HGENCODING"] = "UTF-8"
19 # The config file looks like this. You can have paths to individual
20 # repos, collections of repos in a directory tree, or both.
23 # virtual/path1 = /real/path1
24 # virtual/path2 = /real/path2
25 # virtual/root = /real/root/*
30 # * First two lines mount one repository into one virtual path, like
31 # '/real/path1' into 'virtual/path1'.
33 # * The third entry tells every mercurial repository found in
34 # '/real/root', recursively, should be mounted in 'virtual/root'. This
35 # format is preferred over the [collections] one, using absolute paths
36 # as configuration keys is not supported on every platform (including
39 # * The last entry is a special case mounting all repositories in
40 # '/real/root2' in the root of the virtual directory.
42 # collections example: say directory tree /foo contains repos /foo/bar,
43 # /foo/quux/baz. Give this config section:
46 # Then repos will list as bar and quux/baz.
48 # Alternatively you can pass a list of ('virtual/path', '/real/path') tuples
49 # or use a dictionary with entries like 'virtual/path': '/real/path'
51 application = hgwebdir('hgweb.config')