Team Foundation Server - Moving Source with History

前端 未结 4 1459
梦毁少年i
梦毁少年i 2020-12-24 10:19

I was wondering what the best approach might be in moving source code, with history, from one Team Project to another Team Project. I am not concerned with work items, repo

4条回答
  •  南方客
    南方客 (楼主)
    2020-12-24 11:20

    Richard's answer above is well written and explains the situation well. I did have a couple more practical gotcha to add, however.

    In TFS2010, the default behavior makes it seem like moving a file causes you to lose all history from before the move. The command my users are likely to use (and the one used, it seems, by the VS2010 GUI) is:

    tf history $/ProjectB/somefile.cs
    

    My users intend to get all the history of somefile.cs, both before and after the move. They want "the history of the code that is currently stored in $/ProjectB/somefile.cs", regardless of the filename at any point in time. Maybe other people see it differently.

    The first gotcha is that the GUI that appears for me in VS2010 using TFS2010 initally shows only the history since the move. The least-recent item in the list is the rename operation. It can be expanded with a subtle little drop-down arrow. Underneath is the history from the previous location. If you don't know to look for this, it can look like your history is gone.

    The second gotcha is that if you later delete ProjectA (because you've finished the migration to ProjectB, say), the history really is gone. Expanding the drop-down in the history for $/ProjectB/somefile.cs doesn't produce the older history.

提交回复
热议问题