MarmotBlog

3/24/2004

Branches, directories and a lesson in merging

Filed under: — tepeds @ 12:17 pm

Tim pointed out to me today that the last merge from the 1.2 branch to the trunk did not include John’s cool Marmot theme. John added and committed the theme on the branch, not the trunk, so I assumed it would be merged.

Whether this is a failing CVS or that I’m using and old version (thanks Apple) remains to be seen. In any event it appears that while files added to the branch can be merged, there is no method by which directories added to the branch are merged.

After some trial and error (I love sandboxes), I found that I could checkout the trunk and then checkout the specific directory in question from the branch into the trunk sandbox.

The next step was to update just that directory the current trunk HEAD (update -A), which removes the branch sticky tag. It also removed all the files from the directory, but left the directory in place.

From there, I was able to perform a normal merge from the branch to the trunk for just that directory which correctly merged the files. I committed that and all is well.

I updated (make sure to update -d) my trunk sandbox and it got the new theme.

There has to be a better way.

One Response to “Branches, directories and a lesson in merging”

  1. Tim Says:

    I have update -d in my .cvsrc. I would expect that to be enough for the merge to have worked, but I have never actually done it.

Powered by WordPress