Subversion 无法读取文件中的长度行

发布于 2024-10-12 04:37:48 字数 136 浏览 5 评论 0原文

当我提交时我没有错误。现在我尝试检查并收到此错误

Can't read length line in file 'c:\svn\db\revs\0\14'

我已经尝试了旧版本,但它也不起作用。这是否意味着我在颠覆中失去了一切?

When I commit I had no error. Now I tried to check out and I got this error

Can't read length line in file 'c:\svn\db\revs\0\14'

I have tried older revision it doesn't work either. Does it mean I lost everything in subversion ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

不美如何 2024-10-19 04:37:48

您可以运行

svnadmin verify /var/svn/repo

来检查您的存储库。

如果您使用 Berkeley db(您不应该),

svnadmin recover /var/svn/repo

可能会有所帮助。

You can run

svnadmin verify /var/svn/repo

to check your repository.

In case you use Berkeley db (you shouldn't),

svnadmin recover /var/svn/repo

may help.

幸福丶如此 2024-10-19 04:37:48

我遇到了同样的问题,这是我在不管理 SVN 存储库的情况下发现的简单修复。

  1. 该错误是由我必须提交的特定文件产生的。
  2. 我提交了所有其他更改的文件 好的,
  3. 我将本地文件复制到桌面作为备份
  4. SVN->删除文件
  5. 提交文件夹。已成功
  6. 将文件从桌面添加到本地文件夹
  7. svn ->添加、svn->提交

问题已修复。我认为这样您就可以从存储库中丢失该文件的先前版本,但这对我来说不是问题。

希望这些信息可以帮助您。

I had the same problem and here is simple fix I found without administering the SVN repository.

  1. the error was produced by a specific file that I had to commit.
  2. I committed all other changed files Ok
  3. I copied the local file to the desktop as a backup
  4. SVN->Delete file
  5. commit the folder. It was successful
  6. added the file from the desktop in the local folder
  7. svn -> add, svn->commit

problem fixed. I think this way you loose the previous versions of the file from the repository but this was not a problem for me.

Hope this info can help you.

╰ゝ天使的微笑 2024-10-19 04:37:48

看来 Berkeley 数据库已损坏,下次您应该使用 FSFS 后端。现在请参阅 Berkeley DB 恢复< /a>.

Looks like Berkeley database have been corrupted, you should use FSFS backend next time. For now see Berkeley DB Recovery.

一场春暖 2024-10-19 04:37:48

这似乎是 SVN 错误或某些硬件故障。我会开始寻找备份。
如果您没有 - 您可以将本地工作副本提交到新存储库中。

This seems to be SVN bug or some H/W failure. I would start looking for a backup.
If you don't have one - you can commit your local working copy in new repository.

打小就很酷 2024-10-19 04:37:48

看起来您的修订版之一的数据库已损坏。

因此,首先您可以更新到以前的版本并更改数据库中的最后一个版本:

svn update -r99
vi /var/svn/site/db/current
[change number to "99"]

然后您必须找出哪个目录被破坏并在存储库中替换它。
[损坏] - 损坏目录的名称。

cd /var/www/site/
svn delete --keep-local [corrupted]
svn ci [corrupted] -m "Remove corrupted directory from repository"
rm -rf `find /[corrupted] -name .svn`
svn add [corrupted]
svn ci [corrupted] -m "Add fixed directory"

Looks like db have been corrupted for one of your revision.

So, at first you can update to previous revision and change last revision in db:

svn update -r99
vi /var/svn/site/db/current
[change number to "99"]

Than you must find out what directory is broken and replace it in repository.
[corrupted] - name of your corrupted directory.

cd /var/www/site/
svn delete --keep-local [corrupted]
svn ci [corrupted] -m "Remove corrupted directory from repository"
rm -rf `find /[corrupted] -name .svn`
svn add [corrupted]
svn ci [corrupted] -m "Add fixed directory"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文