I had the wrong habit to keep my old projects in a subversion repository. It's not the good way of keeping code safe.

svnadmin recover works when there is no corruption in your repository. If you have an old corrupted repository that you can't recover, you can first try a berkeley db recovery:

cd /var/svn/myrepos
dbX.X_recover

X.X is the berkelay db version of the repository.

If svnadmin recover and db_recover don't work, try the solution below, it worked for me.

You have to know the database version:

REPOS_PATH="/var/svn/myrepos"
DB_VERSION="4.3"
cd ${REPOS_PATH}/db
rm log.* __db.*
mv changes changes.old
mv copies copies.old
mv nodes nodes.old
mv representations representations.old
mv revisions revisions.old
mv strings strings.old
mv transactions transactions.old
mv uuids uuids.old
mv lock-tokens lock-tokens.old
mv locks locks.old
db${DB_VERSION}_dump changes.old | db${DB_VERSION}_load changes
db${DB_VERSION}_dump copies.old | db${DB_VERSION}_load copies
db${DB_VERSION}_dump nodes.old | db${DB_VERSION}_load nodes
db${DB_VERSION}_dump representations.old | db${DB_VERSION}_load representations 
db${DB_VERSION}_dump revisions.old | db${DB_VERSION}_load revisions
db${DB_VERSION}_dump strings.old | db${DB_VERSION}_load strings
db${DB_VERSION}_dump transactions.old | db${DB_VERSION}_load transactions
db${DB_VERSION}_dump uuids.old | db${DB_VERSION}_load uuids 
db${DB_VERSION}_dump lock-tokens.old | db${DB_VERSION}_load lock-tokens
db${DB_VERSION}_dump locks.old | db${DB_VERSION}_load locks
svnadmin recover ..

If binaries dbX.X_dump and dbX.X_load does not exist, you have to compile a old version of subversion with the berkeley database corresponding.

Thanks to dmp.

Link: http://svn.haxx.se/users/archive-2005-07/0576.shtml