破碎的乌龟 SVN 存储库
我在旧计算机上有一些存储库(现在已经格式化),但我犯了一个错误,只是复制它们。现在我有一堆存储库,但无法进行任何结账。当我尝试时,我收到“没有此类修订”错误,每个存储库都有不同的数字。在某些情况下(我不明白为什么)在错误发生之前它会检查一些文件夹。
有什么办法可以恢复存储库吗?
谢谢!
I'd some repositories in my old computer (which now it was already formatted) and I made the mistake of just copying them. Now I have a bunch of repositories and I'm not able to make any checkout. When I try I get the "no such revision" error with different numbers for each repository. In some cases (I can't figure out why) before the error it gets to checkout a few folders.
Is there any way I can recover the repositories?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我遇到了同样的问题,提交后我无法访问我的本地网络驱动器存储的用 tortoise 创建的 SVN 存储库。
我收到“没有这样的修订版 108”。
我花了一段时间才使用 WinMerge 将空存储库与旧存储库进行比较,并开始系统地删除文件,直到乌龟给了我任何东西。首先只有一个空存储库,然后我发现了问题...
出于某种原因,乌龟在本地存储库中做的第一件事是将“db/current”文件中的当前修订号更新为最新的修订号,而不是分配新的修订文件并填充数据。如果进程被中断并且“当前”指向无效或不存在的修订号,就会出现问题。
长话短说:
我能够通过将给定编号的“db/current”文件编辑为有效修订版来“恢复”我的存储库(您可以在“revs/0/xxx”下找到有效编号,其中 xxx 是最新的。
这仅适用于本地创建的存储库,
为了将来解决这个问题,我强烈建议您按照我的做法进行操作:
不要将每个项目存储在一个存储库中,而是为每个项目创建具有简单的主干/分支/标签结构的不同存储库,这样损坏将被隔离到一个项目。
另请注意,通过将当前修订版编辑为有效修订版意味着您可能会丢失数据(最新提交或更新将丢失),我可以找到一种方法来恢复它。
但没有深入研究,因为我只损失了几个小时的工作。
希望能帮助到很多有同样痛苦的人。。
I had the same problem, after a commit i was unable to reach my local network drive stored SVN repository created with tortoise.
I got "No such revision 108".
It took me a while since I diffed an empty repository with my old one using WinMerge and started systematically delete files till tortoise gave me anything. First only an empty repository then i found the problem...
For some reason the first thing tortoise does in local repository is that it updates the current revision number within "db/current" file to the newest one than it allocates the new revision file and fills with the data. The problem comes if the process is interrupted and the "current" points to an invalid or not existing revision number.
So long story short:
I was able to "recover" my repository by editing the "db/current" file given number to a valid revision (you can find a valid number under "revs/0/xxx" where xxx is the latest.
That's only true for locally created repositories.
To overcome this problem in the future I strongly suggest you to do the same as I've done:
instead of storing every project within one repository, create distinct repositories with simple trunk/branches/tags structure for each project, this way the corruption will isolated to one project.
Also note that by editing the current revision to a valid one means that you will probably lose data (the latest commit or update will be lost), I could find a way to restore that.
But didn't dig into cause I only lost a few hours of work.
Hope it helps many suffering of the same..
我想我误解了这个问题。如果存储库是服务器存储库,您可以使用 svnadmin dump:
http://svnbook.red-bean.com/en/1.7/svn.ref.svnadmin.c.dump.html
原始答案:
您还能“导出”存储库吗?
如果没有,您可以手动删除所有 .svn 文件夹。
http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn- dug-export.html
I think I misunderstood the question. If the repositories are the server repositories, you can use
svnadmin dump
:http://svnbook.red-bean.com/en/1.7/svn.ref.svnadmin.c.dump.html
original answer:
Can you still 'export' the repo's?
If not, you can remove all of the .svn folders manually.
http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-export.html