数据丢失后恢复SVN

发布于 2024-10-14 23:22:24 字数 218 浏览 3 评论 0原文

我和我的同事一直在我们的项目中使用 SVN。过去几周我们一直在同一个分支工作,根据需要提交和合并文件。三天前,我们的 SVN 服务器死机了,我们丢失了所有数据。我(愚蠢地)没有定期备份到单独的服务器,所以我拥有的最好的备份是落后我们 200 个版本。

有没有办法让我们签出的副本全部正确合并并返回到 SVN 中?

我不关心修订历史。我只是想确保我拥有的所有代码都与我同事拥有的代码正确合并。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

〆一缕阳光ご 2024-10-21 23:22:24

我要做的第一步是在保存旧工作副本修订版的计算机上执行命令svn diff。它创建一个 diff 文件,其中包含有关上次签出的当前版本的更改。

其次,在签出较新版本的计算机上复制签出的结构,并将其与崩溃的存储库断开连接(删除所有 .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.

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.

近箐 2024-10-21 23:22:24

这应该有帮助:

svnadmin recover <svn path>

或者

svnadmin verify <svn path>

This should help:

svnadmin recover <svn path>

OR

svnadmin verify <svn path>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文