gongshijun00 2010-05-04
SVN崩溃了,换了一个服务器,relocate操作时遇到“Therespositoryat'...'hasuuid'...',buttheWChas'...'”的问题。
网上搜到同类“RepositoryUUID'...'doesn'tmatchexpectedUUID'...'”问题
解决方法:
1、UUID是respository创建时自动生成的一个随机数,SVNClient利用UUID判断是否为同一个resp。一般遇到UUID不同时,需要重新Checkout.
2、如果我们一定要改变UUID的话(这不正是我们想要的吗),注意,这是修改Server上resp的UUID:
1.5版本之后
$ svnlook uuid /var/svn/repos cf2b9d22-acb5-11dc-bc8c-05e83ce5dbec $ svnadmin setuuid /var/svn/repos # generate a new UUID $ svnlook uuid /var/svn/repos 3c3c38fe-acc0-11dc-acbc-1b37ff1c8e7c $ svnadmin setuuid /var/svn/repos \ cf2b9d22-acb5-11dc-bc8c-05e83ce5dbec # restore the old UUID $ svnlook uuid /var/svn/repos cf2b9d22-acb5-11dc-bc8c-05e83ce5dbec $
ForfolksusingversionsofSubversionearlierthan1.5,thesetasksarealittlemorecomplicated.Youcanexplicitlysetarepository'sUUIDbypipingarepositorydumpfilestubthatcarriesthenewUUIDspecificationthroughsvnadminload--force-uuidREPOS-PATH.
$ svnadmin load --force-uuid /var/svn/repos <<EOF SVN-fs-dump-format-version: 2 UUID: cf2b9d22-acb5-11dc-bc8c-05e83ce5dbec EOF $ svnlook uuid /var/svn/repos cf2b9d22-acb5-11dc-bc8c-05e83ce5dbec $
3、也可以直接修改workcopy的UUID。本地WC的UUID写在文件
.svn/entries文件中