Wednesday, June 25, 2008

Wildcard workspace mapping syntax in TFS 2008

Just a footnote on workspace mappings in TFS 2008 – while initially there were couple of features planned for Orcas release, only one feature has made it into RTM. Correction: both features are available, see this post discussing the second feature.

In TFS 2008 it is possible to map only one level of the folder hierarchy using wildcard syntax

tf workfold /map $/Project/Source/* c:\src\Project /workspace:SampleWorkspace

The mapping above will map only one level of files and folders under $/Project/Source and will not retrieve files contained in sub-folders.

This syntax is nice to have, though I am not sure how useful it is. The same effect can be achieved by using cloaking on sub-folders (though of course wildcard is much more elegant way).


Richard Berg said...

Mappings under cloaks made it too. (if it doesn't work, please let us know!)

The $/foo/bar/* syntax is more useful than cloaking subfolders in the situation where new subfolders might be added. Since there is no central / administrative way to control workspace mappings, making everyone add a new cloak would be annoying for a large organization.

eugenez said...

Thanks Richard! I have updated my post and wrote an additional one.

I should have persevered with cloaking; I guess late hours have affected me :)