6 07年9月

清理svn的垃圾文件.svn文件夹

关键字:,

有时候把svn的代码传到服务器,会不小心传上svn的系统文件,这些文件都是用于版本控制的,在生产环境,总有点不爽。在linux下可以用一个命令删除,命令如下:
find . -name .svn | xargs rm -rf

上述命令要在代码所在目录运行哦。

svn的版本控制,也会有类似问题,方法类似,换一下名字,如下:

find . -name .cvs | xargs rm -rf

贝贝爸 发表在 技术文章 | 等您写评论

25 07年4月

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
<Location /svn>                                 #设置访问路径
# 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.
#<LimitExcept GET PROPFIND OPTIONS REPORT>   
#允许匿名访问,不允许Commit,不能与AuthzSVNAccessFile同时使用
Require valid-user
#</LimitExcept>
ErrorDocument 404 default
</Location>

贝贝爸 发表在 原创技术文章 | 等您写评论