tags:

views:

48

answers:

0

I have used TFS API 2010 to update my workspace.The hierarchy of my TFS project is as follows:

$\PROJECT\
          \Build
          \Branch1
          \Branch2
          \Branch3

I want to update the Build folder and the Branch2 not all the directories under PROJECT.The code snippet used is as follows.

IEnumerable changesets=this.source

workspace.Map("$/PROJECT/Branch2","D:\VSTS\PROJECT\Branch2");
workspace.Get(new GetRequest(new ItemSpec("$/PROJECT/Branch2",RecursionType.Full),VerSpec),GetOptions.All|GetOptions.Overwrite);

I have mapped the project branch2 to the local working folder branch2 and this works as expected . Now after this I need to remap the workspace to the Build Folder to update the Build folder contents like this

workspace.Map("$/PROJECT/Build","D:\VSTS\PROJECT\Build");
workspace.Get(new GetRequest(new ItemSpec("$/PROJECT/Build",RecursionType.Full),VerSpec),GetOptions.All|GetOptions.Overwrite);

Is this possible , because this seeems to hang. Am I missing something?