Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

recreating svn repository

Tags:

repository

svn

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'
like image 926
Pavel K. Avatar asked Aug 18 '09 13:08

Pavel K.


2 Answers

  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
like image 190
bendin Avatar answered Oct 26 '22 09:10

bendin


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>
like image 36
R. Martinho Fernandes Avatar answered Oct 26 '22 11:10

R. Martinho Fernandes