Merging Trunk to Branch

If you are having a problem using Vault, post a message here.
Post Reply
kcroke
Posts: 1
Joined: Thu Aug 23, 2012 10:38 am

Merging Trunk to Branch

Post by kcroke » Thu Aug 23, 2012 10:56 am

I have a branch where I am working. The trunk has changed significantly since I created the Branch.

I tried to use the merge wizard to merge changes from trunk to branch, and I wanted to relay some issues I had. Unfortunately, we are still on 5.0.3 which might be part of the problem. Please let me know if any of these issues would have been addressed if we were running the latest version of the software.

To begin the merge, I loaded up the "Merge Branches Wizard." For the origin, I selected the trunk. For the target, I selected the branch. My first issue was the "Select Changes to be Merged." All changes in the history of the trunk were displayed. Since the branch was created from trunk, any change that occurred before the branch were irrelevant. Also, in TFS, I would have been given the option to just merge all changes up to today. This was not possible.

At this point, I had to determine what the earliest changeset was of all the changesets after the branch. I looked at the creation date of the branch, but there were still trunk changesets that didn't appear to have been incorporated into the branch, so this was a very manual process. The only way I think this could have happened is that I may not have had the latest of trunk when making the branch. Does that sound correct?

Once I figured out the earliest changeset, I selected that and all subsequent changesets and clicked "next." This comprised 52 changesets.

I then completed the wizard. Files where checked out, some items referenced in the bottom "Pending ChangeSet" window were checked out into the temp directory. The merge process never completed. After about an hour of the "Working" message, I assumed something went wrong, killed vault and deleted the pending changes it created.

I was not able to successfully create my merge.

Any advice? Does 6.0 address any of this?

Thanks,
Kevin

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Merging Trunk to Branch

Post by Beth » Thu Aug 23, 2012 12:18 pm

All changes in the history of the trunk were displayed. Since the branch was created from trunk, any change that occurred before the branch were irrelevant.
Merge Branches is supposed to list all the possible change sets. It's possible to merge them into areas other than the branch you created off of the trunk, so it won't rule out change sets prior to the branch. This is addressed in Vault 6.0 with a thing called Merge Markers, which will help you track what has been merged and not been merged already, but only after you perform your first merge. Then you tell it to mark what you merged.
At this point, I had to determine what the earliest changeset was of all the changesets after the branch. I looked at the creation date of the branch, but there were still trunk changesets that didn't appear to have been incorporated into the branch, so this was a very manual process. The only way I think this could have happened is that I may not have had the latest of trunk when making the branch. Does that sound correct?
The branch is not created from what you have on disk. If you created the branch in the main window in Vault, then it was created from the latest code that was checked in at that time. If you created it in history, then it was created from the point in history that you selected.
I then completed the wizard. Files where checked out, some items referenced in the bottom "Pending ChangeSet" window were checked out into the temp directory.
The merge is finished at the point that you are seeing items in your Pending Changes window. You then have the option of checking in those changes or removing them if you don't like the results.
Beth Kieler
SourceGear Technical Support

Post Reply