Show More
@@ -1,17 +1,20 | |||||
1 | #!/usr/bin/env python |
|
1 | #!/usr/bin/env python | |
2 | # |
|
2 | # | |
3 | # An example CGI script to export multiple hgweb repos, edit as necessary |
|
3 | # An example CGI script to export multiple hgweb repos, edit as necessary | |
4 |
|
4 | |||
5 | import cgitb, sys |
|
5 | import cgitb, sys | |
6 | cgitb.enable() |
|
6 | cgitb.enable() | |
7 |
|
7 | |||
8 | # sys.path.insert(0, "/path/to/python/lib") # if not a system-wide install |
|
8 | # sys.path.insert(0, "/path/to/python/lib") # if not a system-wide install | |
9 | from mercurial import hgweb |
|
9 | from mercurial import hgweb | |
10 |
|
10 | |||
11 | # The config file looks like this: |
|
11 | # The config file looks like this: | |
12 | # [paths] |
|
12 | # [paths] | |
13 | # virtual/path = /real/path |
|
13 | # virtual/path = /real/path | |
14 | # virtual/path = /real/path |
|
14 | # virtual/path = /real/path | |
15 |
|
15 | |||
|
16 | # Alternatively you can pass a list of ('virtual/path', '/real/path') tuples | |||
|
17 | # or use a dictionary with entries like 'virtual/path': '/real/path' | |||
|
18 | ||||
16 | h = hgweb.hgwebdir("hgweb.config") |
|
19 | h = hgweb.hgwebdir("hgweb.config") | |
17 | h.run() |
|
20 | h.run() |
General Comments 0
You need to be logged in to leave comments.
Login now