We – the AIT TeamSystemPro Team – consult and support many customers during their transition to TFS. Data migration from existing systems such as bug trackers or version control systems are core activities of such projects. We deliver mirgation solutions for multiple systems, e.g. Perforce. The following sections describe the features and limitations of our Perforce-To-TFS migration solution.
Conceptual Differences between Perforce and TFS
The main differences between both systems are case-sensitivity of file paths (in case of Unix-based Perforce repositories) and folder handling which is described below.
- Supports Files as elements in version control
- Doesn’t support folders as version controlled elements
- Folder operations will be converted to file operations implicitly on client side.
- Supports files as versioned elements
- Supports folders as versioned elements
- Folder operations will be checked in into the source control system
Migration of complete or partial history
During the migration of a Perforce repository to TFS, all check-in operations of Perforce will be replayed in TFS. This causes a new check-in time in TFS which is different from the original check-in timestamp (see column Date in the lower figure). Thus, the migration solution adds the original timestamp to the check-in comment in TFS (see column Comment). The original check-in user however will be used during migration. To achieve this, a user mapping can be configured which maps old Perforce user accounts to their adequate windows user accounts which are used in TFS (see column User).
The type of operation as well as branch relationships will be kept as long as possible (there are limitations because branching a single element to multiple branches in one transaction is not allowed in TFS). This is shown in column Change in the above figure. Changelists from Perforce are migrated 1:1 to Changesets in TFS. Transactions are kept. The following figure shows the details of migrated Changeset 17.
The Changeset details show, that there are additional metadata migrated to the comment in TFS such as IP or name of the source Perforce repository.
The typical operations in Source Control are Add, Edit, Branch, Merge and Delete. Our migration solution will also migrate deleted (not purged) elements as the figure below shows.
Also Labels are migrated. Labels in TFS are names for versioned sets of files and folders. Labels can be listed in Visual Studio using the history window. The below figure shows the list of labels of a branch.
An important part of the migration are branch relationships. These are especially important for future integrations. Our migration solution suppotrs branches. To enable branch visualization in TFS as shown below, root branches have to be elevated to so-called branch folders in TFS manually once the migration has finished. This can be done within Visual Studio within 3 clicks per branch hierarchy.
From our point of view thare are mainly two limitations of the migration solution. In Unix-based Perforce repositories, case sensitivity of file paths and special characters might cause issues when migrated to TFS which is constrained to Windows file system on client side. Other limitations are related to branch operations which are not supported in TFS as already mentioned above.