views:

276

answers:

5

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?

+3  A: 

You 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.

Tundey
+3  A: 

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 :)

Chuck
+1  A: 

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.

Chris Marasti-Georg
A: 

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.

Luke
You should use labels to define a "ready to build" status and only build on that - don't count on checking out the latest revision to build, especially if you want to check in something to avoid losing it but it isn't ready for a build yet.
Tai Squared
When I say "breaking the build" I also mean for other devs on the team -- not just the automated build process.
Luke
+1  A: 

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.

Rob Hunter