Mercurial > hg
annotate hgweb.cgi @ 3491:23cffef5d424
Split branchtags into two additional functions.
This makes it easier to override only parts of the cache saving process.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Mon, 23 Oct 2006 23:32:56 -0300 |
parents | d0db3462d568 |
children | 713e35dcc321 |
rev | line source |
---|---|
202 | 1 #!/usr/bin/env python |
159 | 2 # |
3 # An example CGI script to use hgweb, edit as necessary | |
4 | |
5 import cgitb, os, sys | |
391
5f65a108a559
hgweb: pull cgitb into CGI script example, where it can easily be disabled
mpm@selenic.com
parents:
202
diff
changeset
|
6 cgitb.enable() |
5f65a108a559
hgweb: pull cgitb into CGI script example, where it can easily be disabled
mpm@selenic.com
parents:
202
diff
changeset
|
7 |
159 | 8 # sys.path.insert(0, "/path/to/python/lib") # if not a system-wide install |
2506
d0db3462d568
This patch make several WSGI related alterations.
Eric Hopper <hopper@omnifarious.org>
parents:
391
diff
changeset
|
9 from mercurial.hgweb.hgweb_mod import hgweb |
d0db3462d568
This patch make several WSGI related alterations.
Eric Hopper <hopper@omnifarious.org>
parents:
391
diff
changeset
|
10 from mercurial.hgweb.request import wsgiapplication |
d0db3462d568
This patch make several WSGI related alterations.
Eric Hopper <hopper@omnifarious.org>
parents:
391
diff
changeset
|
11 import mercurial.hgweb.wsgicgi as wsgicgi |
159 | 12 |
2506
d0db3462d568
This patch make several WSGI related alterations.
Eric Hopper <hopper@omnifarious.org>
parents:
391
diff
changeset
|
13 def make_web_app(): |
d0db3462d568
This patch make several WSGI related alterations.
Eric Hopper <hopper@omnifarious.org>
parents:
391
diff
changeset
|
14 return hgweb("/path/to/repo", "repository name") |
d0db3462d568
This patch make several WSGI related alterations.
Eric Hopper <hopper@omnifarious.org>
parents:
391
diff
changeset
|
15 |
d0db3462d568
This patch make several WSGI related alterations.
Eric Hopper <hopper@omnifarious.org>
parents:
391
diff
changeset
|
16 wsgicgi.launch(wsgiapplication(make_web_app)) |