posted on Wednesday, May 25, 2005 6:25 AM
by
Jonathan Hodgson
Getting a labeled version of files from Visual Sourcesafe
Most people tend to label all the files/code recursively after a new release of a system in VSS, or have it done automatically if you are using CruiseControl.
But how do you get these files back? Yes, you can use the VSS Explorer to get an individual file, but unless there is a "secret" menu item I haven't found I don't know how to do this recursively for all files.
So two different approaches are using the command line VSS tools or NAntContrib tasks.
Command Line:
ss Get "$/Dot Net/Code/Project A" -R -VL"Release 2.1.0"
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/guides/html/vsgrfss_get.asp
But I prefer using NAnt and the extra NAntContrib task vssget:
<vssget
user="jonathan"
password=""
localpath="C:\workarea\Project A\"
recursive="true"
replace="true"
writable="true"
removedeleted="true"
dbpath="\\server\Sourcesafe\srcsafe.ini"
path="$/Dot Net/Code/Project A"
version="Release 2.1.0"
/>
Hopefully this will save people some time in the future, and if you haven't looked at automating using NAnt tasks you should.