首页 > 解决方案 > Tortoise SVN 服务器重建

问题描述

我相信我的条款是正确的,但如果我以任何方式滥用它们,请告诉我。

不久前,我在我的桌面上构建了一个 VisualSVN 存储库,我的桌面和笔记本电脑上有一个工作副本,用于在两者之间同步文件。我最近重建了我的桌面并且没有备份存储库文件夹,只是工作副本文件夹。

重建存储库的最佳方法是什么,以便我可以再次开始同步文件?是否只是创建一个新文件夹并签出新的仓库,然后将旧文件导出到新文件夹中,并执行 SVN 更新?如果可能,我想访问以前的文件版本,但如果没有,那也很好。

标签: svntortoisesvnvisualsvn-servervisualsvn

解决方案


Unlike git, svn is centralised repository which means all revision information are kept on server side, in your case - the repository folder you didn't backup. If you are lucky you may have some cached log from your working folder, this might work differently depends on what is your working folder format, however retrieving those revisions to replicate then in your new repository would be very difficult, but I suggest at least take a screen shot of the cached log for reference.

About building new one, yes you are right, create new repo, checkout the empty folder, export from your old working folder and then commit, update won't be necessary given it's new repository and you alright committed, you would need to perform new clean checkout from other machine.

My suggestion is, keep your repo somewhere else, there should be some providers there provide free hosting if your code base is not too big. If you worry about the hosting reliability, switch to using git, with git you can replicate everything from a local working folder backup, as it's decentralised.


推荐阅读