views:

23

answers:

2

Situation: I've got a SVN repository with lets say 100 revisions, rev. 100 being the most recent one. I've done some changes in rev. 90 which need to be reverted now. The changes in rev. 90 are self-contained, so that they don't affect following revisions.

Problem: I'd like to revert only the changes in rev. 90, but still want to have all changes of all following revisions in my head revision.

Question: Is there any function in SVN to revert only the changes of a random revision?

+7  A: 

You need to do a reverse-merge, that is a merge with the range rev:rev-1. For example on the command line, if you are in the working directory:

`svn merge -r 90:89 .`

In TortoiseSVN, it seems you need to enter 90 for Revision range to merge and check the Reverse merge checkbox in the Merge dialog (I don't have it so I can't confirm).

DarkDust
+3  A: 

With TortoiseSVN open the log and find the revision you want to revert. Right click the line and choose "Revert changes from this revision". This will make local modifications to your working copy, which will undo that revision.

msell
This only works on Windows. I use RapidSVN, the alternative to Tortoise for Linux and it does not have this functionality.
Gweebz