It's all about the answers!

Ask a question

Why does moving files between components not maintain history?


Karthik Krishnan (8899123165) | asked Aug 30 '13, 3:46 a.m.
edited Aug 30 '13, 2:02 p.m. by Geoffrey Clemm (30.1k33035)
 I moved the contents from a component from Stream A to a component in Stream B

I used "Refactor->Move" in the Package explorer in the Eclipse client. I am using Eclipse Helips 3.7.2 with RTC 4.0.2 client

By doing like this, the history is not preserved. Any idea what I am doing wrong?

I am moving some files only from a component and not the whole component


Accepted answer


permanent link
Geoffrey Clemm (30.1k33035) | answered Aug 30 '13, 2:01 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The work item requesting support for arbitrary cross-component moves is provide cross component move support for arbitrary locations and names in configuration (21637) .  
Please feel free to add a comment indicating your interest/support.
Karthik Krishnan selected this answer as the correct answer

Comments
Karthik Krishnan commented Aug 31 '13, 1:03 a.m.

Thanks. Will subscribe myself. Looks like not a lot happening on that  


How do you guys manage this internally to move files across streams? are there any other indirect methods to this without messing the history?


Geoffrey Clemm commented Aug 31 '13, 10:19 a.m. | edited Aug 31 '13, 10:20 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Note: If there is sufficient customer demand, sometimes very old work items do get implemented, so I wouldn't let the age of a request deter you from adding a comment indicating your interest/support.

There is a workaround described in that work item, but I'll copy it here so that it is more easily available:

Currently, the only way to retain history when you move a file or folder from one component to another is to use the Team->MoveInRepository... operation, but this operation can only be used in the Eclipse client on an Eclipse project.

If you want to move an arbitrary file or folder from a "source" component to a "target" component, a workaround is to:
- create a new dummy Eclipse project in the source component
- move the file/folder into that dummy Eclipse project
- use MoveInRepository to move the dummy Eclipse project to the target component
- move the file/folder to where you really wanted it to go in the target component, and then
- delete the dummy Eclipse project from the target component.

A more detailed description of this workaround:
- create a dummy project and share it into your component.
- do a regular move of the things you want to move into that dummy project
- check-in your changes and close (or complete) the change sets.
- use the Team->MoveInRepository to move the dummy project to the destination component
- move the files/directories to where you really want them to go within the destination component.
- check-in your changes
- do a "Team->RemoveInRepository (or 'Delete From Repository')" on the (now empty) dummy project (unless you want to just keep it around for a subsequent move)

One other answer



permanent link
Tim Mok (6.6k38) | answered Aug 30 '13, 9:45 a.m.
JAZZ DEVELOPER
That is an Eclipse action performing the refactoring. It isn't detected by RTC as a cross component move. Currently, RTC only supports a cross component move of a project. There is a workaround to this limitation that may be acceptable for you:

1. Move the files to a new project (temporary project) in the source component
2. Use the Team > Move in Repository... action on the project from the Package Explorer to move it to the target component
3. Move your files from the project to where you want it to be and delete your temporary project

Comments
Karthik Krishnan commented Aug 31 '13, 1:01 a.m.

The Team->Move in Repository is only at the component level and not at the file/folder level inside the components. 


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.