I believe what you are trying to do is actually undo your changes in the repository. Simply performing svn update -r myrevision
will update your working copy to the revision before you made the bad commit, but it will not get rid of the mistaken changes from the repository. Here is how to remove them (in Tortoise):
- Make sure your working copy has the latest update
- Go to Tortoise SVN -> Show Log
- Right click on the revision you want to get rid of and select "Revert Changes From This Revision", then follow the dialog box. If you are using svn on the command line, see this post SVN reverse merge?
- Commit your new code.
This is performing a reverse merge. So SVN looks at the changes made in that revision and attempts to undo them in current the current revision. This is the same process as trying to do a regular merge only backwards, so there is the possibility that you will have merge conflicts which you will need resolve. Your mistaken commit will still be in the repository, but the most recent version of your code should have all of the changes made during the bad commit removed.