Want to delete revisions from my SVN repository
Maybe this link helps you:
http://www.sampablokuper.com/2009/03/27/svn-revert-to-revision/
Quote:
Change to the top directory within your working copy (assuming you want to roll back the whole of the working copy).
run
svn revert
to revert your working copy's files to the state they were in when you last committed/checked out.run
svn status -v
to see which revision number your working copy now corresponds to (it's the highest revision number in the list thatsvn status -v
produces).run
svn merge -rXX:YY
whereXX
is the number you obtained in the previous step andYY
is the number of the revision you want to revert to.Done! The possible exception to this is that files in your working copy that didn't exist when revision
YY
was originally made, will still be there, because by default svn doesn't remove things. If you want to get rid of them, run asvn del [filename]
on each of them.Well done! Now play with your working copy as though all those intermediate edits had never happened . And when you're ready to commit your efforts, just use svn commit as usual!
This worked for me. Given that you have revision 1234 as the HEAD and you want to revert last three commits:
svnadmin create newrepo
svnadmin dump -r 0:1231 repo | svnadmin load newrepo
mv repo oldrepo
mv newrepo repo
For me (VisualSVN, 30-HEAD) works this :
del C:\Repositories\MyRepo\revs\0\30 del C:\Repositories\MyRepo\revs\0\29 del C:\Repositories\MyRepo\revs\0\28 del C:\Repositories\MyRepo\revprops\0\30 del C:\Repositories\MyRepo\revprops\0\29 del C:\Repositories\MyRepo\revprops\0\28 echo 27 > C:\Repositories\MyRepo\db\current
You can use dump / load for this purpose.
You could also use svnsync to make a backup to some revision.
If you have a big repository, it take time.