views:

168

answers:

3

Lets say I commited a new .cs file. Boss says roll it back but I don't want to loose that file locally. If I to a revert back to revision on that file in the revision that I checked this file in at, will it delete it from my local copy? what happens exactly?

+2  A: 

Possible solution: Copy the file out of local copy, then delete from SVN, then do a commit. After the commit is done, copy the file back into the local copy.

If you revert it back, your changes to that file might be gone, and possible that the file might also be gone.

thephpdeveloper
A: 

Assuming you mean you update to a revision where the file has been deleted, will the local copy be deleted.

Yes. But, if you update to a revision where the file exists, it will come back.

Also, if you place the file back in your checkout after it has been deleted by svn, it will be a local file, and won't get updated or removed. If you update to a revision with the file, you'll get a warning.

Peter
I'm totally lost. What is revert to revision then in Tortoise?
CoffeeAddict
+2  A: 

TortoiseSVN does delete the file locally if you choose the Tortoise Delete command. To prevent this, you can run svn delete filename --keep-local at the command line.

Or, as Oskar comments below, you can Shift-right-click on the file in your working copy and select Delete (keep local).

This will queue up the deletion to happen on your next commit, along with any other changes you may make.

Michael Hackner
If you hold shift when right-clicking - TortoiseSVN will give you a lot more options including "Delete (keep local)"...
Oskar Duveborn
Nice! Didn't know that. +1
Michael Hackner