diff hgweb.py @ 0:be88a0c804e6

initial commit
author Robert McIntyre <rlm@mit.edu>
date Wed, 19 Oct 2011 22:15:44 -0700
parents
children dfc6cd448c24
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/hgweb.py	Wed Oct 19 22:15:44 2011 -0700
     1.3 @@ -0,0 +1,18 @@
     1.4 +#!/usr/bin/env python
     1.5 +#
     1.6 +# An example hgweb CGI script, edit as necessary
     1.7 +# See also http://mercurial.selenic.com/wiki/PublishingRepositories
     1.8 +
     1.9 +# Path to repo or hgweb config to serve (see 'hg help hgweb')
    1.10 +config = "/home/r/proj/bortreb/hgweb.config"
    1.11 +
    1.12 +# Uncomment and adjust if Mercurial is not installed system-wide:
    1.13 +#import sys; sys.path.insert(0, "/path/to/python/lib")
    1.14 +
    1.15 +# Uncomment to send python tracebacks to the browser if an error occurs:
    1.16 +#import cgitb; cgitb.enable()
    1.17 +
    1.18 +from mercurial import demandimport; demandimport.enable()
    1.19 +from mercurial.hgweb import hgweb, wsgicgi
    1.20 +application = hgweb(config)
    1.21 +wsgicgi.launch(application)