【轉】刪除已經存在的 TFS Workspace

刪除已經存在的 TFS Workspace

分類: TFS
工做轉移到新的TFS平臺
打開source control在建立workspace時出錯
信息爲:
The Path <local path> is already mapped in workspace <machine name [old tfs server]>
很詭異的bug:)

Google搜索發現別人也遇到過相同的問題(估計是不少人遇到過)
參考 Kevin Jones的博客文章,咱們知道Client端的配置信息存儲在
「C:/Documents and Settings/[user]/Local Settings/Application Data/Microsoft/Team Foundation/1.0/Cache/VersionControl.config」
不過讓每一個人修改config文件可不是個好的workaround

好在 Buck Hodges給出了較爲明確的解釋:
The reason that you hit this is due to switching servers. Every server has a unique identifier, which is a GUID. Each local path can only be mapped in a single workspace. You originally had a workspace on the first server that used the local path you wanted to use with the new server. Let's say that's c:/projects. When you create the new workspace on the new server (GUID2) that you also want to map to c:/projects, the client sees that the old server (GUID1) is already using that local path. Since the IDs for the servers do not match, the client complains that c:/projects is already mapped to the old workspace on the old server. 

而且有了明確的解決方法:
The solution is to clear the cache file, as described above. The problem will not occur if you upgrade the same server (i.e., you don't create a new server). 
You can use the command "tf workspaces /remove:*" to clear out all of the cached workspaces (it only affects the cache file). You can specify /s: http://oldserver:8080 to just clear out the workspaces that were on the old server. The MSDN doc for the workspaces command are at  http://msdn2.microsoft.com/en-us/library/54dkh0y3.aspx

嘿嘿,打開VS2008的CMD,輸入"tf worksapces /remove:* /s:http://oldserver:8080"
返回VS中的TeamExplorer發現仍是不行
因而決定刪除全部的cache中的workspace
"tf workspaces /remove:*"
再次返回TeamExplorer,一切OK了:)
 
多說一句,MSDN文檔真的很爛,到如今了內容也不更新,仍是要求輸入/s:ServerName,
若是這樣輸入,會有個錯誤告訴你:URI非法,不可以識別URI的格式。
 
轉自:http://blog.csdn.net/wenjie847/article/details/5342856
相關文章
相關標籤/搜索