数据丢失后恢复SVN [英] Recover SVN after data loss

查看:69
本文介绍了数据丢失后恢复SVN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我和我的同事一直在为我们的项目使用SVN.过去几周来,我们一直在同一分支机构工作,并根据需要提交和合并文件.三天前,我们的SVN服务器死了,我们丢失了所有数据.我(愚蠢地)没有对单独的服务器进行定期备份,因此最好的备份是在200修订版之后.

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.

有什么方法可以使我们的签出副本全部正确合并并重新回到SVN中?

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.

推荐答案

我要做的第一步是在装有旧版工作副本的计算机上执行comand svn diff .它会创建一个差异文件,其中包含有关上次签出的当前版本的更改.

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.

第二次在已检出较新版本的计算机上复制检出的结构,并将其与崩溃的存储库断开连接(删除所有.svn元数据目录).然后将其检入新的干净存储库中.

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.

这篇关于数据丢失后恢复SVN的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆