TFS workfold / unmap "There are several workspaces named XYZ"

I am trying to figure out how to solve the following situation.

I have a TFS 2012 server with three collections, let's say

- http://tfs2012:8080/tfs/DefaultCollection/ - http://tfs2012:8080/tfs/CollectionOne/ - http://tfs2012:8080/tfs/CollectionTwo/ 

In CollectionOne and CollectionTwo, I have the workspace of the same name, you can call it "TestWorkspace".

When I run the map command for this workspace in CollectionOne, it works fine (can receive, delete, update, etc.). The problem arises when I try to unzip the workspace, since I use it (I think I built the machine), the next call fails.

 tf.exe workfold /unmap /workspace:TestWorkspace E:\Temp 

Failure:

 Multiple workspaces exist with the name TestWorkspace. Please specify the Team Foundation Server or qualify the name with the owner. 

So I try the following:

 tf.exe workfold /unmap /workspace:TestWorkspace E:\Temp /collection:http://tfs2012:8080/tfs/CollectionOne/ 

What fails with the following:

 The option collection is not allowed. 

Also, specifying the owner of the working folder does not help, since they belong to the same user.

How do I disable a workspace that exists in two or more collections?

+6
source share
2 answers

This is a really annoying bug. Here is an easy workaround that I have used successfully.

 # Rename existing workspace to something unique tf workspace /collection:http://yourserver:8080/tfs/DefaultCollection /newname:TEMPORARY /noprompt DEVBOX-SGY # Unmap based on new (unique) name tf workfold /unmap /workspace:TEMPORARY C:\Code\Tools # Rename workspace back to original name to avoid side-effects tf workspace /newname:DEVBOXSGY /noprompt TEMPORARY 

Personally, I could not use the workaround mentioned in the spark ignition, because I needed something convenient for automation.

0
source

Source: https://habr.com/ru/post/951988/


All Articles