mercurial/hgweb.cgi

Tue, 28 Aug 2012 19:00:30 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 19:00:30 +0200
changeset 627
aba05e03de0f
permissions
-rw-r--r--

Patch to conform to current ISO C++ standard, resulting in a successful build.
Additionally modernize packaging in accordance with current OpenPKG boilerplate.

     1 #!@l_prefix@/bin/python
     3 import os
     4 import sys
     5 sys.path.insert(0, "@l_prefix@/lib/mercurial")
     7 from mercurial import demandimport
     8 demandimport.enable()
    10 from mercurial.hgweb import hgweb, wsgicgi
    11 if os.getenv('HGWEB_REPO_PATH', '') != '' and os.getenv('HGWEB_REPO_NAME', '') != '':
    12      application = hgweb(os.getenv('HGWEB_REPO_PATH'), os.getenv('HGWEB_REPO_NAME'))
    13 else:
    14      application = hgweb('@l_prefix@/etc/mercurial/hgweb.cfg')
    15 wsgicgi.launch(application)

mercurial