It's all about the answers!

Ask a question

Is it possible to make a copy of a component in another project area then rename it?


George Harada (32313) | asked Aug 01 '17, 3:45 a.m.

Q Is it possible to make a copy of a component in another project area then rename it?
Q Or, is there a way to completely copy component content from one component to another empty one?

I know it's possible to copy a component to another PA using SCM repository workspace load>deliver.
However, when renaming the copy component, the original component will also change.
I'm thinking this may be by design, to allow re-merging of components later on, but because of this it is hard to copy a component.

I've tried a couple things but haven't got it to work. The closest is using 'Team' > 'Move within Repository' in Eclipse client while loading both components, however with this we have to manually copy all 'project' folders. Non-project folders can't be copied too.


Comments
Ralph Schoon commented Aug 01 '17, 4:17 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Why would you want to do that?

Accepted answer


permanent link
Ralph Schoon (63.7k33648) | answered Aug 01 '17, 4:25 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

A component is a container for changes and is referenced and owned by project areas. SCM is not really contained in one project area, the SCM data is potentially accessible to all project areas. A component has an ID and a visible name and all its content has a logical relationship. You can "copy" a component by using it in another project area/repository workspace/stream you basically create a new branch by this. the name of the component is the name everywhere and this allows to compare/merge later if needed.

If you "hardcopy" a component by disconnecting and re sharing, there will be no relationship any more and as far as I know never will be. So there is no real reuse and benefit. So the question really is, what do you want to achieve and why?

George Harada selected this answer as the correct answer

Comments
George Harada commented Aug 02 '17, 4:51 a.m.

Removing the relationships is what we wish to achieve.
For example, at one point we want to duplicate everything in the component (files etc) and from then, it will be 2 components going through completely different development, no merge is intended after the split.
Since the name is in sync, these 2 components cannot be loaded in one local workspace (which is what we require).


Ralph Schoon commented Aug 02 '17, 7:04 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I am not aware there is anything available. You basically load, disconnect and then share again with a new repo workspace and a new component.

You could create some automation e.g. based on https://rsjazz.wordpress.com/2013/10/15/extracting-an-archive-into-jazz-scm-using-the-plain-java-client-libraries/ and a reverse process to make it easier.


George Harada commented Aug 09 '17, 10:09 p.m.

Thank you for your assistance. We decided to take your suggestion for loading and adding it in a new component.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.