trac 与 VisualSVN Server. 集成


Please note that Trac plugin for VisualSVN Server was never released officially and you can use it on your own risk.
We do not plan to update the plug-in on a regular basis.

1.    Download VisualSVN Server 2.5.4 or later. (必须的,旧版不兼容)

2.    Install it using default settings. (默认安装)

3.    Create repository "MyProject" in VisualSVN Server Manager. (假设你的代码仓库名是MyProject)

4.    Create at least one user if you use Subversion authentication. (svn那边最少也配一个用户)

5.    Download VisualSVN-Server-2.5.4.28066-Trac-0.12.3.zip (~16MB). (集成用的trac安装包)

6.    Unzip it to %VISUALSVN_SERVER% folder (%XX%是系统变量,你装完svn server自然会有)

7.    Create folder C:\Trac (必须手动创建,也可以不创建在这里)

8.    Allow "Full Control" access to C:\Trac folder for built-in Network Service account (or other account that is used to run VisualSVN Server's service). (如果你都配对了,但是还是不能用,再回头检查这里。)

9.    Execute command:
"%VISUALSVN_SERVER%trac\trac-admin.bat" C:\Trac\MyProject initenv
Use default settings. Provide C:\Repositories\MyProject as repository path.

10.    Execute the following command to add MyProject Subversion repository to the Trac:
"%VISUALSVN_SERVER%trac\trac-admin.bat" c:\Trac\MyProject repository add MyProject C:\Repositories\MyProject svn

11.    Add the following command to the MyProject repository post-commit hook:
@"%VISUALSVN_SERVER%trac\trac-admin.bat" C:\Trac\MyProject changeset added "%1" "%2"

 
12.    Add the following command to the MyProject repository post-revision property change hook:
@"%VISUALSVN_SERVER%trac\trac-admin.bat" C:\Trac\MyProject changeset modified "%1" "%2"


13.    添加系统的环境变量:
PYTHONHOME=C:\Program Files (x86)\VisualSVN Server\trac\python
The path may be different depending on where VisualSVN Server is installed. Please check the %VISUALSVN_SERVER% environment variable for a hint.

14.    Add the following text to file %VISUALSVN_SERVER%conf\httpd-custom.conf if you use Subversion authentication:
(如果你用svn自带的认证,用下面这段)
LoadModule python_module "trac/python/mod_python_so.pyd"
LoadModule authz_user_module bin/mod_authz_user.so
<Location /trac>
  SetHandler mod_python
  PythonInterpreter main_interpreter
  PythonHandler trac.web.modpython_frontend
  PythonOption TracEnvParentDir C:\Trac
  PythonOption TracUriRoot /trac

  AuthName "Trac"
  AuthType Basic
  AuthBasicProvider file
  AuthUserFile "C:/Repositories/htpasswd"

  Require valid-user
</Location>


or this text if you use Windows authentication:
(用windows认证,则用下面这段)
LoadModule python_module "trac/python/mod_python_so.pyd"
LoadModule authz_user_module bin/mod_authz_user.so
<Location /trac>
  SetHandler mod_python
  PythonInterpreter main_interpreter
  PythonHandler trac.web.modpython_frontend
  PythonOption TracEnvParentDir C:\Trac
  PythonOption TracUriRoot /trac

  AuthName "Trac"
  AuthType VisualSVN

  # Set the option's value to on if Windows Basic Authentication
  # is enabled, otherwise set it to off.
  AuthnVisualSVNBasic on

  # Set the option's value to on if Windows Integrated Authentication
  # (available in the Enterprise Edition) is enabled, otherwise set it to off.
  AuthnVisualSVNIntegrated on

  Require valid-user
</Location>

15.    Stop and then Start VisualSVN Server.
(重启服务)

16.    Open http://localhost/trac/ or https://localhost/trac/ (if you setup secure connections) in a browser and enter user name and password.

 

2012-06-21 update:

如果服务器整合好以后,之前就有代码仓库,但是web接口却说没有,可以用下面的命令同步一下:

"%VISUALSVN_SERVER%trac\trac-admin.bat" c:\Trac\MyProject repository resync MyProject

转载于:https://my.oschina.net/rinehart/blog/63116

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值