SVN to IBM Rational Team Concert Migration Tutorial

Subversion (SVN) to IBM Rational Team Concert (RTC) Source Control Repository Migration Tutorial:

In our previous articles on Software Configuration Management, we explored all about the integration of Atlassian JIRA and IBM Rational Team Concert with Subversion.

It focused on simply creating links from Issues or Work Items to Subversion revisions thereby maintaining traceability which is what Application Life Cycle Management (ALM) is meant for from the point of view of integrating all disciplines in the life cycle.

Subversion to IBM RTC Migration

Integration mainly involves maintaining or administering 2 different tools which sometimes may become an overhead. Hence, teams look to migrate data with history into one single repository and maintain the same.

In this article, we will take an in-depth look at migrating Subversion data into IBM Rational Team Concert source control repository which will involve the following steps assuming that there is already an SVN repository and we need to migrate to IBM Rational Team Concert.

  • Create an SVN repository using TortoiseSVN.
  • Creating an SVN DUMP file – Version 2.
  • Importing the SVN DUMP file into IBM Rational Team Concert component.

Pre-requisites

The following pre-requisites are to be in place for the migration.

Tortoise SVN – This is a Subversion client and is installed as Windows Explorer shell extension. Download the same from here for either 32 bit or 64 bit OS.

IBM RTC P2 plugin for Eclipse to connect to the RTC repository needs to be installed with a connection to the Jazz Server. The plugin can be downloaded from jazz.net site for the appropriate RTC 6.0.x version. Procedure to install the P2 plugin can be found here

Creating a SVN repository from Tortoise SVN

Once Tortoise SVN is installed, you can see the extension in windows explorer with some extra options during a right – click or from the File menu.

For Example, you can see the options SVN Checkout and TortoiseSVN options in the below screen.

Tortoise SVN

To create a SVN repository, create an empty folder. For Example, d:\SVN-Project-Repo.

Create a project folder Emp-Project under this and right-click on the Emp-Project folder and select TortoiseSVN => Create repository here.

TortoiseSVN-Create repository here

In the following screen click OK. Do not click on any other option.

Repository created

The following contents are added into the Emp-Project folder.

contents in the Emp-Project folder.

Even though pre-defined contents are added, here the repository is empty. We need to add related project artifacts and download it to the working directory.

Import Contents into the SVN Repository

From the previous step, as we have seen that there are no contents in the repository. We will need to upload project contents to the repository. For this, you will have 2 directories.

Directory 1

Create the project folder with some files. This is the folder where the project team normally stores its contents.

For Example: d:\Project-Artifacts

Project Artifacts

Directory 2

Create folder structure as shown.

D:\temp4\new\branches

D:\temp4\new\tags

D:\temp4\new\trunk

MOVE (Not COPY) the contents of the folder d:\Project-Artifacts (Directory 1) to the folder D:\temp4\new\trunk

Trunk

Import Contents of New Folder to SVN repository

We will now import the contents of the new folder (Directory 2 as above) into the SVN repository created earlier.

Right-Click on the new folder and select TortoiseSVN Import. Enter the repository as file:///D:/SVN-Project-Repo/Emp-project which was created earlier and click OK.

TortoiseSVN Import

TortoiseSVN Import finished

Click Ok.

Looking at the repository browser will show the contents in the SVN repository.

contents in the SVN repository


This repository can then be checked out into any particular working directory for developers in order to make changes and commit to the repository.

In the next section, we will see how to create a SVN DUMP file version 2. This is the version which is supported by IBM Rational Team Concert – SVN Importer. SVN DUMP file version 3 is not supported for import.

Creating the SVN DUMP File

Now as we have the repository created and contents imported, we can now create the SVN DUMP file (particularly Version2 only) using the command ‘svnadmin’ which will then be used to import the same into the IBM Rational Team concert component.

Go to the TortoiseSVN\bin folder of installation. Run the following command to create the DUMP file.

C:\Program Files\TortoiseSVN\bin>svnadmin dump D:\SVN-Project-Repo\Emp-project > d:\temp4\RTC-Import.dump

create the DUMP file

We can now proceed to import the DUMP file into IBM RTC.

Importing a Subversion Dump File

In the previous section, we saw how to generate a SVN DUMP file which includes the full contents of a SVN repo.

We will now import the SVN DUMP file contents into a new or an existing RTC component. We can import the contents completely or choose what to import.

Recommended Reading => How IBM Rational Team Concert Version Control works

Before we import, the DUMP file lets us create a RTC stream and Component to hold the imported contents from SVN.

In RTC Eclipse client, make sure that you are connected to a RTC Project area which is visible in the Team Artifacts view.

connected to a RTC Project area

Right click on the Source Control folder and select New =>Stream.

Select New Stream

create a New Component

Enter a name for the stream and create a New Component. Click OK.

Click on the Save button.

the Stream and Component

We now have the Stream and Component created which we will use to import and hold the SVN repository contents. Post this creation, you will also need to create a repository workspace to hold the contents of the component. Right Click on the Stream just created and select New => Repository Workspace.

Repository Workspace

To import the SVN DUMP file, login to RTC using the Eclipse and select File => Import.

Repository Workspace import

Select Jazz Source Control SVN Dump. Click Next.

SVN Dump

Select the DUMP file created in the previous section and click Next.

Select the DUMP file created

Select the RTC stream and component and click Next.

Select the RTC stream and component

In the following screen click on Next. Here we are importing all Revisions.

importing all Revisions.

Select the first radio button.

importing all Revisions-select the radio button

Click Next.

Click on Finish in this step. The next screen will be prompted for folders to import from Trunk into the RTC component.

folders to import from Trunk in to the RTC component.

Select the folders to import and click on Next.

folders to import

Users mapped are shown. Click on Finish.

Users mapped

Note: Depending on the size of the Dump file, it may take some time to import. During import do not preferably lock the machine.

From the Pending Changes view we can look at the repository files imported from the SVN DUMP. Right-click on the component and select Show =>Repository Files.

Repository Files

Repository

The files and folders are seen and can be worked upon from the package explorer.

package explorer

Results and Checks

After the import completes,

  • You can add the new component to a stream or,
  • If you imported into an existing component, deliver the imported changesets, so that the other team members can use them.
  • Check the contents and number of files/folders imported correctly.

Summary

Sometimes, as a project team, we need to ensure that these version control repositories are single and the team does not maintain multiple repositories. This article will help any team to move on to a single version control repository.

Post the migration to IBM RTC repository, we can use the other features of RTC which is work items, complete features of SCM or version control within RTC and most importantly Build management for Continuous Integration to move on to the DevOps culture.

Happy Reading!!