SVN How to revert a bad commit

Ever made that commit that messed up your repository and spent some time wondering how to undo, or revert a bad commit? In subversion you really can’t go back a revision, but you can merge your copy with the previous repository version and then commit the changes to correct your mistakes:

cd /home/huypv/domain

svn co [repository_url] phungvanhuy.net

svn log | more

svn merge -r [current_version]:[previous_version] [repository_url]

svn ci -m "Reverting previous commit and going back to revision [previous_version]."

This is a life saver.