当TFS服务器不再存在时,如何在客户端上强制删除TFS 2010工作区? [英] How do you force the deletion of a TFS 2010 workspace on a client when the TFS Server no longer exists?

查看:169
本文介绍了当TFS服务器不再存在时,如何在客户端上强制删除TFS 2010工作区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前有一个在SERVER-1上运行的TFS 2010服务器.在我的客户端(MY-CLIENT)上,我正在运行VS2010,并具有将SERVER-1与\ MY-CLIENT \ Development关联的工作空间.一切都很好.

I currently have a TFS 2010 Server running on SERVER-1. On my client (MY-CLIENT) I have VS2010 running and have a workspace associating SERVER-1 with \MY-CLIENT\Development. All is good.

我正在尝试在SERVER-2上设置另一个TFS实例.在我的客户端上,我删除了原始的SERVER-1工作区,并创建了一个新的工作区,将SERVER-2与\ MY-CLIENT \ Development关联.一切都很好.

I was playing around with setting up a different instance of TFS on SERVER-2. On my client, I deleted the original SERVER-1 workspace and created a new workspace associating SERVER-2 with \MY-CLIENT\Development. All is good.

完成了在SERVER-2上使用TFS的实验后,我对该机器进行了重新映像(删除了SERVER-2上的TFS服务器).

Having finished my experiments with TFS on SERVER-2, I re-imaged the machine (deleting the TFS Server on SERVER-2).

然后,我返回到客户端计算机,重新连接到SERVER-1上的TFS,并尝试将源代码控制重新映射到我的Development文件夹.但是,现在收到错误"路径\ MY-CLIENT \ Development已映射到工作空间MY-CLIENT; SERVER-2 \ Steve 中."现在我有问题.

I then went back to my client machine, reconnected to TFS on SERVER-1 and attempted to remap source control to my Development folder. However, am now receiving the error "The path \MY-CLIENT\Development is already mapped in workspace MY-CLIENT;SERVER-2\Steve." Now I have a problem.

因此,据此我想我应该在重新映像机器之前首先删除SERVER-2工作区.不幸的是,我没有那样做.

So, I gather from this that I should have first deleted the SERVER-2 workspace BEFORE re-imaging the machine. Unfortunately, I did not do that.

在一些论坛中闲逛,我意识到我可以使用命令行工具将其删除:

Poking around in some forums, I realize that I can use a command line tool to perhaps delete it:

tf workspace /delete MY-CLIENT;SERVER-2\Steve

但是,当我运行此程序时,收到一条消息,指出" Team Foundation服务无法从服务器

However, when I run this, I get a message indicating that "Team Foundation services are not available from server http://SERVER-2:8080/tfs/development."

那么问题是,如何在客户端上强制删除SERVER-2工作区,以便可以重新创建旧的SERVER-1工作区?

So the question, then, is how do I force deletion of the SERVER-2 workspace on my client so that I can re-create my old SERVER-1 workspace?

推荐答案

所有本地工作区的工作文件夹映射存储在版本控制缓存文件中.这使您可以引导TFS客户端,从而使它们能够找到给定本地文件夹的服务器信息.此外,它将提供您正在查看的该测试的信息,以防止将本地文件夹映射到两个不同的服务器.

The working folder mappings for all the local workspaces is stored in the version control cache file. This allows you to bootstrap TFS clients, allowing them to locate the server information for a given local folder. In addition, it will provide the information for this test you're seeing, that prevents a local folder from being mapped to two different servers.

为了进行清理(不尝试连接到服务器),可以使用tf workspaces命令(请注意复数-workspaces命令在工作区列表上运行) ,workspace命令在工作区上运行,并且通常需要连接到该工作区所在的服务器.

In order to clean this up (without trying to connect to the server), you can use the tf workspaces command (note the pluralization - the workspaces command operates on the list of workspaces, the workspace command operates on a workspace and generally requires connectivity to the server that workspace is located on.

要删除已删除项目集合的所有工作空间,可以执行以下操作:

To delete all workspaces for your deleted project collection, you can do:

tf workspaces /remove:* /collection:http://server-2:8080/tfs/DefaultCollection

(显然用已删除服务器的URI替换了项目集合URI.)

(Obviously replacing the project collection URI with the URI for your deleted server.)

这篇关于当TFS服务器不再存在时,如何在客户端上强制删除TFS 2010工作区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆