Why does moving files between components not maintain history?
Accepted answer
Please feel free to add a comment indicating your interest/support.
Comments
Thanks. Will subscribe myself. Looks like not a lot happening on that
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
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