How to back out or undo your svn commit

Hm, I noticed today (couldn't help it, really) that if you forget that "svn commit" will commit everything in the entire tree where you are AND BELOW, you could end up wishing you could undo your commits.

Here is what I had done: svn commit -m 'blabla'

resulting in revision 1342.

The problem is that not only did it commit what I wanted it to commit, it also committed some changes I'd made a while back but had forgotten to either revert or commit... oops!

To revert the repo back to what was in 1341,

svn update

svn merge -c -1342 https://svn.it.uwosh.edu/svn/plone/Projects

svn stat

svn commit -m 'mucking about trying to undo my dorky commit'

The 'svn update' brings your working copy in sync with what's in the repo.

The 'svn merge' basically says 'remove the changes in revision 1342'.

The 'svn stat' is so you can verify that the merge command backed out your changes.

The 'svn commit' makes those changes final in the repo.

The new revision (in my case, 1343) is now back to what was in revision 1341.