7

I have a TFS workspace which I need to move to my new PC. I have copied the whole folder structure over and ensured that the workspace is mapping to the correct folders. However the "Latest" column for every file displays as "Not downloaded". How can I reconcile this such that TFS is aware that the files match the server version?

The standard answer seems to be to re-download the whole thing. Unfortunately the repository is huge, my connection is unreliable, and I have monthly download quotas. Is there anything in the command-line tools or power tools that can make it compare file hashes or similar and realise that the files are identical?

Thanks.

David Cummins
  • 972
  • 6
  • 15
  • 1
    TFS workspaces are identified by the owner, the computer name and the workspace name. If your new computer has a new name, update your existing TFS workspaces to reflect that change. See http://stackoverflow.com/questions/8435135/change-computer-name-for-a-tfs-workspace and http://stackoverflow.com/questions/16216338/how-to-update-tfs-workspace-after-computer-name-changes – Edward Thomson Apr 21 '15 at 13:23
  • Are the workspaces stored in the hidden $tf folder? I don't see a workspace with my old PC name (e.g. if I run tf workspaces). I just see a local repository with my new PC name, which is crazy because my collection is definitely stored on a server and I know the URL. – David Cummins Apr 21 '15 at 18:54
  • No, workspaces are stored on the server. `tf workspaces` is showing the cached data from the last connection. If you know the name of the workspace you should be able to update it on the server. You may also want to try one of the tools in the other answers referenced above which may make this more straightforward. – Edward Thomson Apr 21 '15 at 21:56

1 Answers1

0

There's a binary metadata file inside the working copy that stores the mapping of every path in your repo, to the path on the filesystem.

It uses absolute paths - so unless your new project folder occupies the exact same location as it did on the original computer they won't match.

Because it's a binary format, you can't do something simple like mass replace the paths with a text editor or sed.

Adrian
  • 2,244
  • 18
  • 20