One major part of the VSTS project, is the migration of existing assets from VSS into TFS.
MSDN article: http://msdn2.microsoft.com/en-us/library/ms253060(VS.80).aspx
I wrote this post over several weeks so as to group migration related stuff together, so don’t mind the changes in tense.
The initial plan is to only migrate the source code and assets of the App Dev group. We did some test runs during the planning phase and the idea is do this during the Test (QA) phase of a patch, viz. to lockdown VSS and ask developers to hold-off check-ins.
For us, the migration mainly consists of asp, vb script and some .NET 1.1 and 2.0 code. FYI, the type of artifacts do not really matter because the migration is file-based.
One of the key decisions made was around what items to migrate. We decided to leave the C++ code in VSS since it is being deprecated and rarely modified, but migrate classic asp code to TFS so that developers could use only one dev environment…to fix bugs in classic asp and to develop new features in .NET 2.0.
Another key decision was planning our target Team Projects and the related Configuration Management process, which I will write about in another post.
Before I bore some of you with details of the migration, let me jot down some lessons learnt:
- Be aware of the differences between TFS and VSS (linking, labels, etc.)
- Know the limitations of the conversion tool (labels not converted, etc.)
- Plan your target Team Projects well.
- If you have a big folder to migrate, split the conversion into smaller chunks of it’s sub-folders. Have a small plan for the root files.
- Work on a copy of the VSS database, so you can manipulate folders in there.
- Do not do test migrations in the “production” TFS because there is no way to clean up clutter. Hopefully the “destroy” feature in Orcas will resolve that.
- Plan to keep VSS around for a while as an archive and a reference (for labels, etc.)
Now, the details:
We are using the VssConverter (command-line) tool for the migration. There is a GUI written for this (http://www.epocalipse.com/blog/2006/04/06/vssconverter-gui/) but we didn’t really care about it. It’s a pretty simple tool that basically migrates a folder from VSS to TFS based on a bunch of settings defined in an XML file. It needs SQL Server (Express is fine) to store intermediate information as part of the process. Note that it also needs VS 2005 installed on the machine.
There are some caveats to this migration process, that you will need to consider depending on the layout of your codebase, because some features of VSS like shared or linked files are not supported in TFS. Our solution to that was to eventually duplicate these items and use them independently for now. The linked stuff makes it confusing anyway and the “right” solution for this (VSS or not) is to include files across projects.
One limitation of the tool is that History comments of files are migrated, but the timestamps are not; they are instead prefixed in the comments. The check-in timestamps in TFS reflect when those versions are checked-in into TFS (I assume the tool just uses the TFS API instead of hacking the original timestamps into the database).
This may not be critical but may be important if you’re doing some time-based analysis or sorting.
Also, an important to-do is to first run the Analysis option and map the VSS users to TFS users (in an XML file). (I do not know what user it defaults to for unknown users in TFS).
To isolate the migrated assets, I created a Team Project called Production and put in the stuff into a folder called Legacy. I did this with the idea of eventually moving “used” files into another branch so dead files can be weeded out.
This blog post giving good insight into the conversion implementation: http://blogs.msdn.com/ankur/archive/2005/09/14/466493.aspx
Network problems disrupted our migration and although the tool could resume a few times, the last disruption messed it up and it kept giving an error (I forgot what exactly) and I had to do some major hacking to complete the migration.
I ended up on the MSDN boards and finally got in touch with Ankur, who I think was the main author of the tool. He was a great help in pointing out things which were not possible in the tool and in TFS, so I had to do some very weird workarounds to convert the remaining files.
My major problem was that a large sub-folder was taking too long to convert and we had a network glitch each morning that threw it off and so I had to split it into smaller chunks for conversion. Although one can specify sub-folders to migrate, files in the root pose an issue since the conversion tool is folder based and not file based. So, I ended up making a copy of the folder in VSS and dropping all the sub-folders so it only had the root files and then specifying the same target in TFS. Note: I did try creating a new folder (project) in VSS and dropping (which created links) the root files in it. But then the tool would not pick up any history because they were linked files.
Anyway, our migration is now complete. I did a compare from the files in VSS and TFS and things look good. If you need help or advice about this, feel free to contact me.
March 27, 2007 at 7:29 pm
Good day
i was reading your blog searching for a solution for a TFS migration of a big folder. I have the exact same problem that you had when you tried migrating a VSS database into chunks.
Migrating the different subfolders works well, but the root files do not get migrated. I tried your solution, which was to copy the folder in VSS and remove the subfolders, then in the .xml file, to set to the same destination..
However, VSSConverter gives me this exact error when I try to convert after doing this:
TF60099: Given folder mappings do not match with last migrated mappings. Followiung was the original mapping please use this only for incremental migration. (some path information)
I guess migration should NOT be incremental, but, i’m getting lost and lost.
any help would be incredibly appreciated !!
thank you
Patrick Bureau
May 25, 2007 at 10:46 am
I have to migrate from VSS to TFS for a project that runs on .NET 1.1. What all will be required?
March 20, 2008 at 4:18 pm
Currently, we are using Visual Source Safe for legacy asp and vb 6 application. The application is hosted in a development server. All developers in the company checkout the files to modify and check back in. The legacy asp files are then run from the server itself. My question is, if we migrate to TFS, which stores the file in database, will we be able to run legacy asp files from dev server?
August 4, 2008 at 12:36 pm
I’m working with the same issue now. I’ve 2G of data and want to migrate it to TFS. But it takes pretty longer to process. Am I supposed to divide it into chunks or will it be fine to work with a single action???!!!
Kindly guide me asap…
August 15, 2008 at 7:59 pm
Although more manual work, dividing into chunks is better if you can isolate branches to migrate.
That way, any errors can be identified early and migration can be repeated as required.
A huge payload could get thrown off by a network blip and you would need to start all over again.
August 13, 2009 at 10:32 am
I am looking forward for migrating VSS to TFS .NET 3.5. Is there any way to estimate the efforts and time required for going ahead with this migration/