- MacOSX 10.6.8 (Snow Leopard)
- Mercurial 2.0.1 (MacPorts)
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mercurial/templates/
/opt/local/share/mercurial/hgweb.cgi
Web画面†
ScriptAliasMatch ^/hg(.*) /Users/foo/Sites/hg/hgwebdir.cgi$1
<Directory "/Users/foo/Sites/hg">
Options ExecCGI FollowSymLinks
AllowOverride None
</Directory>
hgweb.cgi†
#!/opt/local/bin/python2.7
# Path to repo or hgweb config to serve (see 'hg help hgweb')
config = "/Users/foo/hg/hgweb.config"
# Uncomment and adjust if Mercurial is not installed system-wide
# (consult "installed modules" path from 'hg debuginstall'):
import sys; sys.path.insert(0, "/opt/local/Library/Framework/Python.framework/Version/2.7/lib")
# Uncomment to send python tracebacks to the browser if an error occurs:
#import cgitb; cgitb.enable()
from mercurial import demandimport; demandimport.enable()
from mercurial.hgweb import hgweb, wsgicgi
application = hgweb(config)
wsgicgi.launch(application)
hgweb.config†
[paths]
/iPhone = /Users/foo/iPhone/*
/AppEngine = /Users/foo/AppEngine/*