Hehe - I just knew someone was going to pick me up on the hard coded "$/" :):) That's really good to know - thanks William!
Do you know if there's a way to determine whether or not a workspace is new or not? Should I just poll the file system and check the file count under the project name's directory? I believe when I map it, it creates the top level folders for each project, but it doesn't pull down any source. Either that, or I will make my web method accept a Boolean for get-all, and set it to true in my products installer (I want to ensure all code is downloaded once-off as part of my installer, so that all subsequent requests to the web service are simply refreshes/quick). Thanks! Matthew Cosier Readify | Dev Centre Lead M: +61 401 932 250 | E: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> Blog: http://cosier.wordpress.com<http://cosier.wordpress.com/> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of William Bartholomew Sent: Tuesday, 12 August 2008 12:28 PM To: listserver@oztfs.com Subject: RE: [OzTFS] TFS API - Workspace.Get Hi Matthew, If it's a new workspace then it wouldn't refresh newly changed files anyway because all of the files are new. As an aside, in Microsoft.TeamFoundation.VersionControl.Common.dll there is a class called VersionControlPath which has a heap of handy methods like VersionControlPath.RootFolder (which returns "$/"). As another aside, my preferred way to get the path to a Team Project is: TeamProject project; project = versionControlServer.GetTeamProject(projectInfo.Name); string projectLocation = project.ServerItem; From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matthew Cosier Sent: Tuesday, 12 August 2008 12:06 PM To: listserver@oztfs.com Subject: [OzTFS] TFS API - Workspace.Get Hi all, If I have just mapped a workspace, and no content has yet been downloaded - I then perform a workspace.Get() with GetOptions.None, why does it not download anything? If I specify GetOptions.GetAll it does, but I only want it to refresh newly changed files, not re-download everything every time? Do I need to perform a GetOptions.GetAll /before/ a simple Get with GetOptions.None works? I don't trust that it will download newly updated content still, can someone confirm what the deal is here? I simply want to emulate a right click -> get latest to refresh my workspace. Maybe my mapping code is wrong? projectWorkspaceLocation is the local disk path to the workspace folder. --- snip string projectLocation = "$/" + projectInfo.Name; if (!workspace.IsLocalPathMapped(projectWorkspaceLocation)) workspace.Map(projectLocation, projectWorkspaceLocation); GetRequest request = new GetRequest(projectLocation, RecursionType.Full, VersionSpec.Latest); GetStatus status; GetOptions options = GetOptions.None; if (forceGet) { options |= GetOptions.Overwrite; options |= GetOptions.GetAll; } status = workspace.Get(request, options); Matthew Cosier Readify | Dev Centre Lead M: +61 401 932 250 | E: [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> Blog: http://cosier.wordpress.com<http://cosier.wordpress.com/> OzTFS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. View the web archives at http://www.mail-archive.com/listserver@oztfs.com/ Powered by mailenable.com, supported by www.readify.net OzTFS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. View the web archives at http://www.mail-archive.com/listserver@oztfs.com/ Powered by mailenable.com, supported by www.readify.net OzTFS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. View the web archives at http://www.mail-archive.com/listserver@oztfs.com/ Powered by mailenable.com, supported by www.readify.net