Skip to content

The SIPE Project

An Open Implementation of SIP/Simple protocol for Live Communications Server 2003/2005

SF.net | GNU GPL |

Last Modified: 2007-08-28

Contribute code

From SipLCS

How to contribute source code

Contents

1. Getting the Code

It should be done this way (using Cogito):

cg clone git+ssh://mob@repo.or.cz/srv/git/siplcs.git#mob

This clones the mob branch of the SipLCS git repository. The mob branch is world-writable, so you can commit your changes there without asking anyone for permission.


2. Changing the files

Now you can make changes to the files locally. Testing your patch:

  • Run ./configure - if you changed configure scripts or build files
  • Run make, to see if you did not introduce other bugs!
  • Run make install, and run itself.
  • Optionally, run 'cg diff' to see what you modified, run 'cg restore <filename>' to revert your changes
  • If everything works fine and when you're satisfied, proceed to the next step.

  • 3. Preparing to commit changes to the server

    Step 1

    To make sure that your commits have your name and email address, create the following file ~/.gitconfig

    [user]
    name = "Your Name"
    email = "your@email.address.xz"
    

    Step 2

    If you got the code of the mob branch and before you upload your patch, somebody else committed a patch to the same branch, you should try to get and merge the updates first. Otherwise the changes already in the repository will be committed twice.

    cg update
    

    If your local changes conflict with the newest source code, it will tell you and refuse to apply the remote patch.

    4. Upload changes to server

    Uploading the patch has two steps:

    1. Prepare the commit

    cg commit -m "Explanation of changes" (committing all changed files)
    cg commit somefile1 somefile2 somedir/somefile3 -m "Explanation of changes" (committing some specific files and no others)
    

    or

    cg commit -M ./multi_line-file-that-contains-patch-information (first line is used as patch title!)
    

    And then in your editor just delete the lines beginning with CGF: where a file you don't want committed is listed. When everything is fine, continue, otherwise step back.


    2. Send the patch to server

    cg push (This actually sends your commits to the git server!)
    

    Now you are done, and the patch is visible to the world at http://repo.or.cz/w/siplcs.git?a=shortlog;h=mob


    5. Inform the developers

    It might be a good idea that the other developers know you just committed a patch. Please send an email to (debianmx@gmail.com) to inform them, describing your patch. Thanks!


    Other useful GIT stuff

    You can see what you modified by doing:

    cg status
    


    To see the differences:

    cg diff <somefile> (differences within a file)
    cg diff (all differences in the current map of the branch)
    


    And to restore the file to its original version:

    cg restore <somefile>
    cg restore *
    

    Thanks for visiting.

    Site content © Anibal Avelar aka "Fixxxer". Site and project are not endorsed by or for MSN.