Roll back or revert entire svn repository to an older revision

Spread the love

Question Description

I messed up on my SVN repository and now need to revert the entire repository from revision 28 to 24 and don’t want to deal with diffs or conflicts. Is there a quick and simple way to do this? I’ve been able to revert back single files before fine with the merge command – but in this instance it wants to add all of the files back into the repository from revision 28 when all I really want to do is delete them.

I am using the command line on a linux box (bash).



Thanks for all of the help! I fixed it by:

svnadmin create /svnroot/.fixed
svnadmin dump -r 1:24 /svnroot/ --incremental > dump.svn
svnadmin load /svnroot/.fixed < dump.svn

Then putting the old repo in a backup location and moving the repo.fixed to repo.

Thanks again!

Practice As Follows

Check out svnadmin dump/load. It creates a text file with every version of your files. It may be possible to delete everything above/below a certain point and re-import it.

See for instance Migrating Repository Data Elsewhere

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.