How to Perform a Continuous Migration?

ArtinSoft has developed a process over time to allow for the re-migration of the source code of an application that is in a migration process, without losing any manual changes already applied to the migrated code.

This process is recommended to:

  • Integrate changes to the original source application in the middle of the migration process
  • Use a new version of the Visual Basic Upgrade Companion that corrects a migration issue that requires a large amount of manual changes or has a high technical complexity but are easy to implement in the migration tool (i.e.: a change that affects several files), thus optimizing the migration process.
  • Use a different Migration Profile in VBUC to handle a particular technology

This process can be performed at several stages during the migration project.

When used for optimizing the migration project it can greatly reduce the effort required by creating a feedback loop with the Visual Basic Upgrade Companion to continually increase automation and reduce the manual work involved. This is important because during migration projects, there are migration issues that are not detected until the manual changes stage is underway. If the amount of occurrences of a single type of issue is significant, it makes sense to design a solution that can be automated by the VBUC. This will fix the issue and reduce the risk of applying the fix to the migrated code manually.

The process followed by ArtinSoft is based on the industry standard best practices for branching and merging source code. It relies on the source control system, either Subversion or Visual Studio Team System, to perform a three-way merge between the Baseline Green Code, the Newly Migrated Green Code and the Current code with manual changes.

Continuous Migration Setup

The Continuous Migration process relies on the Source Control system. ArtinSoft currently uses both Subversion and Microsoft Visual Studio Team System for these tasks.

The recommended folder configuration in the Source Control System for Continuous Migration is to have three top-level folders, as shown in the following diagram:

Continous Migration configuration diagram
  • VB6.0 Source Code: Stores the Visual Basic 6.0 Source Code that will be migrated
  • Green Code: Stores the resulting Green Code from the execution of VBUC on the VB6.0 Source Code
  • Migrated Code: Originally a copy of the Green Code, all manual changes are made to this copy of the migrated source code.

Continuous Migration

Once the code is stored on the source control folder structure, the following process should be followed to perform a re-migration of the VB6 code:

  • Generate a new “Green Code” with the desired changes
  • Replace the Green Code with the newly generated Green Code in the local copy.
  • Create a Change Set between the Green Code in the Source Control System and the new Green Code.
  • Check in the Green Code changes. Make sure that a comment or tag is added with the following information:
    • Green Code Date
    • VB6 Source Code Date/ version
    • VBUC version used to generate the Green Code
  • Perform a merge between the newly generated Green Code and the current Migrated Code using the information from the Change Set. Since the Change Set only contains the changes between the previous and the new version of the Green Code, the resulting code from the merge will have both the changes in the Green Code and the Manual Changes previously performed on it.
  • Fix merge conflicts, if any.
Continous Migration Structure Diagram

By following these simple five steps it is possible to re-migrate the application several times without losing the manual changes already applied to the migrated code.


See also: