Difference between revisions of "RepositoryStructure"

From PaparazziUAV
Jump to navigation Jump to search
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''Repository Structure''' Refers to the way Paparazzi is naming the branches and which one is the right one for you.
'''Repository Structure''' Refers to the way Paparazzi is naming the [[Git]] branches and which one is the right one for you.


== Stable Releases ==
[[Image:RepositoryBranching.png|400px|thumb|Branching Model Diagram]]


These are the branches that are considered stable and ok to be used by everyone. The default branch on github (the one you get when cloning the repository) will always be set to the latest stable release.
== Development branch (master) ==
<span class="plainlinks">[https://travis-ci.org/paparazzi/paparazzi https://travis-ci.org/paparazzi/paparazzi.png?branch=master,?.png]</span>


'''Releases get even version numbers.'''
* v3.2 (e.g. use the current campaign2010 for that)
* v3.6 (e.g. use the current campaign2011 for that)
* v4.0
The only commits that go into those branches are only bugfixes. No new feature commits are being done directly to those.
'''May branch off from:''' ''release preparation branch''<br/>
'''Branch naming convention:''' ''v<major>.<even_minor>''
=== Release Preparation Branches ===
Release preparation is done in branches with '''odd version numbers'''. When it is ready the branch is renamed to the next even number.
So e.g. stabilization and testing is done in v4.1 and then renamed to v4.2 (and tagged) on release.
'''May branch off from:''' ''development branch''<br/>
'''Must merge back into:''' ''development branch''<br/>
'''Branch naming convention:''' ''v<major>.<odd_minor>''
== Development branch ==
A permanent branch where current the development is based on. For users wanting to test the the bleeding edge, this is the one to use.
A permanent branch where current the development is based on. For users wanting to test the the bleeding edge, this is the one to use.
It should at least compile, but can have untested new features. New features are being injected into this one from the feature branches.
It should at least compile, but can have untested new features. New features are being injected into this one from the feature branches.
Needs bench testing and careful flight testing on your end.


Here we have come up with different models.
== Stable branches ==


=== Master branch for development model ===
These are the branches that are considered stable and ok to be used by everyone.
Use branch "master" for development.


=== dev branch for development model ===
'''Releases get even minor version numbers.'''
Like now the branch "dev" is used for development. In this case "master" would always point to the latest stable release.


=== no permanent development branch ===
The only commits that go into those branches are only bugfixes. No new feature commits are being done directly to those.
Another option could be to not have a permanent development branch at all, but instead immediately start with a new odd version branch after a release where feature branches would be merged into.


In this case we could keep master pointing to the latest stable release or not have any permanent branches at all (but this has quite a few drawbacks).


=== Votes ===
'''May branch off from:''' ''release preparation branch''<br/>
* no permanent development branch (less branches and obvious where development is being done atm) [[User:Esden|Esden]] 21:10, 7 May 2012 (UTC)
'''Branch naming convention:''' ''v<major>.<even_minor>'', e.g. v4.0
* any of the above, as long as we keep one branch named "master" (which would be either the latest stable or the development branch) [[User:Flixr|flixr]] 21:18, 7 May 2012 (UTC)
 
* keep "master" as latest stable. If possible, keep "dev" for development (I think it is better to have a single reference branch to start working on a new "feature" and merge it back) Gautier 8 May 2012
* having master for the development and tags/branches as stable is how git usually is used (e.g. Linux), people would checkout a dedicated stable version [[User:Martinmm|Martinmm]] 22:35, 8 May 2012 (UTC)
== Feature branches ==
== Feature branches ==


If a bigger new feature is being implemented and is meant for people to test the development branch is being copied into "feature_<description>" and after the implementation of the new feature is completed those branches get merged back into the development branch again.
If a bigger new feature is being implemented and is meant for people to test the development branch is being copied into "feature_<description>" and after the implementation of the new feature is completed those branches get merged back into the development branch again.


'''May branch off from:''' ''development branch''<br/>
'''Must merge back into:''' ''development branch''<br/>
'''Branch naming convention:''' ''feature_<description>''


Another option could be to name them according to the next preparation branch <major>.<odd_minor>_<feature_name>.
'''May branch off from:''' ''master''<br/>
'''Must merge back into:''' ''master''<br/>
'''Branch naming convention:''' ''<feature_description>''
 
== Release Preparation Branches ==
 
Release preparation is done in branches with '''odd version numbers'''. When it is ready the branch is renamed to the next even number.
So e.g. stabilization and testing is done in v4.1 and then renamed to v4.2 (and tagged) on release.


For example these branches could have names like:


* feature_state_interface
'''May branch off from:''' ''master''<br/>
* feature_luftboot_support
'''Must merge back into:''' ''master'', ''next stable branch''<br/>
or
'''Branch naming convention:''' ''v<major>.<odd_minor>'', e.g. v3.9
* v4.1_spi_queues


== Hotfix branches ==
== Hotfix branches ==


If there are bugfixes that need to be tested before they get applied/merged to a stable release they get their own (temporary) branch:
If there are bugfixes that need to be tested before they get applied/merged to a stable release they get their own (temporary) branch:


'''May branch off from:''' ''stable branch''<br/>
'''May branch off from:''' ''stable branch''<br/>
Line 75: Line 53:


* v4.0_fix_b2_v12_mag_signs
* v4.0_fix_b2_v12_mag_signs
== Old VS new repository structure ==
This section describes how the old structure will be changed to the new structure.
Basically the current "dev" would become the release preparation branch (we can then delete 4.0_beta), the "locm3" branch would become the new development branch.
* rename: dev -> v3.9
* rename: campaign2010 -> v3.4
* rename: campaign2011 -> v3.6
* rename: spi_driver -> feature_spi_driver (or v4.1_spi_driver)
Comment from Gautier (8 May 2012): actually, I like the names "campaignXXXX" or something similar to name the stable releases. It recalls that Paparazzi is supposed to be used for "real" applications, it's not only a piece of software. But we can keep both numbers and names.
For the new development branch there are different options (as described above):
#master for development:
#* reset master to current locm3
#dev for development:
#* reset dev -> locm3
#* master: reset to new v3.9 (even if it is not a release, and keep it on the release branches from there on)?

Latest revision as of 06:53, 23 April 2015

Repository Structure Refers to the way Paparazzi is naming the Git branches and which one is the right one for you.

Branching Model Diagram

Development branch (master)

paparazzi.png?branch=master,?.png

A permanent branch where current the development is based on. For users wanting to test the the bleeding edge, this is the one to use. It should at least compile, but can have untested new features. New features are being injected into this one from the feature branches. Needs bench testing and careful flight testing on your end.

Stable branches

These are the branches that are considered stable and ok to be used by everyone.

Releases get even minor version numbers.

The only commits that go into those branches are only bugfixes. No new feature commits are being done directly to those.


May branch off from: release preparation branch
Branch naming convention: v<major>.<even_minor>, e.g. v4.0

Feature branches

If a bigger new feature is being implemented and is meant for people to test the development branch is being copied into "feature_<description>" and after the implementation of the new feature is completed those branches get merged back into the development branch again.


May branch off from: master
Must merge back into: master
Branch naming convention: <feature_description>

Release Preparation Branches

Release preparation is done in branches with odd version numbers. When it is ready the branch is renamed to the next even number. So e.g. stabilization and testing is done in v4.1 and then renamed to v4.2 (and tagged) on release.


May branch off from: master
Must merge back into: master, next stable branch
Branch naming convention: v<major>.<odd_minor>, e.g. v3.9

Hotfix branches

If there are bugfixes that need to be tested before they get applied/merged to a stable release they get their own (temporary) branch:


May branch off from: stable branch
Must merge back into: stable branch
Branch naming convention: <major>.<even_minor>_fix_<description>

For example:

  • v4.0_fix_b2_v12_mag_signs