Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recovering from Subversion corruption

Something has gone wrong in subversion and now I am facing

svnadmin: Invalid diff stream: [tgt] insn 0 starts beyond the target view position

if I try to make dump from repository. We have another question about it here Subversion Repository Error, but the solutions there are not good enough for me because the corruption is 85 revisions back.

Because the corruption is in one not so important directory (not in trunk/branches/tags) I was thinking about two solutions:

  1. Create a dump from healthy portion and after importing it to new repository commit diffs from important directories (losing all revision history)
  2. Create a dump from healthy portion and write a ruby script that would check every revision of needed directories in old repository. This will create a diff file for revision and commit it to new repository with authors name and original comment.

Any comments? :)

/JaanusSiim

like image 381
JaanusSiim Avatar asked Nov 06 '22 22:11

JaanusSiim


1 Answers

If you really need access to your sources I would recommend sending a mail to [email protected] with your problem. There are some users reading that list that have experience in recovering corrupt repositories. (In many cases it wasn't reported on list as recovering sourcecode commonly requires a NDA)

Creating a dumpfile of all valid revisions you can get access to won't harm and might help in recovering.

like image 158
Bert Huijben Avatar answered Nov 15 '22 12:11

Bert Huijben