Unshelve after element move
Hello,
I just moved a bunch of element off the main branch down to a development branch. Before the move I told the developers to shelve their work, once the move was done they could unshelved their and continue working on the new development branch. All was well until the developers started to check in there code. Their check-in's were being pushed back to the old folder structure on the main branch. While the elements were in the pending change status in the correct location as soon as they check in they got a conflict saying that there was a newer version on server. The conflict resolution was to either take the server and lose there changes or pick the local version which in turn moved the element back to old structure.
With that said, I am in a bit of a pickle now. How do I get the element to overwrite the server element and to have be place into the new folder structure?
Any and all help would be greatly appreciated
BJHop
[976 byte] By [
BJHop] at [2007-12-28]
When you unshelve and checkin, the conflict dialog should offer you the chance to 'merge changes for me' i.e. merge the rename from the server with the edits made by the developer.
Note: this assumes that when you say you moved the items from branch to branch, you really mean Move (shows up as Rename in the history). If you did a Merge or a Branch other parallel development then we'll need a different approach. Internally we have a tool that lets you move shelvesets between branches -- until we can make it public, if this is in fact your scenario, you'll have to manually port the changes.
Yes, I did an official move which is a rename event. I was a bit surprised to see every element in the folders I moved where also renamed. I was only expecting that folder element itself to change not everything. I will look into the "Merge to me", if that is the case, I all will be well, but I do not remember seeing that option. To add another note, the dev that is giving me the biggest troubles, didn't do a "Get latest" cmd before he unshelved, and now his workspace is complete hosed and it adding files and folders all back to old structure. I'm still working with him to get a better idea of what exactly is going on. I'll get back to when I know more.
Thanks for the super quick response.
Most operations on folders are recursive. Rename, Delete, Undelete, & Branch always are. Add & Merge are recursive by default in the UI, require the /r switch at the command line.
It shouldn't matter whether you do a Get Latest before unshelving or later as part of the Resolve process. After you choose the desired resolution, TFS should update your file structure on disk appropriately.