I am currently working on a project in .NET which consists of several logical layers and multiple front-ends. Here is a rough representation of our SVN structure:
trunk
---doc
---lib
---src
------console
---------console.vbproj
------domain
---------domain.vbproj
------...
------web
---------web.vbproj
---.sln
All of our day-to-day development occurs in trunk - this is where all developers checkout from/commit to.
I am looking for a way to cleanly and easily deploy between environments (test and production).
My thought is to create two branches, test and production, from trunk - solution and all. I am justifying this to myself for the following reasons:
Has anyone had any experience with a solution similar to this? Are there any potential pitfalls or oversights that I am missing?
Subversion Branching StrategiesSubversion branches (SVN branches) allow your team to work on multiple versions of your code simultaneously. Developers can test out new features without impacting the rest of development with errors and bugs. SVN's “branch” directory runs parallel to the “trunk” directory.
The developers in the team constantly commit their work into a single, central branch—which is always in a deployment-ready state.
Has anyone had any experience with a solution similar to this?
Yes :-)
Are there any potential pitfalls or oversights that I am missing?
You will face the problem that over time the test and release branches will drift away from the development environment as you will very likely not merge every change from trunk. The developers will then work in a slightly different environment and you will waste much time by keeping the branches in sync. This is known as the merge-mania anti-pattern.
I would rather advise to create a release branch from trunk for each planned release once you got all features for it implemented. At the time you branch both are equal. Then have a team to stabilize and test on the release branch. The development goes in parallel on trunk. Once your release was polished merge the fixes back to trunk.
Repeat the procedure for each release. This way you will limit the number of merges and have the folks working on something that always is the cutting edge.
I hope these aspects help you in your decision. The link also shows many other anti-patterns. Have a read to all of them maybe you'll recognize some lessons learned and will get some hints to solve it better.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With