The problem comes when you have a symlink in the repository, and overwrite it with an actual (binary) file.
SVN thinks a symlink is text. But the file is binary, so it ends up in the wrong directory resulting in this error message.
I wasn't able to solve it (feedback requested if you know it) without actually working inside the subversion server. Pray that noone have submitted too much!
How I did it:
- make a diff from the revisions (for example: svn diff -r 491 > patch)
- drop down the server (/etc/init.d/apache2 stop)
- copy the repository to another location (cp -r /data/svn/Salvania /tmp)
- delete in db/revs & db/revprops the revisions until where you have submitted the wrongly submitted one (for me that was 491, and 1 more was submitted after that) (rm revs/491 revs/492 revprops/491 revprops/492).
- remember to change the db/current file to reflect the (now) current repository.
- now apply the patch do the stuff again.
- commit it
How should you handle symlinks to binary files?
- svn rm
- svn commit
- svn up
- [copy files here]
- svn add
- svn commit
Lengthy process, but it won't fail.
What if someone else commited something and you just want to give them their changes back?
- change the fields in revprops (ensure that the number above the line you change reflects the amount of characters!).
That's about it :)