Real urgent... is there a way to undo a get-latest-version from a project? I've been working on a project for a week, and never checked in the files I was working on. A colleague had to upload a version from my computer, so he used the get-latest-version (recursive) command on the whole solution. It seems my Visual Studio has a problem, and it allows editing without checking out the file... so all my edits were donw without checking the file. When Vs prompted my colleague to either check out keeping changes or replace local version with sourcefe's, he chose to replace the local version with sourcesafe's version, and my VS is configured so that it'll apply that setting to every file. Now, I just lost this week's work. is there any way to revert this?
you could try using the previous versions feature in Vista assuming that's what you're running. Other than that, if you don't have a backup, you're pretty much screwed.
I'd also chalk this up to a learning experince - to check-in frequently. I'd be livid if I lost a day's worth of work, let alone a whole week.
Ouch. The IT department here does nightly backups of each machine from a tape system in the machine room. You might ask if something similar is done where you are.
A couple concerns:
1) Sourcesafe is not safe. Do some googling. Your organization is asking for disaster by using it.
2) Letting someone else drive on your machine isn't generally a good idea. Everyone does things differently and what would be a safe operation for George on George's machine may not be safe on yours. Have people talk you through these things - if they introduce you to something you've never done, you're far more likely to learn something new that way, anyway.
3) Set up a branch of your code in your source control tool so you can check in nightly - even if you aren't in a working condition. It's a free way to get backups.
I hope you find a solution to your problem.
VSS can operate in the edit-and-merge mode, its just that no-one ever puts that option on. You might be the exception here, so check your settings. It can also checkout files without the read-only flag set.
Unfortunately, VSS's getlatest simply grabs the last revision in the database and copies it on top of your filesystem, that's it. Sorry, but you've lost your work. You may be lucky and find it all in the recycle bin.
So the options you have for getting your work back: backups? If you have them, get them now before they get overwritten with the current files. System Restore? You might have your work saved if you had it set.
For next time: get a continuous-backup system like Mozy, or use the commit-often model (where you save your work regularly to a branch or alternative database, when you're finished, you then check it all into the correct database location).
VSS Warns you before Replacing the local version with the sourcesafe's version. so if you did not backup your data, your local version was entirely deleted
Some people don't realise this, but backups and source control are two different things. This situation is what backups are for.
I'd be fairly surprised if your IT folks don't at least backup PC profiles regularly. If not, there's another kind of backup you can try. Wait in the parking lot until your "colleague" is walking past your car, and then backup over them. :-)
Thanks to everyone for their quick reply. This was my first experience in this site, and I have to say it's nice how so many people want to help you. Too bad it was under this circumstances :(.
There's no way for me to recover my files (sadly). I talked to IT, and their faces were about to burst with laughter (grrr) when I told them, and they said there wasn't a backup and that it was pretty much my own fault; I might consider Ted's backup approximation tonight ;). Unfortunately, VSS isn't operating in the edit-and-merge mode.
But not all are bad news, since I sent some of the files to a friend because he needed some of my code, and completely forgot about it, but my friend saw I was practically in tears so he reminded me of that... I didn't loose a weeks work, now it's just two days.
As Scott points out, pretty much agreeing with my life philosophy, this kind of thing can be seen as a great learning opportunity. I assure you, this kind of thing won't happen to us again!
If this was an ASP.Net project, you could try looking in your Temporary ASP.Net Files dir (buried in your %system% directory), assuming you haven't run the project after clobbering your local files.
Also, if your application is .NET and you built and still have the binaries (check your recycle bin) you can use reflector or a similar tool to try to decompile the binaries. (http://www.red-gate.com/products/reflector/) So long as you didnt obfuscate the code you may be able to retrieve some of your work...