I read the Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation book by Jez Humble and David Farley. The part that throw me off balance the most was their insistence on using a single branch.
Thinking about it and what they are preaching, it does make sense. But the question is, how to achieve it?.
At my company we are working on C# with TFS as our source control. And the following ideas came to my mind about how to achieve the idea of doing changes that you don't want to release yet, but you want to keep inside the vcs tool:
Injections to be able to select the class that you want to use. So you can rewrite some functionality without affecting code that needs to be released.
Related, an IoC container to make the above easy to achieve. So you can select at compilation (or even runtime) the ones that you want to use.
- Decorator pattern to add functionality in a very simple manner (which is just applying the other two above)
At another similar question they talk about the Release Line from Software Configuration Management Patterns (which I still have to read). But the example that they are using deals with tags and creation of branches from them, which doesn't seem to be the same thing as what Humble and Farley talk about.
- Do the techniques that I have described sound right for achieving a single branch strategy?
- Is there anything else that could be done to manage having your code on a single branch?