contrib/hgweb.fcgi
changeset 43659 99e231afc29c
parent 15475 85cba926cb59
child 45398 d58a205d0672
equal deleted inserted replaced
43658:0796e266d26b 43659:99e231afc29c
     5 # Path to repo or hgweb config to serve (see 'hg help hgweb')
     5 # Path to repo or hgweb config to serve (see 'hg help hgweb')
     6 config = "/path/to/repo/or/config"
     6 config = "/path/to/repo/or/config"
     7 
     7 
     8 # Uncomment and adjust if Mercurial is not installed system-wide
     8 # Uncomment and adjust if Mercurial is not installed system-wide
     9 # (consult "installed modules" path from 'hg debuginstall'):
     9 # (consult "installed modules" path from 'hg debuginstall'):
    10 #import sys; sys.path.insert(0, "/path/to/python/lib")
    10 # import sys; sys.path.insert(0, "/path/to/python/lib")
    11 
    11 
    12 # Uncomment to send python tracebacks to the browser if an error occurs:
    12 # Uncomment to send python tracebacks to the browser if an error occurs:
    13 #import cgitb; cgitb.enable()
    13 # import cgitb; cgitb.enable()
    14 
    14 
    15 from mercurial import demandimport; demandimport.enable()
    15 from mercurial import demandimport
       
    16 
       
    17 demandimport.enable()
    16 from mercurial.hgweb import hgweb
    18 from mercurial.hgweb import hgweb
    17 from flup.server.fcgi import WSGIServer
    19 from flup.server.fcgi import WSGIServer
       
    20 
    18 application = hgweb(config)
    21 application = hgweb(config)
    19 WSGIServer(application).run()
    22 WSGIServer(application).run()