recreating svn repository

萝らか妹 提交于 2019-12-06 21:10:50

问题


after a major server fault, svn repository was destroyed and my working version is most current one,

what is the way to recreate svn repository from my working version?

after installing svn on a new server and trying at my working copy

 svn switch NEW_SVN_PATH .

i get an error

 Repository UUID '1c604742-6b16-462b-86e4-cc8bce959242' doesn't match expected UUID '6df69aeb-a72c-450d-8102-24036a3855f7'

回答1:


  1. The development history that was stored in your old repository is lost.

  2. You can create a new repository with the current contents of your working copy, but this will truly be a new repository. You can't switch to it, not even with --relocate.

If you've already managed to import the contents of your working copy into the new repository, you just need to check it out. If not:

svn export WORKING_COPY WORKING_COPY.export  # the exported copy will contain no .svn dirs
svn import WORKINGCOPY.export svn://example.com/new-repository
svn checkout svn://example.com/new-repository NEW_WORKING_COPY



回答2:


If you wish to recover your history, you are out of luck... SVN history is kept in the repository, not the working copies...

If you want to start a new repo with the data in your working copy (just the files, not the history) you can do that with svn import and svn export:

svn export <wc-path> <clean-dir-path>
svn import <clean-dir-path> <empty-repo-url>



回答3:


I would clear out the .svn folders in your working folder before (doing what others suggesting) creating a new repo. I'm only saying this because I've had a couple of problems in the past that confused either my new repo or my client. Good luck!



来源:https://stackoverflow.com/questions/1293692/recreating-svn-repository

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!