svn - Tortoise SVN 服务器重建
问题描述
我相信我的条款是正确的,但如果我以任何方式滥用它们,请告诉我。
不久前,我在我的桌面上构建了一个 VisualSVN 存储库,我的桌面和笔记本电脑上有一个工作副本,用于在两者之间同步文件。我最近重建了我的桌面并且没有备份存储库文件夹,只是工作副本文件夹。
重建存储库的最佳方法是什么,以便我可以再次开始同步文件?是否只是创建一个新文件夹并签出新的仓库,然后将旧文件导出到新文件夹中,并执行 SVN 更新?如果可能,我想访问以前的文件版本,但如果没有,那也很好。
解决方案
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.
推荐阅读
- mysql - Web Service 无法连接到 Amazon Web Services 托管的 mySql
- javascript - 如何获取当前地图坐标?
- php - WooCommerce 产品 - 数量变化时显示价格
- python - ValueError:无法组装日期时间:时间数据 1 与格式“%Y%m%d”不匹配(匹配)
- java - 如何在java中读取超过100000行的excel文件?
- spring - ManyToMany 强制唯一索引
- java - Activity A 中的方法在 Activity B 中调用,而 Activity A 完成
- python - os.getcwd() 的 python unittest 值在运行单个测试与整体运行 pytest 时发生变化
- laravel - 在编辑器中打开图像时出现跨源问题
- python - Pillow python:提高脚本性能