Pros and cons of developing versions and versions

In my current project, I have to decide which method to use when branching. I have two options (we will assume that we have already decided to develop in the trunk):

version branches

Create a branch when the new version is put on test machines and mark it as "release0.1". Errors are fixed in this thread (and then, of course, merge with the trunk), and when this release finally goes live, it is marked as "release0.1.1". This results in a branch for each major version and a tag for each minor version. If the error should be fixed in the live version, it fixes the corresponding branch in it, and then merges into the trunk.

Promotion Version

They have only three branches "trunk" (for development), "test" and "live". When the version is placed on test machines, the connecting line is merged (advancing) into the "test" branch, errors are fixed in this branch, and when the version is released, the "test" branch is merged into the "live" branch. If we find an error in the "live" branch , it is fixed there, and then merges with the body.

What are the pros and cons of these two philosophies? What are your own experiences? Are there any other, possibly better, methods?

+6
version-control branch merge
source share
3 answers

It depends on your service policy.

If you decide to support a later version (for example, XP in parallel with Vista), it is best to select version branches.

+4
source share

From my experience, promoting a version has much lower overhead when merging changes from different branches and trying to remember what was fixed on which branch, etc., so when I can, I prefer to work this way. Unfortunately, if you use promotion by version, it is often not possible to make small quick fixes in the released version (because there are large pieces of code in the "test" branch) β†’ so we and we have version branches.

To summarize, I think (at least for me), as a rule, the best way is to do something in between - do all the development on the trunk (main branch), mark all the builds / releases and create only the version branch if necessary ( for example, there is a critical error in production, and there are changes in the torso that cannot be released).

0
source share

In my opinion, these two are exclusive.

Macro networks of version branches are needed if you need to support different versions of RELEASED. But I believe that it’s best to always prepare a branch point (depending on your gestion version system) after the version is released.

"Promotional" mekanism is necessary if you need to release a test version. This is useful if you have, for example, a validation team other than a development team and / or a large team where development is fast. In these cases, you will need a specific branch to stabilize the next "stable" release, while the trunk remains "unstable."

0
source share

All Articles