I develop a software project using subversion as an scm. Until now, development always happened in trunk
, so problems arose when a bugfix release was necessary. Now, we want to rethink our branching strategy and the requirement is: We want to be able to work on multiple future releases at once.
That means: Assume, the current version we are working on is 1.0. The next planned version is 2.0, the version after that is 3.0. Now that we have released 1.0 we want to
Of course, fixes that have been applied in 1.0 are also needed in the other two versions. Furthermore, features from 2.0 will also have to be in 3.0. Also, it might be possible that a minor release is planned, say 1.1 that also includes new features and will have to be maintained separately.
I came up with the following branching strategy:
Let me elaborate this a bit more: In the given example, we would branch version 1.0 from trunk. Also, we would branch version 2.0 from version 1.0 and version 3.0 from version 2.0. When a change is made in 1.0, it will be merged into 2.0 and subsequently into 3.0.
Is this a valid methodology? Will it work technically? Are there organizational pitfalls? Are there best practices? (All the internet would come up with is: "Develop in trunk, maintain in release branch"). It especially seems strange to me to abandon trunk -- is that wrong?
The idea of "developing in trunk
" comes from the fact trunk
is the default branch you can want to checkout.
I.e: you have no idea of the naming convention for the other branches, but you know at least that the "main" branch is called "trunk
", so as a new developer, you can be tempted to checkout that one, which is why the current development is best made in that same branch.
The branches 1.0
, 1.1
or 2.0
would rather be for maintenance operations, once those releases has been done.
For parallel development, I would recommend another naming convention, like 1.1_dev
, 2.0_dev
, made from the trunk
(which would represent the current 1.0
development).
That can work provided those branches aren't too much long lived, and that they don't diverge too much from trunk
(because of merges which would become increasingly complex otherwise).
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