I accidentally committed too many files to an SVN repository and changed some things I didn\'t mean to. (Sigh.) In order to revert them to their prior state, the best I coul
Check out "undoing changes" section of the svn book
svn merge will merge revisions, not revert them. i.e. if you have some addition in your HEAD version then merge that with a previous revision, then the change will persist.
I use svn cat then redirect it into the file:
svn cat -r 851 l3toks.dtx > l3toks.dtx
Then you have the 851 content in that file and can check it back in.
svn merge -r 854:853 l3toks.dtx
or
svn merge -c -854 l3toks.dtx
The two commands are equivalent.
I recently had to revert to a particular revision to debug an older build and this worked like magic:
svn up -r 3340 (or what ever your desired revision number)
I had to resolve all conflicts using "tc" option as I did not care about local changes (checked in everything I cared about prior to reverting)
To get back to head revision was simple too:
svn up
What you're looking for is called a "reverse merge". You should consult the docs regarding the merge function in the SVN book (as luapyad, or more precisely the first commenter on that post, points out). If you're using Tortoise, you can also just go into the log view and right-click and choose "revert changes from this revision" on the one where you made the mistake.
If you use the Eclipse IDE with the SVN plugin you can do as follows:
This will revert the files to the revision that you want. Just keep in mind that SVN will see the changes as a new commit. That is, the change gets a new revision number, and there is no link between the old revision and the new one. You should specify in the commit comments that you are reverting those files to a specific revision.