从 svn 客户端签出重新创建 subversion 存储库
我的第一个问题在这里。
Subversion 存储库已删除,但存在从该存储库进行的签出。我将如何从结帐重建存储库?
My first question here.
The subversion repository was deleted but there exists a checkout made from that repository. How would I go about rebuilding the repository from the checkout?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以将该签出导出到新位置,然后将其全部添加到新存储库。但你无法恢复历史。
You could svn export that checkout to a new location, and then add it all to a new repository. But you cannot get the history back.
与 Git 不同,Subversion 不会在每台计算机上存储整个存储库。您拥有的是一个工作文件夹,该文件夹对于该存储库的某个版本来说是最新的。
正如 @marcc 所建议的,最好的办法是从现有工作文件夹创建新的存储库。
不过,如果您使用 TortoiseSVN,您也许能够恢复一些提交日志消息。较新版本的 TortosieSVN 维护日志缓存,如果您无法连接到存储库,您仍然可以浏览离线缓存。出于历史目的剪切并粘贴该信息(或截取屏幕截图),但这不会有多大作用,因为无论如何您都无法再恢复到这些修订。
Unlike Git, Subversion does not store the entire repository on each machine. What you have is a working folder that is up to date for a certain revision of that repository.
As @marcc suggested, the best thing to do is to create new repository from the existing working folder.
If you use TortoiseSVN, though, you may be able to recover some of the commit log messages. Newer versions of TortosieSVN maintain a log cache, and if you are unable to connect to the repository you will still be able to browse the offline cache. Cut and paste that info (or take a screen shot) for historical purposes, but it will not do much good since you can no longer revert to those revisions anyway.
您无法通过签出重新创建存储库。您可以创建一个新的存储库,但它不会包含已删除的存储库中的任何历史记录。您可以从备份重新创建旧存储库。你有备份,对吧?
You can not recreate the repository from a checkout. You can create a new repository, but it will not have any of the history in the one that was deleted. You can recreate your old repository from a backup. You have a backup, right?
您将丢失所有历史记录,但只需删除所有 .svn 目录、创建新存储库并添加/导入所有先前签出的文件即可使项目恢复版本控制。
然而,历史已经完全消失了。如果这就是您所需要的,那么……再搜索一下这些备份磁带。
You'll lose all history, but simply removing all the .svn directories, create a new repository and add/import all the previously checked out files will get the project back in version control.
The history, though, is flat-out gone. If that's what you need, then ... search for those backup tapes a little longer.