I've been using various source control systems for a while, but when it comes to reverting changes I'm not yet an expert. Can someone help given this scenario:
I expect there must be a way to compare revisions #4 and #5 of the two files and generate a patch that undoes the changes in revision #5, which can then be applied to the HEAD revision to roll-back the defect.
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.
If you want to undo all changes you made in a file since the last update you need to select the file, right click to pop up the context menu and then select the command TortoiseSVN → Revert A dialog will pop up showing you the files that you've changed and can revert.
To revert a single commit: Go to: Subversion -> Integrate Directory... Show activity on this post. Note that the svn merge command reverts a commit in the sense of having another commit undoing your changes, but keeping your wrong commit in the history.
Usually a reverse merge will be sufficient to roll back a committed changes...
To read up on the details see: svn manual - Undoing Changes
As described by mark you'll want to do:
svn merge -r 5:4 file1 file2
This means merge in the change from 4 to 5 backwards ie. undo the changes
You could also type:
svn merge -c -5 file1 file2
This means apply the change that took place in commiting revision 5 backwards.
Next you should manually review the changes.
Finally you must commit the changes (above merges only changed your working copy).
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