{"id":2703,"date":"2007-03-04T22:50:17","date_gmt":"2007-03-04T22:50:17","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/buckh\/2007\/03\/04\/tfs-workspaces-2005-and-orcas\/"},"modified":"2007-03-04T22:50:17","modified_gmt":"2007-03-04T22:50:17","slug":"tfs-workspaces-2005-and-orcas","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/buckh\/tfs-workspaces-2005-and-orcas\/","title":{"rendered":"TFS Workspaces: 2005 and Orcas"},"content":{"rendered":"<p>Martin Woodward has done a great job explaining workspaces&nbsp; and working folder mappings in a pair of recent posts.&nbsp; For those who are new to TFS or haven&#8217;t taken the time to think about the concepts and uses, it&#8217;s a good idea to read them.<\/p>\n<ul>\n<li><a href=\"http:\/\/feeds.feedburner.com\/~r\/MartinWoodward\/~3\/98450667\/000334.html\">Workspace 101: An Introduction to TFS Workspaces<\/a>  <\/li>\n<li><a href=\"http:\/\/feeds.feedburner.com\/~r\/MartinWoodward\/~3\/98450667\/000334.html\">Workspace 101: Working Folder Mappings<\/a><\/li>\n<\/ul>\n<p>While his posts apply to both Team Foundation Server 2005 and Orcas, version control adds two new advanced capabilities to working folder mappings in Orcas.&nbsp; I call them advanced because many users won&#8217;t have any need for them, as with Martin&#8217;s comment about not having a need for cloaks at TeamPrise.&nbsp; However, if you need these features, they are really great.<\/p>\n<p><strong>One-level mappings<\/strong><\/p>\n<p>The first new feature is the one-level mapping.&nbsp; In 2005 and by default in Orcas, mapping a server path to your local disk maps the entire tree under that folder to your local disk.&nbsp; In other words, a working folder mapping is recursive.<\/p>\n<p>If you work on a large code base, you may want to map a top-level directory&#8217;s immediate children and then selectively map subdirectories under it.&nbsp; In 2005, the only choice was to map the top-level directory and cloak whatever you didn&#8217;t want to get.&nbsp; If you have a large number of directories or the new directories appear rather frequently, it&#8217;s a painful solution.<\/p>\n<p>To specify a one-level working folder mapping, you simply add an asterisk to the end of it.&nbsp; For example, the code that the TFS group works on lives in $\/orcas\/pu\/tsadt in our own server (it hosts lots of projects for the Developer Division).&nbsp; There are a lot of directories under $\/orcas\/pu\/tsadt that most TFS developers don&#8217;t need in order to work.&nbsp; However, we all need the files in $\/orcas\/pu\/tsadt itself (not recursively)&nbsp;in order to build.<\/p>\n<p>So, with Orcas TFS, we can specify the mappings as follows.<\/p>\n<blockquote><p> <font face=\"Courier New\" size=\"2\">$\/orcas\/pu\/tsadt\/*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c:\\code\\orcas<br>$\/orcas\/pu\/tsadt\/ddsuites\/*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c:\\code\\orcas\\ddsuites<br>$\/orcas\/pu\/tsadt\/ddsuites\/src\/vset&nbsp; c:\\code\\orcas\\ddsuites\\src\\vset<br>$\/orcas\/pu\/tsadt\/edev&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c:\\code\\orcas\\edev<br>$\/orcas\/pu\/tsadt\/public&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c:\\code\\orcas\\public<br>$\/orcas\/pu\/tsadt\/tools&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c:\\code\\orcas\\tools<br>$\/orcas\/pu\/tsadt\/vscommon&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c:\\code\\orcas\\vscommon<br>$\/orcas\/pu\/tsadt\/vset&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c:\\code\\orcas\\vset<\/font><\/p>\n<\/blockquote>\n<p>As you can see, the first two mappings are one-level mappings, meaning that only the files directly contained by specified directory are downloaded.&nbsp; Then, I map the directories that I care about.&nbsp; Note that order is not important here: I didn&#8217;t have to specify the one-level mappings first.&nbsp; It just turned out that way when I sorted them.<\/p>\n<p>Unless I&#8217;m forgetting something (I&#8217;m writing this on an airplane), that should pretty much set up a standard TFS developer&#8217;s workspace.&nbsp; I&#8217;ll spare you the mappings we had to use with 2005, but it&#8217;s a lot shorter list.<\/p>\n<p><strong>Mappings under cloaks<\/strong><\/p>\n<p>The second new capability is active mappings under cloaked mappings.&nbsp; In TFS 2005 we checked for and declared an error for this.&nbsp; There actually wasn&#8217;t a good reason to allow it.&nbsp; We had put that rule back in place back in 2003 when the design was different, and we just never removed the check.&nbsp; Funny how that happens.<\/p>\n<p>In TFS 2005 the following would be illegal.&nbsp; However, in Orcas it is supported.<\/p>\n<blockquote><p> <font face=\"Courier New\" size=\"2\">$\/orcas\/pu\/tsadt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c:\\code\\orcas<br>(cloaked) $\/orcas\/pu\/tsadt\/framework<br>$\/orcas\/pu\/tsadt\/framework\/win\/core&nbsp;&nbsp;&nbsp;c:\\code\\orcas\\core<\/font><\/p>\n<\/blockquote>\n<p>Here I&#8217;ve chosen to map all of tsadt, cloak the&nbsp;framework subdirectory, and then map framework\\win\\core.&nbsp; Now, you have to be careful when you do this sort of thing, because you can quickly create a hairball set of mappings.&nbsp; When you need it, though, it can be really useful.<\/p>\n<p><strong>Why use these features?<\/strong><\/p>\n<p>So why would anyone need to use either of these two features?&nbsp; One reason is disk space.&nbsp; We work in feature crews when developing new feature crews, so you end up with multiple branches (copies, effectively) of $\/orcas\/pu\/tsadt on your disk.&nbsp; Disk drives are big these days, but you can run out of space with these multi-gigabyte trees mapped to your disk plus the gigabytes of binaries and installation files that hey produce when you build them.<\/p>\n<p>Another reason is bandwidth.&nbsp; We work in North Carolina, and our entire office shares a 10 Mbps line.&nbsp; Even with the version control proxy, it&#8217;s worth the time and effort to make sure that you don&#8217;t bring down that extra gigabyte if you don&#8217;t need it.<\/p>\n<p>Unless you work with really large branches, you won&#8217;t care about these features.&nbsp; But if you need them, you&#8217;ll love them (and you can try them out with the <a href=\"http:\/\/msdn2.microsoft.com\/en-us\/vstudio\/aa700831.aspx\">March Orcas CTP<\/a>)!<\/p>\n<p>tags: <a href=\"http:\/\/technorati.com\/tag\/tfs\" rel=\"tag\">tfs<\/a>, <a href=\"http:\/\/technorati.com\/tag\/team+foundation\" rel=\"tag\">team foundation<\/a>, <a href=\"http:\/\/technorati.com\/tag\/version+control\" rel=\"tag\">version control<\/a>, <a href=\"http:\/\/technorati.com\/tag\/workspaces\" rel=\"tag\">workspaces<\/a>, <a href=\"http:\/\/technorati.com\/tag\/working+folders\" rel=\"tag\">working folders<\/a>, <a href=\"http:\/\/technorati.com\/tag\/orcas\" rel=\"tag\">orcas<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Martin Woodward has done a great job explaining workspaces&nbsp; and working folder mappings in a pair of recent posts.&nbsp; For those who are new to TFS or haven&#8217;t taken the time to think about the concepts and uses, it&#8217;s a good idea to read them. Workspace 101: An Introduction to TFS Workspaces Workspace 101: Working [&hellip;]<\/p>\n","protected":false},"author":94,"featured_media":10268,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[6,8],"class_list":["post-2703","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-source-control","tag-team-foundation"],"acf":[],"blog_post_summary":"<p>Martin Woodward has done a great job explaining workspaces&nbsp; and working folder mappings in a pair of recent posts.&nbsp; For those who are new to TFS or haven&#8217;t taken the time to think about the concepts and uses, it&#8217;s a good idea to read them. Workspace 101: An Introduction to TFS Workspaces Workspace 101: Working [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts\/2703","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/users\/94"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/comments?post=2703"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/posts\/2703\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/media\/10268"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/media?parent=2703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/categories?post=2703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/buckh\/wp-json\/wp\/v2\/tags?post=2703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}