Subversion + Trac †
Subversion †
trac †
- 文字コードをutf-8に設定
- trac.iniの編集
$ cd /Users/user/var/trac/pj
$ diff -urpN conf/trac.ini~ conf/trac.ini
--- conf/trac.ini~ 2010-01-01 14:48:06.000000000 +0900
+++ conf/trac.ini 2010-01-01 14:50:35.000000000 +0900
@@ -165,7 +165,7 @@ base_url =
check_auth_ip = false
database = sqlite:db/trac.db
debug_sql = False
-default_charset = cp932
+default_charset = utf-8
htdocs_location =
ignore_auth_case = false
mainnav = wiki,timeline,roadmap,browser,tickets,newticket,search
- tracのweb設定
- buiid
$ tar vxfz mod_python-3.3.1.tgz
$ cd mod_python-3.3.1
$ ./configure
$ make
- errorで止まる
connobject.c: In function ‘_conn_read’:
connobject.c:142: error: request for member ‘next’ in something not a structure or union
apxs:Error: Command failed with rc=65536
.
make[1]: *** [mod_python.so] Error 1
make: *** [do_dso] Error 2
- patch当て
--- src/connobject.c~ 2006-12-03 13:36:37.000000000 +0900
+++ src/connobject.c 2010-01-01 00:43:55.000000000 +0900
@@ -139,7 +139,7 @@ static PyObject * _conn_read(conn_rec *c
bytes_read = 0;
while ((bytes_read < len || len == 0) &&
- !(b == APR_BRIGADE_SENTINEL(b) ||
+ !(b == APR_BRIGADE_SENTINEL(bb) ||
APR_BUCKET_IS_EOS(b) || APR_BUCKET_IS_FLUSH(b))) {
const char *data;
※「Snow Leopardにmod_pythonを導入」を参考
- /etc/apache2/users/user.conf へ下記を追記
LoadModule python_module libexec/apache2/mod_python.so
<Location /trac>
SetHandler mod_python
PythonDebug On
PythonHandler trac.web.modpython_frontend
PythonOption TracEnvParentDir /Users/user/var/trac
PythonOption TracUriRoot /trac
AuthType digest
AuthName "Realm"
AuthUserFile /User/user/.htdigest
Require valid-user
# Satisfy any
order deny,allow
allow from 192.168.1.0/24
deny from all
</Location>
#<LocationMatch "/trac/.*/login">
# AuthType digest
# AuthName "Realm"
# AuthUserFile /User/user/.htdigest
# Require valid-user
# Satisfy any
# order deny,allow
# allow from 192.168.1.0/24
# deny from all
#</LocationMatch>
- apache2 再起動
Subversion と Trac の連携 †
- /Users/user/var/svn/pj/hooks/post-comit
#!/bin/sh
TRAC_ENV="/Users/user/var/trac/pj"
SVNLOOK="/usr/bin/svnlook"
PYTHON="/usr/bin/python"
TRAC_HOOK="/Users/user/var/svn/pj/hooks/trac-post-commit-hook"
export LANG=ja_JP.UTF-8
REPOS="$1"
REV="$2"
LOG=`$SVNLOOK log -r $REV $REPOS`
AUTHOR=`$SVNLOOK author -r $REV $REPOS`
${PYTHON} ${TRAC_HOOK} \
-p "$TRAC_ENV" \
-r "$REV" \
-u "$AUTHOR" \
-m "$LOG"
- パーミッション設定等
$ sudo chown www:www /Users/user/var/svn/pj/hooks/post-comit
$ sudo chmod a+x /Users/user/var/svn/pj/hooks/post-comit
運用について †
- リポジトリにtrunk, branches, tagsを作成してみる
- 連携キーワード
fixed #xx
refs #xx
|