Saturday, October 14, 2006

The need for branches

Until now, I have tried to create a new release of Task Coach every two to four weeks. Each release would contain a mixture of bugfixes and new features. The nice thing of this release strategy is that I don't need to create multiple branches in the version control system. And simple is good, right?

However, the feature I'm working on right now (hierarchical categories) turns out to be harder than I thought. At the same time, people have been reporting some bugs on the latest release that are pretty easy to fix. But, since I'm halfway the development of the hierarchical categories feature, the code is not in a releaseable state. So, I cannot release those bugfixes although they are in the version control system. And that is a waste, right?

So, how to resolve this situation? The classical solution is to add a separate branch for the latest release, apply the bugfixes to that branch, and release a bugfix release from that branch. After that, one only needs to merge those bugfixes into the mainline and everything is fine again. Except for the added complexity of having to deal with multiple branches and merging, that is. The alternative solution, the one I have been using so far, is to add functionality in much smaller steps. Steps that are so small that the code is never 'not in a releaseable state' for more than, say, two weeks. Apparently, I have been not applying that strategy successfully lately, leading to the need for branching.

Anyway, I'll try the branching, see how it works out, and then decide on how to proceed in the long run.

12 comments:

thisfred said...

If you start using branches in earnest, one incredibly useful tool is meld. With a command like:

meld path/to/trunk path/to/branch

it shows you all the differences in all the files in a really userfriendly way, and allows you to selectively port back or forward fixes and changes.

Also: I really like the idea of Task Coach! I'm going to check it out tight now!

Tarek said...

Task Coach is a really cool application, I am downloading it now, and will start using it soon.
Thanks a lot for your efforts.

Patryk said...

I love your software. Are you going to release any new version? I hope that the project is not abandoned. :)

Frank said...

Don't worry, Task Coach is not abandonware. I'm working on a new release. However, since this is not my day job progress at times is slow.

Patryk said...

Good to hear it from you. :)

Michael said...

As of today's virus definition update (05-25-2007) Grisoft's AVG Free Edition on Windows 2000 flags taskcoach.exe v0.63.2 as "Trojan horse PSW.Generic4.KTX"

Sorry.

Andi said...

I have not looked at the source files, but a good way avoid extensive version clashing is having versions for each module (if the program is divided in modules, of course). So if you are working heavily with one module other people can bugfix others. How is the program source organized?

Frank said...

Hi Andi,

I think Task Coach is pretty modular. See http://taskcoach.wiki.sourceforge.net/ for a brief overview of its source code organization.

Cheers, Frank

Mark said...

While subversion is the VCS available from sourceforge, I'd recommend trying out Mercurial or git. They are much better suited to doing development with branches, and make it very easy to merge changes between branches.

Frank said...

Hi Mark,

I played around with Bazaar and I really love it. It's written in Python which is a plus for me and is also the VCS used by Launchpad. We currently use Launchpad mostly for its translation support, but it's also a possible future home for the Task Coach project's bug tracking and version control needs.

Kevin said...

I second what the earlier poster said about git. It handles branching and merging much better than cvs or svn IMHO, and it is designed specifically for a distributed development model. Check out github.com for more info.

Frank said...

Hi Kevin,

Sourceforge nowadays offers several different VCS flavors. In addition to CVS and SVN it offers Bazaar, Mercurial and Git. I'm sure we'll switch to a distributed VCS one day. Don't hold your breath though since switching VCS is a significant undertaking.