SVN 常见问题集锦和原因分析

svn问题  

1. 路由器审计策略将3690识别成p2p下载流,被路由器阻断

将策略去除或者过白服务器即可

2.SVN服务器负载过高,同时提交或下载的人过多

优化服务器性能,升级配置,或者等待人少时操作

3. 部分文件场景,冲突

执行revert

4.解决svn update 产生Node remains in conflict的问题

[root@localhost svnrepos]# svn up .
Updating '.':  
Skipped 'pythonresource.txt' -- Node remains in conflict  
At revision 14.  
Summary of conflicts:  
Skipped paths: 1  

解决办法是:

[root@localhost svnrepos]svn revert --depth=infinity pythonresource.txt 
Reverted 'pythonresource.txt'  
[root@localhost svnrepos] svn up pythonresource.txt
Reverted 'pythonresource.txt'  

再次在本地编辑pythonresource.txt,commit后,到web服务器里,svn up pythonresource.txt ,一切正常。 或者在本地copy pythonresource.txt到其他目录,commit ,然后copy pythonresource.txt 到原来的目录,再次commit 后。在http服务器就不会报错了。

5.SVN版本库修改URL路径或者IP地址

  • Windows TortoiseSVN客户端

    • 在工作复本的根目录上右键->TortoiseSVN->重新定位(Relocate),然后修改URL, 
  • Mac OS或Linux客户端: 

    • 命令
svn sw --relocate svn://old_ip/目录 svn://new_ip/目录
  • 例如
svn sw --relocate svn://svn.imdst.com/test/  http://svn.imdst.com/test/  
Authentication realm: <http://svn.imdst.com:80> Authorization SVN OF TEST  
Password for 'root':  
Authentication realm: <http://svn.imdst.com:80> Authorization SVN OF TEST  
Username: readonly  
Password for 'readonly': 

-----------------------------------------------------------------------
ATTENTION!  Your password for authentication realm:

   <http://svn.imdst.com:80> Authorization SVN OF TEST

can only be stored to disk unencrypted!  You are advised to configure  
your system so that Subversion can store passwords encrypted, if  
possible.  See the documentation for details.

You can avoid future appearances of this warning by setting the value  
of the 'store-plaintext-passwords' option to either 'yes' or 'no' in  
'/root/.subversion/servers'.  
-----------------------------------------------------------------------
Store password unencrypted (yes/no)?  

6. svn: E200014: Checksum mismatch for (谨慎操作,切记先备份)

svn: E200014: Checksum mismatch for 'bala/bala/bala目录+文件':  expected:  ede36171fde5dfa11504b90690fb5ce6  
actual:  9e9a1fa06031710331951a1078f1aaf0  
  • 意思就是本地文件的标识与远程不一致,解决方法入下:先在错误文件所在目录执行:
svn update --set-depth empty  
  • 注意:此方法会删除此目录中的所有文件,避免万一,请主动备份、备份、备份,然后。。。。文件没了,再执行:
svn update --set-depth infinity  

7. sqlite[S11]: database disk image is malformed

  • 处理方法一
打开命令(cmd)行工具,linux也一样 cd 项目目录的下,和.svn的同级目录
运行一下命令(windows,linux 通用)
sqlite3 .svn/wc.db "pragma integrity_check"  
sqlite3 .svn/wc.db "reindex nodes"  
sqlite3 .svn/wc.db "reindex pristine"  
  • 处理方法二
拷贝其他同事的 .svn文件下 wc.db 的数据库,或者 SVN 服务端的 client 的 wc.db
备份儿,重新 checkout 吧

8. SVN UUID更新

  • 1.首先查看项目的所有者的uuid
svnlook uuid /var/svn/repos  
ef03d3d0-ba5c-4b15-b44b-085f976f87c4  
  • 2.更新项目的uuid
svnadmin setuuid /var/svn/repos ef03d3d0-ba5c-4b15-b44b-085f976f87c4  
  • 3.查看一下更新uuid的结果
svnlook uuid /var/svn/repos  
ef03d3d0-ba5c-4b15-b44b-085f976f87c4