I'm working on a project with a friend and I want to return to an older version of our code and set it to be the current. How do I do it?
I'm using "anksvn" on vs08.
I have the version that I want on my PC, but the commit is failing; The message that I get is "commit is failed, file or directory is out of date."
I also have the subversion client on my PC.
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.
Display the differences between two paths. The ways you can use svn diff are: Use just svn diff'to display local modifications in a working copy. Display the changes made to TARGET s as they are seen in REV between two revisions.
Basically you need to "merge backwards" - apply a diff between the current and previous version to the current version (so you end up with a working copy looking like the old version) and then commit again. So for example to go from revision 150 (current) back to revision 140:
svn update svn merge -r 150:140 . svn commit -m "Rolled back to r140"
The Subversion Red Book has a good section about this.
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