There was a need to modify my build machines TFS 2013 workspace from the default (local) to a server workspace. Since the workspace was private I could not view it in the UI so I had to turn to the command line. This will be useful as other users will have issues and as an administrator I need to know how to do this.
To get a list of workspaces you can use the following command. This will help in finding the workspace you need to alter. This assumes you have added the path to tf to your PATH environment variable. It also assumes your DNS to your TFS farm is called tfs
tf workspaces /computer:NameOfComputerWhereWorkspaceResides /owner:* /format:detailed /server:http://tfs:8080/tfs/YourCollectionName
Once you have located the name of the workspace and it's owner you can now alter the workspace.
tf workspace WorkspaceToModify;OwnerOfWorkspace /location:server /collection:http://tfs:8080/tfs/YourCollectionName
The above command will change it to a server workspace. Another thing you might want to change for build machine workspaces is the File Time field. The File Time is set to current which will set all the files to the current time on Get Latest. The preferred settings for a build machine is Checkin. That way any files packed for release have a more realistic time of when they were created or last modified.
No comments:
Post a Comment