5

I am currently thinking of the following branching strategy

  1. Main branch
  2. Development branch
  3. Feature branch
  4. Release branch

Basically the whole idea is to have a release branch so that hot fix can be applied quickly for specific release.

Here is the issue what if I have an urgent feature that I need to do for a specific customer and I do not want those feature to be applied to other customer using the same release version until it is fully tested. At the same time I do not wish to create multiple release branches for different customers as this will complicate stuff.

What is the best way to handle such situation?

2
  • Can your software determine easily which customer is using it? For example, do you have individual license files for each of your customers? That's what you should utilize here for a feature toggle.
    – Doc Brown
    May 31, 2013 at 11:26
  • You want modular features; write modular software. Other assinine approaches that involve magical featurewariness inside your code is just annoying, painful to maintain, and pointless. Make your software modular, use latebinding to determine if a feature is available or which ones are available, and just don't present the features which aren't installed. Then the source is the same; you just have a couple different installers with varying numbers of assemblies they package up. May 31, 2013 at 14:43

2 Answers 2

2

If it concerns a feature that will be delivered to all customers once it has been fully tested, and this one customer takes up part of the testing effort, then it is best to use a second release branch for the testing of this feature. After the feature has been found to be stable enough, the second release branch can be merged into the official release branch.

If the feature will not be used by all customers, then it is better to use a feature toggle, as outlined in the answer by @aquaranga.

4

Rather than having a separate SCM repository for each customer - you could have something like a feature toggle in the same code-base.

A feature toggle is something you could configure in the database, based on a particular attribute that uniquely distinguishes the customer.

For eg; assume a feature F, and customers C1 and C2. C1 wants the feature, and C2 doesn't. Your feature_list table would have entries like:

Feature     Customer     Available?
  F            C1           Y
  F            C2           N

Together with a caching strategy (since the above data would be consulted on a frequent basis), your code could decide whether or not a feature needs to be made available for a given customer.

2
  • 2
    +1, however I would replace "generally" by "for example" (heck, why assumes everyone there is a database available?). Here is a good article about feature toggles: martinfowler.com/bliki/FeatureToggle.html
    – Doc Brown
    May 31, 2013 at 10:43
  • Yes you're right - I hope 'could' is better than 'would generally'?
    – aquaraga
    May 31, 2013 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.