Pär 0 Comments
  •   Posted in: 
  • TFS

So, I admit. All my TFS projects has been fresh projects with no old code to take care of... until now.

I suddenly stood before the task to move some code from VSS to TFS, or actualy a customer wanted to...and the usual mind set was there: "How hard can it be...?"

And it turned out to be quite easy, even easier than I expected. This is what I did:

  • Archiving the project (just in case..)
  • Analyze VSS (and correct errors of course, but there wasn't any)
  • Run VssConverter in analyze-mode after creating an AnalysisSettings.xml-file:
<?xml version="1.0" encoding="utf-8"?>
<SourceControlConverter>
   <ConverterSpecificSetting>
         <Source name="VSS">
               <VSSDatabase name="c:\VSSDatabase"></VSSDatabase>
         </Source>
         <ProjectMap>
         <Project Source="$/FolderA"></Project>
         <Project Source="$/FolderB"></Project>
         </ProjectMap>
   </ConverterSpecificSetting>
</SourceControlConverter> 
  • Change the UserMap.xml-file that was generated during the analyze session.
  • Create a new team project in TFS
  • Run VssConverter i migrate-mode after creating a MigrateSettings.xml-file
<?xml version="1.0" encoding="utf-8"?>
<SourceControlConverter>
    <ConverterSpecificSetting>
        <Source name="VSS">
            <VSSDatabase name="c:\VSSDatabase"></VSSDatabase>
            <SQL Server="."></SQL>
            <UserMap name="c:\Migrate\Usermap.xml"></UserMap>
        </Source>
        <ProjectMap>
            <Project Source="$/FolderA" Destination="$/TeamProjectA">
            </Project>
            <Project Source="$/FolderB" Destination ="$/TeamProjectB/ProjectB">
            </Project>
</ProjectMap> </ConverterSpecificSetting> <Settings> <TeamFoundationServer name="My_TFS_Server" port="8080" protocol="http"> </TeamFoundationServer>
<Output file="Migration.xml"></Output> </Settings> </SourceControlConverter>

 

And it just worked!!!

In the after discussion with the pleased customer about what features in TFS he should use, he came upp with the question "Well, we have our own, in house developed, item tracking system. Is it possible to move the data from that into TFS?". And I remember that I saw the video on channel9 with Matthew Mithrik about TFS Migration Toolkit and answered: -Of course...

It'll probably be another blog post about that if the customer decide to do that and if I will be a part of it.