I need to download a shelveset from TFS to a local folder. Is there any tools or add-in for Visual studio 2010 to download shelveset
How to download TFS shelveset
44.5k views Asked by Kamal Kr At
3
There are 3 answers
0
On
Using command prompt, we can get a dump of the files :
set shelveset=<ShelvesetName>
set temppath=c:\temp\%shelveset%
md %temppath%
for /f "delims=;" %t in ('tf status /shelveset:%shelveset% /format:detailed ^| find ^"$^"') do tf view %t /shelveset:%shelveset% /noprompt > %temppath%\%~nxt
Note that this gives a flat structure and will rewrite if there are files with same name.
1
On
- Close Visual Studio
- Rename the folder, e.g add postfix original to the folder name so "SolutionX" folder becomes "SolutionX - Original"
- Make a "SolutionX" folder again, this is going to be empty
- Open VS, unshelve shelvset1, "SolutionX" will now only have shelvset1 files
- Close VS (this might not be needed)
- Rename "SolutionX " e.g. to "SolutionX Shelveset1"
- Make a "SolutionX" folder again, this is going to be empty
- Open the VS and Undo Pending Changes
- Unshelve shelvset2, "SolutionX" will now only have shelvset1 files
- Close VS, Rename "SolutionX" folder to "SolutionX Shelveset2"
- Rename "SolutionX - Original" folder to "SolutionX"
- Open the VS and Undo Pending Changes
Use your compare tool to compare "SolutionX Shelveset1" and "SolutionX Shelveset2"
If you find that some of the steps are not needed, let me know to update this, I tried the first answer, ran into problems and had to come up with this instead.
If you just need to get the files from the shelveset to your local folder, this is a normal process and called Unshelve. It downloads the files to your local folder.
For example, before unshelve you had the following in your local folder:
The shelveset has:
After unshelve there will be:
If you need to have only the files from the shelveset in your workspace folder without anything else, one of the ways would be:
You can find more about managing shelvesets here: Suspend Your Work and Manage Your Shelvesets (MSDN)