It's all about the answers!

Ask a question

Copying a file while retaining history


Craig Yamamoto (11) | asked Oct 28 '11, 5:17 p.m.
Hello,

Is there a way to copy a file in RTC SCM (2.0) while retaining the history?

Thanks,

Craig

8 answers



permanent link
Geoffrey Clemm (30.1k33035) | answered Apr 26 '12, 1:23 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Currently, the only folder you can apply the "move in repository" operation is a folder that is an immediate child of the component root folder. Relaxing that restriction is what is requested in 182834. But note that in any case, you would never be able to move the root folder of the component ... you'd never be able to put anything in the component if it didn't have a root folder.

Cheers,
Geoff


No, there is nothing like cleartool relocate in RTC.

To move files/directories between components, you would use the Team ->
Move in Repository operation. If you do that, the history of the files
in the new component will be linked to the history in the old component.

Note: Currently, in the Eclipse GUI, that operation is only enabled on
the root folder of an Eclipse project (i.e., the folder that contains
the .project file). So to move an arbitrary set of files/folders, move
those files/folders to some dummy project in your component, move that
dummy project to the desired component, and then move those
files/folders where you want them to go (and probably keep that dummy
project around for subsequent cross-component moves).

Work item 182834 and others request that this process be
simplified/automated.

Cheers,
Geoff





I tried this and I get an error

"Cannot move the component root folder into another component"

If I just select a folder under a component, I don't get the "Move in repository" option in under Team ...

permanent link
mike brosnan (1011213) | answered Apr 25 '12, 4:57 a.m.
No, there is nothing like cleartool relocate in RTC.

To move files/directories between components, you would use the Team ->
Move in Repository operation. If you do that, the history of the files
in the new component will be linked to the history in the old component.

Note: Currently, in the Eclipse GUI, that operation is only enabled on
the root folder of an Eclipse project (i.e., the folder that contains
the .project file). So to move an arbitrary set of files/folders, move
those files/folders to some dummy project in your component, move that
dummy project to the desired component, and then move those
files/folders where you want them to go (and probably keep that dummy
project around for subsequent cross-component moves).

Work item 182834 and others request that this process be
simplified/automated.

Cheers,
Geoff

On 11/2/2011 9:53 AM, parke1r wrote:
Hi Geoff,

To retain history, you would "move" or "rename"
the file, not "copy" it.

This does not seem to be the case when moving files/directories
between components. Is there a command for this akin to cleartool
relocate?

Many Thanks

Robin




I tried this and I get an error

"Cannot move the component root folder into another component"

If I just select a folder under a component, I don't get the "Move in repository" option in under Team ...

permanent link
Geoffrey Clemm (30.1k33035) | answered Nov 02 '11, 3:07 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
No, there is nothing like cleartool relocate in RTC.

To move files/directories between components, you would use the Team ->
Move in Repository operation. If you do that, the history of the files
in the new component will be linked to the history in the old component.

Note: Currently, in the Eclipse GUI, that operation is only enabled on
the root folder of an Eclipse project (i.e., the folder that contains
the .project file). So to move an arbitrary set of files/folders, move
those files/folders to some dummy project in your component, move that
dummy project to the desired component, and then move those
files/folders where you want them to go (and probably keep that dummy
project around for subsequent cross-component moves).

Work item 182834 and others request that this process be
simplified/automated.

Cheers,
Geoff

On 11/2/2011 9:53 AM, parke1r wrote:
Hi Geoff,

To retain history, you would "move" or "rename"
the file, not "copy" it.

This does not seem to be the case when moving files/directories
between components. Is there a command for this akin to cleartool
relocate?

Many Thanks

Robin

permanent link
Tim Mok (6.6k38) | answered Nov 02 '11, 2:30 p.m.
JAZZ DEVELOPER
Hi Geoff,

To retain history, you would "move" or "rename" the file, not "copy" it.


This does not seem to be the case when moving files/directories between components. Is there a command for this akin to cleartool relocate?

Many Thanks

RobinIn the Eclipse UI, you can go to Package Explorer and select a project to move across a component. Go to the context menu > Team > Move in Repository. If you want to move a file, it's best to create a temporary project, share it, move the file into the temp project, move the project across component, and refactor to get the file in the right place. There isn't a direct file move to another component.

permanent link
Robin Parker (32633738) | answered Nov 02 '11, 9:41 a.m.
Hi Geoff,

To retain history, you would "move" or "rename" the file, not "copy" it.


This does not seem to be the case when moving files/directories between components. Is there a command for this akin to cleartool relocate?

Many Thanks

Robin

permanent link
Geoffrey Clemm (30.1k33035) | answered Oct 31 '11, 11:23 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I've posted a work item, 182402, requesting that documentation in this
area be added/improved. Please add comments to that work item
indicating any particular points/questions you'd like to see addressed.

Cheers,
Geoff

On 10/31/2011 6:53 AM, ulricheckhardt wrote:
gmclemmwrote:
To retain history, you would "move" or "rename"
the file, not "copy" it. You cannot have two files in the
same workspace with the same history.


Do you know if there is already an according work item documenting
this? We have also stumbled across this lack during our RTC
conversion and it is pretty annoying to lose history when e.g.
refactoring.

Cheers!

Uli

permanent link
Ulrich Eckhardt (23612223) | answered Oct 31 '11, 6:43 a.m.
To retain history, you would "move" or "rename" the file, not "copy" it. You cannot have two files in the same workspace with the same history.


Do you know if there is already an according work item documenting this? We have also stumbled across this lack during our RTC conversion and it is pretty annoying to lose history when e.g. refactoring.

Cheers!

Uli

permanent link
Geoffrey Clemm (30.1k33035) | answered Oct 28 '11, 9:57 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
To retain history, you would "move" or "rename" the file, not "copy" it.
You cannot have two files in the same workspace with the same history.

Cheers,
Geoff

On 10/28/2011 5:23 PM, craigyam wrote:
Hello,

Is there a way to copy a file in RTC SCM (2.0) while retaining the
history?

Thanks,

Craig

Your answer


Register or to post your answer.