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?
Right click on the selected revision(s), then select Context Menu → Revert changes from this revision. Or if you want to make an earlier revision the new HEAD revision, right click on the selected revision, then select Context Menu → Revert to this revision. This will discard all changes after the selected revision.
To undo a specific revision you can use the following command: $ svn merge -c -r3745 . In case you have other edited files in working directory, you can commit only the relevant files. Please note that undoing actually will mean you create a new revision with the negatives changes of last commit.
Reverts any local changes to a file or directory and resolves any conflicted states. svn revert will not only revert the contents of an item in your working copy, but also any property changes.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With