Mercurial リポジトリ構築
書き途中。あとで整形する。
mercurialのユーザの設定とかの手順が抜けてる。
sudo mkdir /var/www/cgi-hg
sudo vi /var/www/cgi-hg/index.cgi
内容は下記(サンプル)
#!/usr/bin/env python
#
# An example CGI script to use hgweb, edit as necessary
# adjust python path if not a system-wide install:
import sys
sys.path.insert(0, "/usr/lib/python2.4/site-packages")
# enable importing on demand to reduce startup time
from mercurial import demandimport; demandimport.enable()
# Uncomment to send python tracebacks to the browser if an error occurs:
#import cgitb
#cgitb.enable()
# If you'd like to serve pages with UTF-8 instead of your default
# locale charset, you can do so by uncommenting the following lines.
# Note that this will cause your .hgrc files to be interpreted in
# UTF-8 and all your repo files to be displayed using UTF-8.
#
import os
os.environ["HGENCODING"] = "UTF-8"
from mercurial.hgweb.hgweb_mod import hgweb
import mercurial.hgweb.wsgicgi as wsgicgi
application = hgweb("/data/repos/hg", "HG First Repos")
wsgicgi.launch(application)
その後、
sudo chmod 755 /var/www/cgi-hg/index.cgi
sudo cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.orig
sudo vi /etc/httpd/conf/httpd.conf
としてhttpd.confの末尾に
Alias /hg /var/www/cgi-hg
<Directory "/var/www/cgi-hg">
DirectoryIndex index.cgi
AddHandler cgi-script .cgi
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
を追加。
mkdir /data/repos/hg
cd /data/repos/hg
hg init
でhttpdをリスタート。
閲覧数: -
更新日:2008-08-16 23:47:54 (Sat)
&link_trackback(text=トラックバック元一覧:表示する)
リンク元一覧:
#ref_list
最終更新:2008年08月16日 23:47