TFS Branching or Moving Under Source Item

跟風遠走 提交于 2019-12-10 19:03:16

问题


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

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:

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. Rename $/TeamProject/Application to $/TeamProject/Application-trunk
  2. Create a new $/TeamProject/Application directory
  3. Move $/TeamProject/Application-trunk to $/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?


回答1:


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

Here are the steps:

  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.

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:



来源:https://stackoverflow.com/questions/25434080/tfs-branching-or-moving-under-source-item

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!