#!/usr/bin/env python
from mercurial import demandimport; demandimport.enable()
import cgitb; cgitb.enable()
import os; os.environ["HGENCODING"] = "UTF-8"
from mercurial.hgweb.hgwebdir_mod import hgwebdir
from mercurial.hgweb.request import wsgiapplication
import mercurial.hgweb.wsgicgi as wsgicgi
def make_web_app():
return hgwebdir({
'name1': '/path/to/the/repository',
'name2': '/path/to/the/repository',
})
wsgicgi.launch(wsgiapplication(make_web_app))
只要把這個檔存在 public_html 裡面,就可以發佈 mercurial repository 了。
如果需要 push,就再加上 .htaccess,override 掉 auth,同時建個 htpasswd 檔,再修改 repository 裡的 .hg/hgrc。
Posted by yungyuc
at 10:18,
0 comment,
0 trackback.
Navigate
- Previous: 簡體字大歡迎 @2008/03/22
- Next: Mercurial 1.0 @2008/03/25
Add a trackback
Please send trackback to: http://blog.seety.org/everydaywork/2008/3/23/1004/trackback/.
Add a comment

