7

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 ?

3
  • I fail to see how this is programming-related.
    – unwind
    Jan 14, 2011 at 12:44
  • 1
    @unwind From help-->What topics can I ask about here? "software tools commonly used by programmers" Nov 23, 2013 at 13:10
  • Great, this issue still occurs 3 years later. Luckily not on a large commercial codebase and don't have much too much lost history to worry about, so I'm tempted to start over with git. Jul 8, 2014 at 3:48

5 Answers 5

2

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.

0
1

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.

0
1

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

1

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.

0

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"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.