开发者

Recover SVN after data loss

My coworker and I have been using SVN for our project. We've been working in the same branch for the past few weeks, committing and merging files as necessary. Three days ago, our SVN server died and we lost all our data. I was (stupidly) not making regular backups to a separate server, so the best backup I have is 200 revisions behind where we are.

Is there any way to get our checked-out copies all merged correctly and back into SVN?

I don't care about the 开发者_开发知识库revision history. I just want to make sure that all the code that I have is properly merged with the code that my coworker has.


A first step i would do is to perform the comand svn diff on the computer holding the older working copy revision. It creates a diff file containing the changes of the current version regarding the last check-out.

Second copy the checked out structure on the computer which has the newer revision checked-out and disconnect it from the crashed repository (remove all the .svn meta data directories). Afterwards check it in into the new clean repository.

Now take the diff file created previously and apply it on the just checked-in working copy. Hopefully you will only get some smaller conflicts which can be solved easily by you or your coworker. If all problems are solved check it in.

Note: This instructions target in creating a fully new repository. The outdated backup has not been considered.


This should help:

svnadmin recover <svn path>

OR

svnadmin verify <svn path>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜