Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you continue working off an old revision in subversion when you forgot to make a new branch

duplicate: How do I roll back all or part of a commit to svn?


I've set up an account at http://www.projectlocker.com/ for one of my projects. I'm the only person working on it but I figured having version tracking would still be useful, and it's a good learning experience. I've setup the standard folder structural with /trunk/, /branches/, /tags/.

So say you are working on the trunk and realize that you really messed some stuff up but you want to go back a few revisions and continue from there. I can update to a previous revision and start to make changes, but the server will not allow me to commit unless I update from the last revision which will also bring in all the unwanted changes. So how do I both go back to a previous revision and then continue working on the trunk from there? Do I somehow merge an old revision into the latest revision?

I'm using the AnkhSVN plugin for visual studio so I'd appreciate and answer that explains how to do it in that client, but I'm sure I can figure out the actual button clicks from a more conceptual answer.

like image 599
Eric Anastas Avatar asked Dec 18 '22 07:12

Eric Anastas


1 Answers

I do not use AnkhSVN, so I do not now exactly what clicks you need, however it is a fairly task in TortoiseSVN and in commandline:

You just has to undo all changes by applying a reverse merge . usually this is done in Tortoise by :

  • showing the log of your working copy
  • selecting the revision to which you want to reverse merge
  • press right mouse button and select "revert to this revision"
  • commit the new revision(which is exaclty the same as the previous choosen rev.)

On Commandline you should do this:

svn merge -r 120:100 http://svn.example.com/<path_to_your_repo>

This will undo all revision from 101-120 leaving you with the same as Rev 100

like image 63
Peter Parker Avatar answered Jan 30 '23 00:01

Peter Parker