Want to delete revisions from my SVN repository
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
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!
I know this is an old question, however, I've just found how to do this with Windows/TortoiseSVN.
As a comment suggested, you can't "delete" a revision, but what you can do is make a more current revision that is the same as the revision you want to revert to.
- Checkout the HEAD of the repository for the directory you want to revert the revision from.
- Load the "Show Log" view in TortoiseSVN for the highest level directory you want to revert (e.g. "Trunk").
- Right-Click the revision you want to remove NOTE: this is the revision you want to remove, not the one you want to revert to.
- Select "Revert changes from this revision".
- Click "Yes" at the prompt.
- Update the checkout as normal, but to "HEAD".
- Commit it back.
You will then to go to everyone else who has it checked out and get them to update and make sure to remove any new files.
Also, you'll need to make sure that everyone knows what that revision was and potentially update the description.