subversion “Propfind 302 found” error


svn服务出了问题,可以checkout,已经存在的文件,可以修改,提交,但是新加的文件add后不能commit。
报错说什么”Propfind xxx 302 found”

Adding: D:\workspace\test\New Text Document.txt
Error: Commit failed (details follow):
Error: PROPFIND request failed on ‘/svn/test/New%20Text%20Document.txt’
Error: PROPFIND of ‘/svn/test/New%20Text%20Document.txt’: 302 Found (http://svn.test.com)

google了一下,说是启用了ErrorDocument 404 handler 就会遇到这个问题,需要禁用Subversion目录特殊的404 error handling,
解决方法是添加
ErrorDocument 404 default
到svn的Location立面

改了之后,httpd.conf里面的svn配置大概如下:

LoadModule dav_svn_module modules/mod_dav_svn.so
LoadModule authz_svn_module modules/mod_authz_svn.so
#设置访问路径
# Uncomment this to enable the repository,
DAV svn
# Set this to the path to your repository
SVNParentPath /data/svn_repository/
# The following allows for basic http authentication. Basic authentication
# should not be considered secure for any particularly rigorous definition of
# secure.
# to create a passwd file #按下面的步骤创建Apache用户验证文件
# # rm -f /etc/apache2/dav_svn.passwd
# # htpasswd2 -c /etc/apache2/dav_svn.passwd dwhedon
# New password:
# Re-type new password:
# Adding password for user dwhedon
#

# Uncomment the following 3 lines to enable Basic Authentication
AuthType Basic
AuthName “Subversion Repository”
AuthUserFile conf/extra/svnpasswd.file
# Uncomment the following line to enable Authz Authentication
AuthzSVNAccessFile conf/extra/dav_svn.authz
# The following three lines allow anonymous read, but make
# committers authenticate themselves.
#
#允许匿名访问,不允许Commit,不能与AuthzSVNAccessFile同时使用
Require valid-user
#

ErrorDocument 404 default


发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据