Ian Bicking: the old part of his blog

Re: Branching Practices

A while ago I wrote a entry called Subversion is a gateway drug. In general, my version control needs were fairly modest, and I tried to keep them that way. However, for some recent projects we have 2 to 3 people modifying code, and have the code in a few different versions. I had to do some branching to fold in changes to the stable version while doing development changes as well.

I found that, in general, even with cvs2svn doing the wrong thing with non-text files, it was easier to convert from CVS to SVN and branch, than to branch the CVS. I always ended up running problems with "branch is not a sticy tag" that I couldn't get resolved...

However, once I had branches, I started wanting to use them, and found that merging between branches was quite painful. I really have to have at least two branches, with all changes from one being merged into the other, and sometimes going the other direction when changes are ready. Really I want a tree of branches where changes at a higher level flow down to a lower level. That would be ideal.

I was looking at other systems, and finally with the help of Jeremy Hinegardner and Duncan McGreggor, I switched to darcs, and have been liking it.

Basically, with darcs, you can check out one working tree into another. Each of these is a self-sufficient repository. The repositories can be local or remote. So, I can have a parent repository and then children can "darcs pull" from their parents. I can also cherry-pick patches to push back up-stream. For me, that's a much less frequent thing, so that can be much more difficult. It's keeping the children up with the parents that happens frequently.

I like that I have a full local copy of the repository. It makes doing releases insanely easy and fast, plus I can do commits and tags without needing net access.

However, pushing and pulling from a remote repository can be real slow. Slower than svn at least.

I should try svk at some point. Really all I'd like to see is good branch merging support. I know you can do tricks to follow branches, but those seem like they require remembering much more and are more prone to errors.

Sean

Comment on Branching Practices
by Sean Reifschneider