开发者

Move project from TFS2005 to TFS 2008

Does anyone know how to export/transfer a single project from one TFS Server to another?

I have two TFS servers at work, the old one (demo1) that started off as a demo thing and then stayed in too much use, and the new server: TFS1.

All this was done before my time and I've just had to deal with the issues.

Most of the projects didn't need their history/branch info. But one did. Unfortunatly it was decided a good long while ago to move all projects (no history just a straight copy off the file) except this one large project.

开发者_运维百科

This means that TFS1 now has it own history on a bunch of smaller projects and demo1 is solely used for the large project.

We now want to move this one project and all its history, (branches are less important as we can take straight copies of the release code)

Does anyone know how to export/transfer a single project from one TFS Server to another? Is there a tool out there that can do this sort of thing?


You should start by taking a look at the TFS Integration Platform on codeplex. This used to be the TFS to TFS Migration tool. You'll probably have to modify the tool pretty significantly to pick up the history. It's been a while since we've used it, but it was pretty straightforward to modify.

Alternatively, you could write this specific-purpose tool relatively easily yourself.

What you're going to need to do is multiple migrations, all based on changesets for that project. The basic logic is going to be:

  • Connect to both TFS Servers
  • Get the oldest code from the old TFS server.
  • Copy it to a working folder mapped on the new TFS server
  • Check in.
  • LOOP:
    • Get the next changeset
    • Iterate through the files in the changeset
    • Pend Edit them in the new working folder
    • Copy Changes
    • Check in with the same notes as the old changeset

The ID of the person who checked the stuff in isn't going to be preserved, nor are any associated workitems, but you'll have the majority of your changes.

You will have to handle (or, in some cases, ignore) special check-in circumstances (e.g. adds, deletes, renames, branches, merges), but this should be pretty easy to do.


I went through this process a few years ago, and we found several unsupported tools to automate this, but both the tools I tried were crappy and did not do a good job of moving the project over. We ended up just manually porting active projects to the new server, and keeping the old one around for history only.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜