This walkthrough describes how to migrate from Visual SourceSafe to Team Foundation using the VSS converter tool, VSSConverter.exe. If you have not already done so, see Walkthrough: Preparing to Migrate from Visual SourceSafe to Team Foundation for detailed information about how to prepare a SourceSafe database and user list for migration to Team Foundation and to gain a better understanding of how the migration process works.
In this walkthrough, you will accomplish the following tasks:
· Modify the settings file to specify which project folders to migrate.
· Run the converter to migrate your source from Visual SourceSafe to Team Foundation and generate a migration report.
Prerequisites
Before attempting to complete this walkthrough:
· Perform all steps as outlined in Walkthrough: Preparing to Migrate from Visual SourceSafe to Team Foundation.
· You must connect to a Team Foundation Server and create a team project, in this walkthrough we will use AdventureWorks. For more information, see Walkthrough: Joining a Team Project and How to: Create a Team Project.
· You must add your project to Team Foundation source control. For more information, see Adding Projects and Solutions to Source Control from Solution Explorer.
In addition, you need:
· A Team Foundation Server name
· You must be a member of the “TeamFoundation Administrator” group on the application tier server.
· SQL Express
SQL Express is only used by VSSConverter.exe. SQL Express is installed by default when you install Visual Studio 2005.
You must have adequate permissions to connect to a SQLExpress database to use the converter tool.
· Visual Source Safe 2005 on machine where you run VSSConverter.
Migrating SourceSafe Project Folders
Before proceeding with the actual conversion, customize your settings file to include the destination folders for the SourceSafe projects you specified when preparing for conversion. You must complete all steps as outlined in Walkthrough: Preparing to Migrate from Visual SourceSafe to Team Foundation to complete this task.
To modify the settings file
1. Click Start, click Programs, point to Microsoft Visual Studio 2005, point to Visual Studio Tools, and then click Visual Studio 2005 Command Prompt.
2. At the command prompt, type cd %DriveLetter%\VSS2TeamFoundation.
3. Copy the settings file you created for the analysis and save it under a new name.
4. Type notepad settings.xml, and then press Enter.
5. Edit the migration settings file as follows.
o In the <ProjectMap> section, for each VSS folder you are migrating, add the destination folders in Team Foundation source control. Use the following format, adding the Destination section as shown below:
<Project Source="$/FolderA" Destination="$/Team_Project"></Project> |
o To migrate everything in your VSS database, insert the following XML instead:
<Project Source="$/" Destination="$/Team_Project"></Project> |
o Under the <Settings> section, add a <TeamFoundationServer> section, and specify the name, port and protocol for the Team Foundation Server to which you are migrating. Use the following format:
<TeamFoundationServer name="MyTFSServerName" port="8080" protocol="http"></TeamFoundationServer> |
|
Note |
|
|
The converter uses SQLExpress during migration. If your migration fails due to the 4GB limit of SQLExpress, you can set the converter to use SQLServer instead by adding the following line: <SQL Server="SQL_Server_name"></SQL> below the <UserMap> node |
|
6. Save your changes and close Notepad.
To create a new settings file
1. Click Start, click Programs, point to Microsoft Visual Studio 2005, point to Visual Studio Tools, and then click Visual Studio 2005 Command Prompt.
2. At the command prompt, type cd %DriveLetter%\VSS2TeamFoundation.
3. Copy the settings file you created for the analysis and save it under a new name.
4. Type notepad settings.xml, and then press Enter. Click Yes to create a new file.
5. Copy the following XML into settings.xml:
|
|
|
<?xml version="1.0" encoding="utf-8"?> <SourceControlConverter> <ConverterSpecificSetting> <Source name="VSS"> <VSSDatabase name="c:\VSSDatabase"></VSSDatabase> <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="MyTFSServerName" port="8080" protocol="http"></TeamFoundationServer> </Settings> </SourceControlConverter> |
6. Edit the migration settings file as follows.
o In the <ProjectMap> section, for each VSS folder you are migrating, replace FolderA with your source VSS folders and replace TeamProjectA with your the destination folders in Team Foundation source control. Include a <Project> entry for all of the folders you want to migrate.
To migrate everything in your VSS database, insert the following XML instead:
|
|
|
<Project Source="$/" Destination="$/Team_Project"></Project> |
o Under the <Settings> section, in the <TeamFoundationServer> section, and specify the name, port and protocol for the Team Foundation Server to which you are migrating.
7. Save your changes and close Notepad.
Modifying User Mapping File (Optional)
Visual SourceSafe maintains a history of all versioned items that associates a source control action such as "check out" or "check-in" with a Visual SourceSafe user name, such as Admin or guest. Using the user mapping file generated during analysis, you can optionally map Visual SourceSafe usernames to a valid Windows NT users or Team Foundation Server users. When you migrate from Visual SourceSafe to Team Foundation, the converter tool uses the user mapping file, if provided as input, to correlate the Visual SourceSafe user names associated with past actions to the Windows user accounts or Team Foundation Server users account that Team Foundation source control uses to track revisions. In cases where mapping is not provided for a user, the same Visual SourceSafe user’s name is used.
To customize the user mapping file
1. At the command prompt, type notepad usermap.xml, and then press Enter.
The following XML file appears:
<?xml version="1.0" encoding="utf-8"?> <UserMappings <UserMap From="Admin" To=""></UserMap> <UserMap From="guest" To=""></UserMap> <UserMap From="Jane" To=""></UserMap> <UserMap From="Mike" To=""></UserMap> </UserMappings> |
2. For each VSS username you want map add a valid Windows NT username or Team Foundation Server username in ‘To’ Field. As shown below
<?xml version="1.0" encoding="utf-8"?> <UserMappings> <UserMap From="Admin" To="MYDOMAIN\Jennifer"></UserMap> <UserMap From="guest" To="TestAlias1"></UserMap> <UserMap From="Jane" To="Jane"></UserMap> <UserMap From="Mike" To=""></UserMap> </UserMappings> |
|
Tip |
|
Assign the Visual SourceSafe "guest" account to a Windows user account if possible to avoid losing a record of versioning actions performed on behalf of the guest Visual SourceSafe user in the past. |
3. Save your changes and close Notepad.
You can now run the converter tool in migration mode from the Visual Studio command prompt, as shown in the following steps:
To run the converter
1. On the Start menu, click All Programs, then select Microsoft Visual Studio, Visual Studio Tools, Visual Studio Command Prompt.
2. At the command prompt, type the following:
VSSConverter Migrate settings.xml
|
Tip |
|
Use the /? switch to view the available command line options. |
3. Type Y to confirm the migration.
The converter tool displays the migration status. When the conversion process completes, the tool saves a post-migration report in the current directory. You can use Internet Explorer to view the file for details.
4. When prompted, provide the password for the Visual SourceSafe admin user.
Understanding the Post-Migration Report
The VSSMigrationReport.xml report contains the following information:
· A list of files that were checked out in Visual SourceSafe during the migration process. Check out status information is not preserved.
· Items that could not be migrated because of data integrity issues in the SourceSafe database.
· Label names that changed as a result of migration because they contained characters that Team Foundation does not support.
Areas where information may have been lost during the migration process. For more information, see the Information Loss Due to Dependency section in Walkthrough: Preparing to Migrate from Visual SourceSafe to Team Foundation.
|
Note |
|
To view error and warning sections of the migration report, you may need to unblock pop-ups in Internet Explorer in Windows XP SP2. |
Migration: What Is Preserved
The converter tool copies the following historical information from SourceSafe to Team Foundation for each of the items you migrate:
· File and Folder Additions: file or folder name, date/time added, user name.
· File and Folder Deletions: file or folder name, date/time deleted, user name.
· File and Folder Undelete: file or folder name, date/time undeleted, user name.
· File and Folder Renames: old name, new name, date/time of rename, user name.
· File Edits: date/time checked in, user name.
· Label Modification: label name, data/time modified, user name.
· File and Folder Moves: old location, new location, date/time of move, user name.
|
Note |
|
Information about Move operations that occurred in a SourceSafe database is only preserved in Team Foundation if both the source and destination folder are migrated |
Migration: What Is Not Preserved
The converter tool does not preserve historical information about the following Visual SourceSafe actions:
· Sharing is not supported in Team Foundation source control. Shared files are migrated by copying the version of the file at the time sharing began to a destination folder. From then on, the changes made to the shared file are replicated to both copies.
· Branching a file. Because sharing is a pre-condition of branching, the migration of a shared file results in copying the file to the destination folder. After the branch event, the changes to any branch are migrated to the respective copy in Team Foundation source control.
· Pinning is not supported in Team Foundation source control. To help you locate items in the Team Foundation source control repository that were once pinned in the SourceSafe database, the converter tool assigns a “PINNED” label to the version that was pinned
Migration: Time Stamps
The time stamp associated with an action is not preserved during migration. Instead, the time stamp corresponding to an action is replaced by the time stamp at the time of conversion. However, the original time stamp of a user action is appended to the comment. For example, the following user action, which appears in Visual SourceSafe as:
|
User Action |
Version |
Time Stamp |
Comment |
|
$/ProjectA/a.c checkin |
5 |
June 3, 2002 12.30pm |
Fixed bug in Screen “Welcome” |
appears as follows in Team Foundation.
|
User Action |
Version |
Time Stamp |
Comment |
|
$/ProjectA/a.c checkin |
5 |
May 2, 2004 3.30pm |
{06/03/2002 12.30 PM}
Fixed bug in Screen “Welcome” |
See Also
Tasks
Walkthrough: Migrating from Visual SourceSafe to Team Foundation