How to undelete items from Source Control?

I have been trying to get Team System up and running to gather experience for the "real thing" in November. Now one of the major things is of course Source Control.

I have checked in several things and then deleted a few. Now, I'd like to undelete some of those.

However, I can't seem to find a way to do so. I can still see the files when I do a "Get Specific Version", but how do I actually get them back into the current version?

[444 byte] By [L.vonWyss] at [2007-12-16]
# 1
I don't think this is possible through the UI. You have to go to your local working folder and use the h.exe command to find the deleted files and undelete them.

h.exe dir /deleted
h.exe undelete (filename)

http://msdn2.microsoft.com/library/6320xzye(en-us,vs.80).aspx
http://msdn2.microsoft.com/library/y7505w2x(en-us,vs.80).aspx

I hope this changes in the RTM version.

JasonD.Camp at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 2
I'm not sure which build you're using and which build this was added; but you should be able to go to Tools/Options/Source Control/Team Foundation, select "Show deleted items in Source Control Explorer", and then see deleted items, which will let you then pend an undelete on them.

Note that in Beta2 and possibly later builds, there was a bug where this setting (show deleted items) wouldn't persist, so you'd have to set it each time you start VS if you want them always visible.

The other alternative (that will definitely work, if that show deleted option isn't in the build you're using) is to use the command line, as Jason described.

We did it this way because seeing deleted items by default was very confusing - you might have two or more deleted items with the same name *as well as* one with the same name that's NOT deleted. Add in the fact that we distinguish "not in workspace" and "deleted" the same way (grayed out) and it just gets more confusing.

CRathjen-MSFT at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 3
Hi

Thank you. I'm using Beta2. On the Settings fpr Team System Source Control, I only have a lonely "File extensions" button, nothing else.

So for Beta2, the only way is the command line?

Leo

L.vonWyss at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 4
I think command line is the only way in Beta 2, Leo.
JasonD.Camp at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...
# 5

Jason is correct -- you'll need to use the command line in beta 2. It will work from the GUI by RTM.

Buck

BuckHodges at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - General...

Visual Studio Team System

Site Classified