Submitting patches and features

From OpenPetra Wiki
Revision as of 09:12, 7 January 2011 by Pokorra (talk | contribs) (→‎Initial Setup for Contributing: spaces to make text block)
Jump to navigation Jump to search

Where Contributions to Our Code Base Go To

The openPETRA source code is managed with the Bazaar source code versioning system. The official repository of openPETRA can be browsed here: http://code.openpetra.org.


How We Handle Contributions to Our Code Base

  • Write permissions to head/trunk are given only to the core members of the development team, just to keep the project on one track.
    • We very much need your contributions though, and we will aim to quickly deal with requests from developers who want to submit patches and code!
  • We accept contributions from non-core members of the development team only in developer branches on the main repository.
    • A developer branch is created for each feature a certain developer creates and for each bug he fixes.

See Submitting patches and features#Workflow for Contributions below for the actual workflow involved.


Initial Setup for Contributing

The contributor (=you) needs to have an account on our Bazaar server, as we host the openPETRA Bazaar repository on our own server, rather than on sourceforge.net. For that we need a public SSH key of you. Such a key can be created as follows:

  1. Open a Windows Explorer window and navigate to the path where PuTTY is installed.
  2. Start puttygen.exe in that folder.
  3. Click on "Generate" and follow the instructions.
  4. Once finished with the key generation, right-click on the multi-line textbox that contains text starting with "ssh-rsa" and select "Copy".
  5. Click 'Save public key' and 'Save private key'.
  6. Send an email to info@openpetra.org with the following content:
Please create a user for me on the openPETRA Bazaar code repository so I can have write access to my 
openPETRA branches.

My name: ZZZZZZZZZZZ.

My SSH Key:
XXXXXXXXXXXXXXX

- replacing the Z's with your name and the X's with the pasted text from the PuTTY Key Generator.

You will be informed once a user has been created for you.

Workflow for Contributions

  1. A Bug needs to be created for every single contribution if there isn't already a bug for it (the bug can also be marked as 'Feature' if it is a feature and not a bug!). Anyone who has a sourceforge.net account can do that.
  2. A new Branch needs to be created on the Bazaar server. Its name includes the bug number and a shortened title (examples can be found here).
    1. If you need a new branch, just ask for it in the IRC chat or in the Developer Forum, mentioning the Bug Number.
    2. The branch will be created for you and you will be given write access to this branch (and only this branch) by a member of the core development team.
  3. You can work on the branch until the the bug is fixed or a new feature is implemented. Be sure to do frequent 'rebases'/'merges' from the openPETRA trunk to ensure that you have changes that are done in trunk and that your code still compiles against it. You can commit changes to your branch at any time.
  4. Once you are done with your bug fix or implementation of a feature:
    1. Do a last 'rebase'/'merge' from the openPETRA trunk to ensure that you have changes that are done in trunk and that your code still compiles against it.
    2. Make a request to the core development team members to review your changes and to merge your changes to the openPETRA head/trunk.
      1. Ask for that in the IRC chat or in the Developer Forum, mentioning the Bug Number.
  5. Once your contribution has been reviewed and it got approved, the changes from your developer branch will be merged into the offical openPETRA trunk by a core developer. You will be informed once this has happened.
  6. You are ready for another contribution ;-)