Best practice with branching source code and application lifecycle

Posted by Toni Frankola on Programmers See other posts from Programmers or by Toni Frankola
Published on 2011-02-10T22:51:47Z Indexed on 2011/02/10 23:33 UTC
Read the original article Hit count: 387

We are a small ISV shop and we usually ship a new version of our products every month. We use Subversion as our code repository and Visual Studio 2010 as our IDE. I am aware a lot of people are advocating Mercurial and other distributed source control systems but at this point I do not see how we could benefit from these, but I might be wrong.

Our main problem is how to keep branches and main trunk in sync.

Here is how we do things today:

  1. Release new version (automatically create a tag in Subversion)
  2. Continue working on the main trunk that will be released next month

And the cycle repeats every month and works perfectly. The problem arises when an urgent service release needs to be released. We cannot release it from the main trunk (2) as it is under heavy development and it is not stable enough to be released urgently.

In such case we do the following:

  1. Create a branch from the tag we created in step (1)
  2. Bug fix
  3. Test and release
  4. Push the change back to main trunk (if applicable)

Our biggest problem is merging these two (branch with main). In most cases we cannot rely on automatic merging because e.g.:

  • a lot of changes has been made to main trunk
  • merging complex files (like Visual Studio XML files etc.) does not work very well
  • another developer / team made changes you do not understand and you cannot just merge it

So what you think is the best practice to keep these two different versions (branch and main) in sync. What do you do?

© Programmers or respective owner

Related posts about .NET

Related posts about visual-studio-2010