Hi folks ,

This is the second part on how to migrate from our Visual source safe into Team foundation server for your agile source control environment, i will repeat the previous step last time which was going to the 3rd step ,

Step 3 – Analyze Your Projects in VSS

In this step, you determine which projects you want to migrate and then run the TFS command-line tool VSSConverter.exe to analyze the VSS database for any potential issues that might cause migration problems.

 

1. Create an Extensible Markup Language (XML) settings file (named for example, ConversionSettings.xml) as follows:

 

<?xml version=”1.0″ encoding=”utf-8″?>

<SourceControlConverter>

<ConverterSpecificSetting>

<Source name=”VSS”>

<VSSDatabase name=”c:\VSSDatabase”>

</VSSDatabase>

</Source>

<ProjectMap>

<Project Source=”$/MyFirstProject”></Project>

 

<Project Source=”$/MySecondProject”></Project>

</ProjectMap>

</ConverterSpecificSetting>

</SourceControlConverter>

 

 

In the above example, MyFirstProject and MySecondProject represent the names of the project folders in VSS that you want to migrate. To migrate an entire VSS database, use <Project Source=”$/”></Project>.

 

2. Run VSSConverter.exe passing in the Analyze switch, from a Visual Studio command prompt to analyze your projects:

 

VSSConverter Analyze ConversionSettings.xml

When prompted, enter the Visual SourceSafe administrator password.

 

3. Examine the output report and identify any conversion errors. The conversion tool creates an output report named VSSAnalysisReport.xml.

 

4. Map VSS users to TFS users. The VSSConverter tool creates a UserMap.xml file that contains a list of all VSS users who performed at least one operation on the VSS database. Edit the UserMap.xml file and add your associated TFS usernames (Windows accounts). You must specify user names including the domain (MyDomain\MyUserName). The following example shows a Usermap.xml files that contains the VSS user accounts in the From attribute and the associated TFS usernames in the To attribute.

 

<?xml version=”1.0″ encoding=”utf-8″ ?>

<UserMappings xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”>

<!–

This file is automatically created by VSS Converter. You can optionally use the file to map

a VSS user to a Team Foundation user. For example, <UserMap From=”Jane” To=”MyDomain\Janep”></UserMap>

This mapping causes all actions logged by VSS user “Jane” to be changed to Team

Foundation user “MyDomain\Janep” during migration.

–>

<UserMap From=”ADMIN” To=”Contoso\Administrator” />

<UserMap From=”Dave” To=”Contoso\DaveM” />

<UserMap From=”Chris” To=”Contoso\ChrisP” />

<UserMap From=”John” To=”Contoso\JohnR” />

</UserMappings>

 

 

Step 4 – Prepare to Migrate Your Projects

In this step, you use the VSSConverter.exe tool to migrate your VSS projects.

 

1. Modify the ConversionSettings.xml file created in Step 3 adding a new <Settings> element containing a <TeamFoundationServer> element as shown here:

 

<SourceControlConverter>

<ConverterSpecificSetting>

</ConverterSpecificSetting>

<Settings>

 

<TeamFoundationServer name=”YourTFSServerName”

port=”PortNumber”

protocol=”http”>

 

</TeamFoundationServer>

</Settings>

….

</SourceControlConverter>

Add the <Settings> element directly after </ConverterSpecificSettings> as a child element of <SourceControlConverter>.

2. Modify the ConversionSettings.xml file you created adding Destination attributes to the <Project> elements as shown below. Set the value of the Destination attributes to the folder location in your TFS Team project to which you want to migrate your files.

 

<?xml version=”1.0″ encoding=”utf-8″?>

<SourceControlConverter>

<ConverterSpecificSetting>

<Source name=”VSS”>

<VSSDatabase name=”c:\VSSDatabase”>

</VSSDatabase>

</Source>

<ProjectMap>

<Project Source=”$/MyFirstProject”

Destination=”$/MyTeam_ProjectOne”>

</Project>

<Project Source=”$/MySecondProject”

Destination=”$/MyTeam_ProjectTwo”>

</Project>

</ProjectMap>

</ConverterSpecificSetting>

<Settings>

<TeamFoundationServer name=”YourTFSServerName”

port=”PortNumber”

protocol=”http”>

</TeamFoundationServer>

</Settings>

</SourceControlConverter>

In the <ProjectMap> section, for each VSS folder that you are migrating, replace MyFirstProject with the source VSS folders and replace MyTeam_ProjectOne with the destination folders in TFS source control. Include a <Project> entry for all the folders that you want to migrate.

 

Step 5 – Migrate Your Projects

 

Copy your VSS database to a local folder such as C:\VSSDatabases on the computer on which you want to run analysis and migration. Although you can migrate a VSS database to a shared folder on a remote computer, the migration takes much longer to finish.

1. At the command prompt, type the following.

 

 

VSSConverter Migrate Conversionsettings.xml

 

2. Enter Y to confirm the migration. When prompted, enter the password for the Visual SourceSafe admin user.

 

Additional Considerations

 

If you used, sharing, branching or pinning in VSS you should be aware of the following issues.

 

·         Sharing. Team Foundation Server does not support sharing of files. Shared files are migrated by copying the version of the file at the time sharing began to a destination folder. Any subsequent changes made to the shared file are replicated to both the shared and the original copies.

·         Branching. Because branching in VSS uses sharing, the migration of a branched file results in the file being copied to the destination folder in TFS source control. After the branch event, the changes to any branch are migrated to the respective copy in TFS source control.

·         Pinning. Team Foundation Server does not support pinning. To help you locate items in Team Foundation source control that were once pinned in the VSS database, the VSSConverter tool labels any file that was pinned with the “PINNED” label.

 

For optimum performance (especially important for large VSS databases), run the conversion on your TFS server computer.

Additional Resources

• For more information on how to prepare for migration, see http://msdn2.microsoft.com/en-us/library/ms181246(en-us,vs.80).aspx

                For more information on how to perform the migration, see http://msdn2.microsoft.com/en-us/library/ms181247(VS.80).aspx

                For more information on the limitations of the Visual SourceSafe converter, see http://msdn2.microsoft.com/en-us/library/ms252491(VS.80).aspx

                For more information about the VSS Analyze tool, see http://msdn2.microsoft.com/en-us/library/ysxsfw4x.aspx.

                For more information about the VSSConverter migrate command, see http://msdn2.microsoft.com/en-us/library/ms400685(VS.80).aspx

 

Leave a Reply

You must be logged in to post a comment. Login »