It's all about the answers!

Ask a question

About component codes merge


Hehui Liu (7052530) | asked Jan 14 '13, 10:02 a.m.
Here, we have two different component A and B, they belong to different streams. Actually A and B almost contain the same files. In RTC, usually, we should make A and B as the same component, but for some reason we didn't. So now there are some changes in A that we want to merge to B.

Currently, RTC doesn't support this, so we are designing a solution to address on this problem, currently, our basic idea is as below:
step 1, download the change sets of component A;
step 2, merge the downloaded change sets of component A to component B automatically, when conflict, show the information to user and ask the user to merge it manually.

As my understanding, in step 1, we could download both the change sets of component A and the patch of these change sets, then in step 2, we could apply the patch to component B, for the changes without conflict, they could be merged automatically.

But here the problems are that, how could we invoke the patch apply interface automatically? How could we get the conflict information?

Need your help on this, thanks a lot!

One answer



permanent link
Tim Mok (6.6k38) | answered Jan 14 '13, 11:31 a.m.
JAZZ DEVELOPER
What do you mean by invoking the patching automatically?

I'm not quite sure if you can apply the patch from component A to the files in component B (or vice-versa) using the Eclipse client RTC patching. It expects the change set information to match up with the component where you created the patch. If you remove that metadata, it would confuse the patching and probably not patch at all.

You can try creating those patches and applying them with any tool that supports the unified diff format. I believe you can use Eclipse to do this but you have to be in the Team Synchronizing perspective to access its implementation of the Apply Patch action (Project > Apply Patch, there's no icon next to this action). I tried this out and it worked but I had to choose apply to workspace root in the wizard that pops up.

Another option you could try is create a workspace with component B at the initial baseline. Download the files from component A and share them into component B. Accept the change sets from component A and resolve the conflicts that you get. I'm not sure if this will be easier but it's something to try if you're having trouble with the patches.

Your answer


Register or to post your answer.