views:

125

answers:

5

Let's say I have a user's object, I deleted a property and all things in the web project that used this property (admin pages that updated the property, data layer etc etc).

Now I was told that we need that property, looking at Subversions log it seems the correct code is 3 revisions back.

How can I go back, then somehow get any updates that may have occurred by other devleopers also?

A: 

You'll need to know which files you want, and update all to "HEAD" and then those specific files to "HEAD - 3" revision number. Then you'll need to commit those specific files back.

There maybe a better option that I'm not aware of.

Nate Bross
+1  A: 

Get the revision number from log for the correct code. Right-click the file you want to rollback. Select Tortoise SVN -> Update to Revision. In dialog fill number of revision you what to update file to, click OK and you are done!

EDIT:- to perform action on command line use svn merge. for more information type following in command line:

svn --help merge ENTER

Here is link to SVN book describing the operation.

You can also have a look at this question, which is also about same issue.

so its a manual process for each file?
mrblah
A: 

If you committed the whole change, and only that change in one go, you can back out that change to your working copy. You could then commit that if it works.

Log Messages > right-click the offending revision > Revert changes from this revision

I've only tried it for a small number of files, I imagine there could be serious conflict headaches.

susichan
And as far as i can see, it will revert the changes as a diff so newer changes to the same files will be maintained.
susichan
A: 

Theoretically, you can reverse merge. I tried once and subversion absolutely failed to do this--corrupted my working copy or just flat out crashed every single time.

Practically, you might have to update to the old version, save off copies of the files affected, update to latest, manually reverse merge the changes.

It would be a lot more practical (though unsophisticated) if you can just update 3 revs back, recommit it, and have anyone who made changes since recommit them.

Dustin Getz
A: 

Use the log dialog.

Select the revision you want to revert. Right-click on that revision, choose "revert changes from this revision".

Stefan