How to export/import source code history from one RTC instance to another ?
We have 2 existing project areas in 2 RTC instances residing in 2 different physical consoles and databases.
Now one of the product team has decided to move it's project area assets(source code, streams,components,snapshots, work items with all the history) and merge with other product that is hosted on another RTC instance. Ideally they want to use 1 project area with out loosing any history for the proejct area that is being migrated.
Work items generally can be exported in CSV format and imported to the 2nd project area using RTC eclipse client export and import feature.
What is the option provided by Rational to do the same for source code history migration from one RTC instance to another ?
Is there any export import feature for change set history in Eclipse client ? ( Under Import option, Jazz source control -> Change Set Archive)
By enabling distributed SCM on both the servers, with a small test, loading the work space from the source stream and changing it's flow target to a empty stream created in the target instance, we were able to move the history to some extent.
History of the component in the target stream, in the target instance showed change sets with associated work item numbers from the source RTC instance. Obviously these associated work item numbers does not exist in the target instance. Is there better way to keep this change set links to associated work items, to the right work item numbers in the target instance ?
or any better approach for this migration scenario ?
2 answers
For details on using the RTC distributed SCM capability (especially for large histories), see: https://jazz.net/library/article/535
Comments
Thank you for quick response confirming our approach and the pointers on API.
Looking forward for guidance on API calls from the experts.
I was also thinking on the same approach for change set link fixing. But not with API.
Thought scm/lscm command line may have some command to get the current work item association for change set and a command to update it as well.
If that was true, When we export/import the work item, Have a new attribute in the work item that will store the old work item # in the new RTC instance.
Then extract this info. (New work item # and Old work item # from the target RTC instance after the work item migration) in csv/text file form and
use some command line scripting with this input file, to update the associated work item in the change set.
Comments
We ended up not bringing the history(no change sets and associated work items), only snapshot of the latest code stream.
If you want to bring the history with change sets and associated work items, you could setup distributed SCM as in https://jazz.net/library/article/535 and use duplicate stream feature. (Duplicate a stream from source repository to target repository and rename it)
This will also bring the history. But work items are linked to the original(source) repository. Duplicate stream is executed from repository to repository without using local work space and is quicker.