We are using version in following format:
Development for upcoming release is going on in the trunk. When enough features are done we are creating a new release branch:
1.2 and so on.
After branch is created there is a continuous "stabilizing" process, producing test versions of branches:
220.127.116.11 and so on, until a new bugfix version is ready, those are:
1.1.2 and so on.
The image below should explain it better:
Upon creating release branch the version in the trunk is increased (since we begin working for next release somehow).
The problem: we also need to use versions in the trunk (those are given for internal tests) and they will collide with the next release branch test versions (marked with red circle).
The question: how to avoid such version collision?
One proposal was to change trunk version after branching to high enough number, e.g.
18.104.22.168, this will make collision unlikely to occur, but is ugly.
Ideally we want to keep numbers "small" (so they are easy to remember and to use).
(Optional) Another thing: after periodic merging from current release branch into trunk it make sense to indicate this somehow in the version too (marked as ? on the picture), could be very useful to indicate that following trunk test builds are have those bugfixes included, e.g. after merging
22.214.171.124 into trunk (which is currently
126.96.36.199), maybe something should happens with version too, not just increment it
188.8.131.52. Not sure what though.
For an easier overview here is an image of one of proposed solutions:
The idea is to inherit (continue) number in release branch. This will solve collision, but will introduce another problem: there is no more
1.2 versions. We'd like to have those if possible.