SVN UUID错误

SVN崩溃了,换了一个服务器,relocate操作时遇到“The respository at '...' has uuid '...', but the WC has '...'”的问题。 

  网上搜到同类“Repository UUID '...' doesn't match expected UUID'...'”问题 

解决方法: 

1、UUID是respository创建时自动生成的一个随机数,SVN Client利用UUID判断是否为同一个resp。一般遇到UUID不同时,需要重新Checkout. 

2、如果我们一定要改变UUID的话(这不正是我们想要的吗),注意,这是修改Server上resp的UUID: 
1.5版本之后 
Shell代码   收藏代码
  1. $ svnlook uuid /var/svn/repos  
  2. cf2b9d22-acb5-11dc-bc8c-05e83ce5dbec  
  3. $ svnadmin setuuid /var/svn/repos   # generate a new UUID  
  4. $ svnlook uuid /var/svn/repos  
  5. 3c3c38fe-acc0-11dc-acbc-1b37ff1c8e7c  
  6. $ svnadmin setuuid /var/svn/repos \  
  7.            cf2b9d22-acb5-11dc-bc8c-05e83ce5dbec  # restore the old UUID  
  8. $ svnlook uuid /var/svn/repos  
  9. cf2b9d22-acb5-11dc-bc8c-05e83ce5dbec  
  10. $  

For folks using versions of Subversion earlier than 1.5, these tasks are a little more complicated. You can explicitly set a repository's UUID by piping a repository dump file stub that carries the new UUID specification through svnadmin load --force-uuid REPOS-PATH. 
Shell代码   收藏代码
  1. $ svnadmin load --force-uuid /var/svn/repos <
  2. SVN-fs-dump-format-version: 2  
  3.   
  4. UUID: cf2b9d22-acb5-11dc-bc8c-05e83ce5dbec  
  5. EOF  
  6. $ svnlook uuid /var/svn/repos  
  7. cf2b9d22-acb5-11dc-bc8c-05e83ce5dbec  
  8. $  


3、也可以直接修改work copy的UUID。本地WC的UUID写在文件 
.svn/entries文件中 

你可能感兴趣的:(svn)