2005-06-01 09:24:14 +04:00
|
|
|
#!/usr/bin/env python
|
2005-05-26 04:28:23 +04:00
|
|
|
#
|
2010-04-26 20:03:40 +04:00
|
|
|
# An example hgweb CGI script, edit as necessary
|
2010-07-03 04:03:55 +04:00
|
|
|
# See also http://mercurial.selenic.com/wiki/PublishingRepositories
|
2005-05-26 04:28:23 +04:00
|
|
|
|
2010-04-26 20:03:40 +04:00
|
|
|
# Path to repo or hgweb config to serve (see 'hg help hgweb')
|
|
|
|
config = "/path/to/repo/or/config"
|
2007-08-25 18:31:37 +04:00
|
|
|
|
2010-04-26 20:03:40 +04:00
|
|
|
# Uncomment and adjust if Mercurial is not installed system-wide:
|
|
|
|
#import sys; sys.path.insert(0, "/path/to/python/lib")
|
2007-08-18 13:37:08 +04:00
|
|
|
|
2008-02-12 19:07:45 +03:00
|
|
|
# Uncomment to send python tracebacks to the browser if an error occurs:
|
2010-04-26 20:03:40 +04:00
|
|
|
#import cgitb; cgitb.enable()
|
2006-12-11 16:30:50 +03:00
|
|
|
|
2010-04-26 20:03:40 +04:00
|
|
|
from mercurial import demandimport; demandimport.enable()
|
|
|
|
from mercurial.hgweb import hgweb, wsgicgi
|
|
|
|
application = hgweb(config)
|
2008-02-18 21:20:22 +03:00
|
|
|
wsgicgi.launch(application)
|