This project is read-only.

Creating a VC Migration tool


The task of migration is broken up into two major phases, analysis and migration, which run in parallel within a single host process.

During analysis, the source system is queried to determine what changes need to be mirrored to the target system. That change metadata is converted into a format the migration phase understands and is stored in a SQL database. During the migration phase the data created during the analysis phase is loaded, and the migration actions are executed against the target system.


Implementing a VC migration tool
This section outlines the classes a converter author would need to implement and how they relate to the base classes and interfaces provided by the toolkit. In this example, the author is writing a migration tool to provide bidirectional mirroring between TFS and a source system named Widget. This section does not include the host process that the converter needs to run in.

Migration to TFS

If the tool author only intends to create a one-way migration tool then they only need to implement these types.

Common Classes

Class Toolkit Parent(s) Notes
WidgetMigrationItem IMigrationItem This class uniquely describes a single revision of a single item in the Widget version control system. This type will eventually be persisted as XML to a SQL database (via the WidgetMigrationItemSerializer) during the analysis phase and loaded/used during the migration phase.
WidgetMigrationItemSerializer IMigrationItemSerializer This type is used to serialize and deserialize the WidgetMigrationItem type. This type will be used by the ChangeGroupingManager class.
WidgetProviderFactory IConfigFactory This type is loaded when the migration configuration is loaded. It is used to create an instance of the WidgetProvider type.
WidgetProvider IVersionControlEndPoint This type is the end point for the Widget version control system.

Analysis Phase

Class Toolkit Parents Notes
WidgetToTfsAnalysisEngine n/a This class implements the functionality necessary to extract history from the Widget version control system and create the ChangeGrouping instances necessary to replay those actions on the TFS server. There is currently no base class for this type since the behaviors are so specific to the Widget system.

Migration Phase

Class Toolkit Parents Notes
WidgetToTfsMigrationEngine SourceToTfsMigrationEngine This class implements the functionality necessary to migrate the actions generated during the analysis phase (WidgetToTfsAnalysisEngine) to the TFS version control server.

Bi-Directional Synchronization with TFS

If the author intends to perform bi-directional migration of version control history, the following types must be implemented.


Class Toolkit Parents Notes
TfsToWidgetAnalysisEngine TfsToSourceAnalysisEngine This class performs the analysis of the TFS system and creates the ChangeGrouping instances that represent the revision history to migration.
TfsToWidgetAnalysisAlgorithms TfsAnalysisAlgorithms The TfsAnalysisAlgorithms class is a helper class that contains the known change type combinations that TFS can contain. This provides a prescriptive framework for writing the analysis engine in a way that will allow the most code reuse. The TfsToWidgetAnalysisEngine uses this class to handle the individual TFS changes.


Class Toolkit Parents Notes
Tfs2WidgetMigrationEngine VCMigrationEngine This type loads the ChangeGrouping instances created by the TfsToWidgetAnalysisEngine and performs the necessary actions to perform those actions on the Widget version control system.

Last edited Apr 19, 2007 at 11:18 PM by mmitrik, version 2


No comments yet.