SVN“格式错误的文件”损坏的存储库
我今天遇到了一个损坏的存储库的问题。
svn log 给了我“格式错误的文件”错误,即使 svnadmin verify 说一切正常。
当您的源历史记录消失时,这总是很糟糕,所以我也会发布一个答案,以防它对某人有帮助。
I had a problem with a corrupt repository today.
svn log gave me "Malformed file" errors even though svnadmin verify said everything was OK.
It's always bad when your source history is gone so I'll also post an answer in case it helps someone.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
备份您的存储库!
注意它能够转储的最后一个版本(例如99),下一个版本有错误(例如100)。
如果它包含垃圾或 NUL,您可以修复它:
再次运行“svnadmin dump REPOSPATH > nul” - 它应该完成且没有错误
Backup your repository!
Note the last revision it was able to dump (eg. 99), the next one has the error (e.g. 100).
If it contains garbage or NULs you can fix it:
run "svnadmin dump REPOSPATH > nul" again - it should finish without errors
@laktak 的解决方案在大多数情况下在 props 损坏时有效,但在 @jgifford25 指出的实际 rev 文件时无效。
理想的解决方案是:
与团队共享新存储库 URL 或删除现有存储库并使用相同的路径。
此外,您可以添加在无效修订后提交的有效变更集。
@laktak's solution work in most cases when props are corrupted, but not when the actual rev file as pointed by @jgifford25.
An ideal solution would be to:
Share the new Repo URL with a team or delete existing repo and use the same path.
Additionally, you can add valid changesets committed after Invalid revision.