Mercurial

Tag: Mercurial

情報

設定

MacOSX

動作環境

パス

/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

Apache連携

Apache設定

ScriptAliasMatch ^/hg(.*) /path/to/script/hgweb.cgi$1
 
<Directory "/Users/foo/Sites/hg">
    Options ExecCGI FollowSymLinks
    AllowOverride None
</Directory>
 
<Location /hg>
   AuthType Basic
   AuthName "Mercurial Repository"
   AuthUserFile /path/to/data/users
   <LimitExcept GET PROPFIND OPTIONS REPORT>
      Require valid-user
   </LimitExcept>
</Location>

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/*

Trac連携


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS