当前位置: 动力学知识库 > 问答 > 编程问答 >

tfs2010 - Move Team Projects between Team Project Collections in TFS 2010

问题描述:

At present my company uses TFS, integrated into Visual Studio 2010 to manage our code base. I've been asked to produce a proposal for moving some of our code from one team project collection to another. Specifically we have the following collections:

Development. This is the one where our developers do their work. Code is checked in on a regular basis, but there is often no easy way to revert back to previous versions of the code if necessary. This currently exists and is used on a daily basis.

Production (doesn't already exist). What we wish to implement is a production repository where ONLY the versions of code that have been put into live are stored. For instance between versions 1.0.1 and 1.0.2 we might have 20 or more check-ins from several developers, but we only want to move the code at the point where it has been deployed to live.

If I were to look at the (proposed) Production repository then I'd expect to see the codeset for my theoretical project as follows:

  • Version 1.0.2 checked in by {developer} on {Date}
  • Version 1.0.1 checked in by {developer} on {Date}

If I checked on the development repository then I'd expect loads of check ins apart from the two above. I don't want any of the development change history in my production repository.

This basic premise of this work is to ensure that we have all of the live versions of code we deploy, for audit purposes and also for ensuring we can rollback in an emergency.

I've got a sort of workaround where I get the latest version of the code, connect to the Production repository and check the code in but it seems like a note very neat solution. Googling has revealed very little of us (although I am sure I will now be pointed to 236 pages on the same subject). Ideally I'd like to do through the user-interface, but I'm not averse to scripting/coding a solution if it can be done.

网友答案:

There is no easy way to migrate or branch code from one ProjectCollection to another. ProjectCollections are the boundary in which Projects are contained. You can split an existing collection and mount it as a new project collection, but that is all.

This feature has long been requested, but will not be available for any time soon I expect.

You could create a Team Project in each existing collections to store the released version should you want to separate them. Or you can do as you are doing right now, check in the Latest Version checked out from one ProjectCollection into the other. Without history, without linkage to work items, without a link to the original code.

分享给朋友:
您可能感兴趣的文章:
随机阅读: