安全删除 TFS 分支项目 [英] Safely delete a TFS branch project

查看:21
本文介绍了安全删除 TFS 分支项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在为大量解决方案重新组织我们的 TFS 源代码控制,到目前为止我已经成功地完成了这项工作.

I'm currently reorganising our TFS source control for a very large set of solutions, and I've done this successfully so far.

我现在遇到一个问题,我需要删除为旧结构分支的遗留发布分支"TFS 项目,并且不再需要,因为我现在在新结构中托管一个发布分支.

I have a problem at the moment where I need to delete a legacy "Release Branch" TFS project that was branched for the old structure, and is no-longer required since I now host a release branch within the new structure.

这是移动所有内容后源代码管理现在的样子的示例:

This is an example of how the source control now looks after moving everything:

$/Source Project
    /Trunk
        /[Projects]
    /Release
        /[Projects]

$/Release Branch Project
    /[Projects]
    /[Other legacy stuff]

到目前为止,我发现的信息是:

So far I've found information that says:

  1. tf 删除/lock:checkout/recursive TestMain 删除一个分支.
  2. TfsDeleteProject 删除项目

tf delete 似乎仅在我需要删除与主干位于同一项目中的分支时才相关,而 TfsDeleteProject 似乎不会从源项目中删除分支关联(希望我错了,见下文).

tf delete seems to be only relevant when I need to delete a branch that is within the same project as the trunk, and TfsDeleteProject doesn't seem like it will delete the branch association from the source project (I hope I'm wrong, see below).

有人能告诉我上面的方法是否可行,我应该以什么顺序执行它们,以成功删除 TFS $/Release Branch Project 同时删除分支关联(从右侧 -点击$/Source Project -> Properties -> Branches)?

Can someone tell me if the above will work, and in what order I should perform them in, to successfully delete the TFS $/Release Branch Project while also deleting the branch association (from right-click $/Source Project -> Properties -> Branches)?

推荐答案

在 TFS 中你通常不能永久删除团队项目中的任何内容(而 TfsDeleteProject 删除一个完整的团队项目,但不清楚如果源代码管理内容实际上将被删除,因为团队项目只是源代码管理树的顶层).

In TFS you generally cannot permanently delete anything inside a team project (and TfsDeleteProject deletes a complete team project, but it is not clear if the source control content will actually be removed as a team project is just the top level of the source control tree).

删除一个文件或整个文件集只是另一个跟踪更改,回到历史记录仍然可以看到.

A delete of a file, or whole set of files is just another tracked change, go back into history and it can still be seen.

您可以使用权限使其无法被所有人访问.或者在过时"团队项目下重命名.

You could use permissions to make it inaccessible to all. Or rename under an "Obsolete" team project.

编辑(我终于记得这个命令在哪里了):

EDIT (I finally remembered where this command was):

还有一个选项,从命令行:tf destroy:

There is another option, from the command line: tf destroy:

从 Team Foundation 版本控制中销毁或永久删除受版本控制的文件.

Destroys, or permanently deletes, version-controlled files from Team Foundation version control.

我希望这会删除分支记录以创建现已销毁的文件...但您可能需要检查.

I would expect this to remove the branch records to create the, now destroyed, files... but you might need to check.

这篇关于安全删除 TFS 分支项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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