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: [email protected] 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/[email protected]/ 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/[email protected]/ Powered by mailenable.com, supported by www.readify.net
