Occasionally I come across an svnsync backup that refuses to sync because it has a corrupted revision. Naturally you want to sync the whole thing again but sometimes the repo is huge and you want to have something that’s still synced in the meantime:
I’m going to presume you know the corrupt revision number which I’ll refer to as N from here on.
- Delete all the files in db/revs with a number equal to or higher than N
- Do the same for db/revprops
- Make db/current contain N – 1
- Edit db/revprops/0/0 which should look like thisK 8
change the two lines down from svn:sync-last-merged-rev to N – 1. The Number after V on the line above should be the number of digits in your revision number. If you see svn:sync-currently-copying then you can do the same but with N – 2 instead.
- Delete db/rep-cache.db This is the only part that leaves a bad taste in the mouth. It’ll get recreated and is ‘risk free’ as explained here: https://svn.haxx.se/users/archive-2014-01/0137.shtml but you can potentially end up with a bigger repo.