Oct 27
Undoing changes from a revision
If there’s a need to revert changes that were made to in a certain revision or revision range, you need to perform a reverse merge. The basic idea is to reverse the start and end revisions, causing a merge that’s the opposite of the revision itself.
(Reverse) merging can be done with the Merge method. Passing the revision range is done with SvnRevisionRange. For a reverse merge, make sure the startRevision is larger than the endRevision. To undo revision 123, you want to pass (123, 122)
To undo a file in the working copy:
var range = new SvnRevisionRange(revision, revision - 1);
client.Merge(path, path, range);This means that to undo all changes (ie go back to the state at revision, you can use:
var range = new SvnRevisionRange(SvnRevision.Working, revision);
