2

I migrated TFS from an old server "OLDMACHINE" to a newone "NEWMACHINE". TFS is shutted down on OLDMACHINE. Now I want to update my different URLs on developpers computers.

For my git clones, the command is :

git remote set-url origin https://NEWMACHINE/...

I don't find the corresponding command with tf workspaces. I've search in the Visual Studio's window Workspaces..., but I can't open it anymore because my old TFS is down.

The next command show me my workspaces :

tf workspaces

Is it possible to update the URL with

tf workspace ?

There are many documentations about renaming computer, moved folder, username, but I didn't find any in my direction.

EDIT : I found this key in regedit, with subkeys. I want to give it a try, has anyone ever done this manipulation?

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0 or 14.0\TeamFoundation\Instances\OLDMACHINE

1 Answers1

1

There is no this kind of related command for TFVC. Each TFS server has a unique identifier(GUIDs) that is used to represent each collection and is not dependent on the server "name." The upgrade/migration does not modify the TFS GUIDs.

For that reason, all end-users have to do is connect to the TFS server via Visual Studio and can resume work, including any pending changes. No need to update the "collection name" for their local workspace.

Besides, if you have problems with workspaces, TFS Sidekicks is a really useful tool because it gives you a nice GUI tool to list, check, delete and manage all workspaces defined in your TFS. (Need Administrative privilege)

PatrickLu-MSFT
  • 49,478
  • 5
  • 35
  • 62
  • Migrated TFS with backup and restore preserves everything, migrated TFS instance still contains old workspaces. The mapping relationship is stored in TFS database. If the mapping is lost, you could just try to remap it. If remapping is not work, the worst-case scenario is deleting the old workspace and simply tell users to recreate workspaces pointing to the new server. Delete workspace will not lose any data, you can get them from server after create new workspace. – PatrickLu-MSFT Jul 25 '17 at 09:01
  • 2
    Connecting to the new TFS server via Visual Studio, and deleting the old one worked well ! Pending changes were saved, and end-user can quickly resume work. Too bad that this manipulation is not available with command line `tf`. – stephanejulien Jul 25 '17 at 09:21
  • 1
    This answer could be improved by explaining how to change which server a workspace points at, where this information is stored or how come it's different depending on if you access the ws from CLI/VS – CervEd Mar 03 '21 at 10:32