TFS 在源项下分支或移动 [英] TFS Branching or Moving Under Source Item

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

问题描述

我有一个 Team Foundation Server 2013 代码结构,如下所示...

I have a Team Foundation Server 2013 code structure like follows...

$/TeamProject/Application/AllTheCodeFiles

...但我想重构以拥有...

...but I'd like to refactor to have...

$/TeamProject/Application/Trunk/AllTheCodeFiles

这将允许我通过在与Trunk"相同的级别创建Release"分支来实施分支和合并策略.

Which will allow me to implement a branching and merging strategy moving forward by creating "Release" branches at the same level as "Trunk".

如果我尝试分支或将应用程序目录移动到主干中,我会收到错误消息:

If I try to either branch or move the Application directory into Trunk, I get the error message:

目标项目 $/TeamProject/Application/Trunk 不能在源项目 $/TeamProject/Application 下.

The target item $/TeamProject/Application/Trunk cannot be under the source item $/TeamProject/Application.

所以,这是我遵循的过程,感觉不对,我猜有一种更有效的方法可以做到这一点.

So, here's the process that I followed, it feels wrong and I'm guessing that there's a more efficient way of doing this.

  1. $/TeamProject/Application 重命名为 $/TeamProject/Application-trunk
  2. 创建一个新的$/TeamProject/Application 目录
  3. $/TeamProject/Application-trunk 移动到 $/TeamProject/Application/Trunk
  1. Rename $/TeamProject/Application to $/TeamProject/Application-trunk
  2. Create a new $/TeamProject/Application directory
  3. Move $/TeamProject/Application-trunk to $/TeamProject/Application/Trunk

执行此操作后,历史记录与 $/TeamProject/Application 相关联,而不是 $/TeamProject/Application/Trunk.我的问题是,知道更多的人会以什么方式这样做?

After doing this, history is associated with $/TeamProject/Application not $/TeamProject/Application/Trunk. My question is this, someone who knows more would do this in what manner?

推荐答案

我刚刚完成了我将在测试 TFVC 上执行的操作,并且在版本历史记录方面一切正常.

I've just gone through what I would do on my Test TFVC and things seem OK version history wise.

步骤如下:

  1. $/TeamProject/Application/
  2. 开始
  3. $/TeamProject/Application/Main/ 创建一个文件夹(TFVC 约定 - Trunk 是 SVN)
  4. 签入待处理的更改.
  5. 将所有文件和文件夹从 $/TeamProject/Application/ 移动到 $/TeamProject/Application/Main/
  6. 签入待处理的更改.
  7. $/TeamProject/Application/Main/ 转换为分支.
  1. Start with $/TeamProject/Application/
  2. Create a Folder at $/TeamProject/Application/Main/ (TFVC Convention - Trunk is SVN)
  3. Check in pending changes.
  4. Move all files and folders from $/TeamProject/Application/ to $/TeamProject/Application/Main/
  5. Check in pending changes.
  6. Convert $/TeamProject/Application/Main/ to a branch.

这是在移动 (C62) 之前添加 (C58) 和编辑 (C59) 然后在移动之后编辑 (C63) 的文件的历史记录:

Here's the history of a file that was added (C58) and edited (C59) before the move (C62) and then edited (C63) after the move:

这篇关于TFS 在源项下分支或移动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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