I'm in the process of refactoring some code which includes moving folders around, and I would like to regularly merge to keep things current. What is the best way to merge after I've moved folders around in my working copy?
views:
276answers:
5You can move the files around in StarTeam also. Then merge after that.
Whatever you do, make sure you don't delete the files and re-add in StarTeam. You'll lose the file history if you do that.
Moving the files in StarTeam and then updating your project/solution is the cleaner way to go. I would also suggest creating a view label prior to doing anything so you have a definite "roll back" point if things go wrong :)
Folders in StarTeam can be renamed to match the filesystem moves by right clicking the folder and going to Properties. If you created new nesting levels, you will have to create those folders normally. If you moved files between existing folders, you can move those in StarTeam by dragging them from the file window on the right to the new folder on the left. Files can be renamed to match a new name in StarTeam the same way folders are, right click the file and select Properties.
As a fellow StarTeam user, my condolences go out to you.
The problem is I'm worried about breaking the build in the meantime while I'm moving folders in StarTeam. I suppose the only way to avoid that is to be ready to upload updated project files as soon as I move things around in StarTeam and do it as quickly as possible.
In an ideal world, you could branch the view and merge back when you are happy with your revisions to avoid breaking the build. However, as you are using StarTeam, I would suggest making small incremental changes to the folder structure and accept that you will probably have a few breakages along the way. It will likely be less time consuming and more intuitive than trying to use the view-merge interface.