Difference between revisions of "Contribute code"

From Amahi Wiki
Jump to: navigation, search
m
Line 2: Line 2:
  
 
* Join the [https://sourceforge.net/mailarchive/forum.php?forum_name=amahi-devel amahi-devel list]
 
* Join the [https://sourceforge.net/mailarchive/forum.php?forum_name=amahi-devel amahi-devel list]
 +
* If you are new to git, you may find this [http://try.github.com/ interactive git tutorial] a nice intro to git
 
* If it's your first time, grab a copy of the git repo
 
* If it's your first time, grab a copy of the git repo
  

Revision as of 19:56, 7 July 2012

This is a quick guide for contrinuting code, fixes or develop native apps on Amahi.

     git clone git://git.amahi.org/amahi.git
  • If not, pull any changes from the master repo
     cd amahi                (the root of the git tree)
     git pull
  • Get yourself familiar with the pieces, and ask questions!
  • Make some changes to the code, then test them:
  • e.g. for testing the platform:
     cd platform/platform/html
     ./script/server
    and access it at http://hda:3000
    you will probably want to turn off 
    dhcp and dns if your server is on the same 
    network as your home HDA
  • You can see your changes with two git tools: status and diff
     git status
  • The status gives you a list of what files were modified, added or removed. you can see changes in your area with:
     git diff --cached
  • When you know you want to modify a file, you add it to the changes to be committed, for example, say a README file:
     git add README
  • For the parts that are added and checked in, you can see the changes with
     git diff
  • This is what will be committed!
  • Then actually commit your changes to your git repo:
     git commit
  • After that you can generate a patch to be sent upstream, e.g. for a patch of the latest commit.:
    1. Go into the patch folder located in the root of the git tree.
    2. git format-patch HEAD^..HEAD
   

NOTE: When creating the patch title(first line) please put it in YYMMDD-PATCHSEQUENCE#-long-patch-name.patch format. In the long name please include what module you are working on. AKA what application etc..


  • This will generate a file called 0001-my-patch.mbox or similar (type ls -l 00*), which then you can email or pastebin it to someone to be committed upstream. You probably want to Configure Git to your liking first to display the email properly.
  • Please note, once the patch is applied upstream, your name and email WILL be officially in the amahi git repo as as contributor, which mean it's in the open and it's crawlable, so please use your PUBLIC name/email accordingly.