So I’ve started work on v2 of Walnut. I’m adding a new WPF interface for v2 as a way to learn WPF. I started messing around with it briefly, but its so much different than WinForms that its gonna take awhile to figure it all out.
But, the point of this post is about branching and merging in Subversion. I created a new branch for v2 in my repository, in the ‘branches’ directory. I got it all setup and then left it alone for awhile and fixed some bugs, added some small features to the trunk.
Now I want to start work on v2, but first I want to merge all the changes from the trunk first, so I know I’ve got an up-to-date repository. This is where the pain comes in. I cannot figure out how to pull in changes from the HEAD of the trunk to the HEAD of my branch.
The interface in TortoiseSVN doesn’t make sense to me. I’ve tried initializing the merge from the trunk and from the branch, but neither option seems to do what I want. Heres what I’m trying to do:
- Update any file in the branch that has been updated in the trunk.
- Add any file from the trunk thats been added that doesn’t exist in the branch.
- Delete any file from the branch that has been deleted from the trunk.
- IGNORE any file thats been added to the branch
All I want is to pull in changes FROM the trunk TO the branch, sounds simple enough.
Since I’ve already added some files to the branch (that don’t exist in the trunk), Tortoise keeps trying to either delete these files when I’m merging FROM the trunk, or adding these files when I’m merging TO the trunk.
Is there some other command that should be using to accomplish this? It seems like a common scenario, but its driving me crazy!
UPDATE 8:54 PM: Jake helped me out with the merge command, and after figuring out how it works, I realized that I made a bad decision by branching version 2. What I should have done was branch the existing trunk to its own branch for maintenance and left v2 on the trunk. It shouldn’t be too hard to rectify that problem though.