Life is short, you need Python

利用SVNListParentPath增加http浏览仓库根目录的功能

1 利用SVNListParentPath增加http浏览仓库根目录的功能
使用SVNParentPath的时候,直接访问ParentPath的时候,总是得到以下错误提示:

403 Forbidden
Forbidden

You don't have permission to access /svn/ on this server.

下面的办法可以搞定它:

一、首先,Subversion1.3及以后版本支持SVNListParentPath ON,之前的版本只能使用PHP自己做。

二、Location 设置中最后要加上/,应该是<Location /svn/>而不是<Location /svn>否则可能不能访问。

三、通过“http://localhost/svn/” 来访问仓库列表,如果想让“http://localhost/svn”也起作用的话,需要在</Location>的后面增加重定向的设置:RedirectMatch ^(/svn)$ $1/  ,当然也可以采用RewriteEngine之类的办法。

四、修改后的httpd.conf的对应部分如下:

<Location /svn/>
   DAV svn
   SVNListParentPath on
   SVNParentPath /svnrepos
   AuthType Digest
   AuthName "Subversion repository"
   AuthUserFile /svnrepos/passwd
   AuthzSVNAccessFile /svnrepos/access
   Satisfy Any
   Require valid-user
</Location>
RedirectMatch ^(/svn)$ $1/

五、如果使用Subversion1.3以前的版本,或需要定制列表显示的话,可以自己写php脚本来控制仓库列表的显示,TotoiseSVN的帮助文件中有详细描述.(略,阅 http://www.scmbbs.com/cn/systp/2007/11/systp001.php

参考:http://blog.csdn.net/islq/archive/2006/04/17/666911.aspx
posted @ 2011-09-15 14:44  runfox545  阅读(1003)  评论(0编辑  收藏  举报
白月黑羽 Python教程 白月黑羽Python