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

查看:208
本文介绍了安全删除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.

我遇到了一个问题现在,我需要删除为旧结构分支的旧版 Release Branch 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 delete / lock:checkout /递归TestMain 删除分支。

  2. TfsDeleteProject 来删除项目

  1. tf delete /lock:checkout /recursive TestMain to delete a branch.
  2. TfsDeleteProject to delete a project

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 $ /发布分支​​项目,同时还删除了分支关联(通过右键单击 $ / Source Project ->属性->分支) ?

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天全站免登陆