Mercurial > bortreb
changeset 0:be88a0c804e6
initial commit
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Wed, 19 Oct 2011 22:15:44 -0700 |
parents | |
children | 7ac5f81af66d |
files | hgweb.config hgweb.py |
diffstat | 2 files changed, 26 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/hgweb.config Wed Oct 19 22:15:44 2011 -0700 1.3 @@ -0,0 +1,8 @@ 1.4 + 1.5 +[paths] 1.6 +#cortex = /home/r/proj/cortex 1.7 +pygar = /home/r/proj/pygar 1.8 + 1.9 + 1.10 +[web] 1.11 +baseurl = /
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/hgweb.py Wed Oct 19 22:15:44 2011 -0700 2.3 @@ -0,0 +1,18 @@ 2.4 +#!/usr/bin/env python 2.5 +# 2.6 +# An example hgweb CGI script, edit as necessary 2.7 +# See also http://mercurial.selenic.com/wiki/PublishingRepositories 2.8 + 2.9 +# Path to repo or hgweb config to serve (see 'hg help hgweb') 2.10 +config = "/home/r/proj/bortreb/hgweb.config" 2.11 + 2.12 +# Uncomment and adjust if Mercurial is not installed system-wide: 2.13 +#import sys; sys.path.insert(0, "/path/to/python/lib") 2.14 + 2.15 +# Uncomment to send python tracebacks to the browser if an error occurs: 2.16 +#import cgitb; cgitb.enable() 2.17 + 2.18 +from mercurial import demandimport; demandimport.enable() 2.19 +from mercurial.hgweb import hgweb, wsgicgi 2.20 +application = hgweb(config) 2.21 +wsgicgi.launch(application)