Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to migrate from RTC Jazz to Git?

My team was forced to migrate from SVN to the RTC Jazz scm about a year ago. since we are very unhappy with RTC we have decided to abandon it and switch over to Git for version-control.

I haven't found a lot of info about migrating out of RTC in general, but I did find this Rational Adapter for Git (that I'm not sure can be used for this kind of migration).

What will be the best way to migrate our source code and change history from RTC jazz to Git?

like image 976
Ido.Co Avatar asked May 29 '14 08:05

Ido.Co


People also ask

What is GitHub migration?

The Migration API lets you migrate the repositories and users of your organization from GitHub.com to GitHub Enterprise Server.


2 Answers

Since we run into the same issue and we wanted to keep our history we started to create a python script, which automates the process to migrate RTC SCM Stream by Stream to GIT.

The script can be found here: https://github.com/rtcTo/rtc2git

Some details how the program works - Its based on the RTC CLI.

  1. It inits an empty git repository clones it and in there it creates a workspace based on your oldest stream.
  2. For a given stream, given by a config file, it reads the baselines of the component.
  3. For each baseline of this component a compare command will be executed (to see all diffs, sadly comparing directly with latest stream throws an exception @RTC Version 5.0.1)
  4. The output of the compare will be parsed to get to the necessary informations (author, comment, date etc..)
  5. The change will be accepted in the workspace and shortly after the corresponding git command will be executed to do the same in git

For each stream a branch will be created

Basically that's it. If you want I can also provide some sample commands, which have helped me to get to the necessary information (information is quiet rare on specific stuff regarding RTC CLI).

EDIT: I consider the current version of the program as stable. So give it a try. :) I welcome any feedback.

like image 152
Joker Avatar answered Sep 21 '22 12:09

Joker


I have tested the adapter, and I confirm it is not for migration. It is for linking a git commit with an RTC change set.

The migration itself is limited, and would involve only the source control part, not the work items or the builds.

I usually set a repo workspace to the last few baselines and import them into a git working tree. I don't import the author names though.

The import takes advantage of the --git-dir and --work-tree options of the git command.
(As illustrated in this answer or this one)

You can type from anywhere:

git --work-tree=/path/to/sandbox --git-dir=/path/to/repo/.git status|add|...

Try a status first, to see what you will import. You might add to the /path/to/repo/.git/exclude file some pattern to exclude from the import elements you don't want (like the .jazz5 folder!).
Of course, /path/to/sandbox can be any sub-folder within that sandbox: you don't have to import everything.

Repeat that process with the same sandbox, updated with different baselines/snapshots, from the oldest to the newest.

That give a crude history, which is enough to start.

like image 39
VonC Avatar answered Sep 18 '22 12:09

VonC