Random SVN registration

Ok, this is a real scenario and I don't want to risk it, so I ask.

I and Bob are working on a .NET project (VS2010) which is under SVN. Everything went well until today. And then Bob made a mistake by making a mistake. Here's a short history of doing:

Rev. 158 - Me - Everything is fine - I checked-in some work

Rev. 159 - Bob - Everything is fine - Bob checked some works

Rev. 160 - Bob - made some mistakes

I continued to work after doing Rev. 158 and now my working copy contains a lot of work that needs to be reviewed. How can I ask SVN (I have Tortoise) to just clean Rev. 160 and return to Rev ?. 159 state? I read a few other posts and they suggest using SVN history and clicking on the last good commit and selecting the Revert This Revision command from the context menu, but if I do that it asks me if I want to revert my WORKING COPY to Rev 159 which means I will lose all my changes. I just want the server side to just undo Rev. 160 without affecting my working copy.

+3


source to share


1 answer


Reverting to a previous revision is called merging back in Subversion.

On the command line, you can do this:

$ svn merge -c -160 .

      

Notice the minus sign before the revision. This indicates to remove the changes made in Revision 160. This can be done even after other revisions have been checked. However, the longer you want, the more likely merge conflicts can be.



You can also merge back in Tortoise. This can be done through the log (right-click on the revision and select check-in) or through the Merge dialog box (check the Merge Back checkbox).


Use AnkhSVN instead of TortoiseSVN

Since you are doing .NET development, I am assuming you are using VisualStudio. If you are, use AnkhSVN instead of TortoiseSVN. AnkhSVN integrates inside Visual Studio and knows that VisualStudio cannot add to the repository (unlike TortoiseSVN).

+2


source







All Articles