开发者

Subversion Can't read length line in file

开发者 https://www.devze.com 2023-02-04 21:52 出处:网络
When I commit I had no error. Now I tried to check out and I got this error Ca开发者_高级运维n\'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

Ca开发者_高级运维n'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 ?


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.


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.


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


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.


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"
0

精彩评论

暂无评论...
验证码 换一张
取 消