Adium

Contributing Code

Once you have checked out the Adium source code, you can fix bugs or implement features and then submit your changes for inclusion in Adium. Email the development mailing list or the Patch Master if you have any questions.

Finding a bug or a feature request to work on

If you fix or implement a ticket, you should document this on the relevant ticket. If you fix a bug which is not listed, please create a ticket.

Committing

First of all, you should commit your changes to your own repository.

  1. From the Terminal, change to the Adium folder. If it is in your home directory, this would be:
    cd ~/adium
    
  2. If you have created new files, you should do:
    hg add firstnewfile secondnewfile ...
    
  3. Please be sure your patch has been thoroughly tested and conforms to the Adium coding style guidelines.
    → You can contact the current Patch Master for help and advice.
  4. Additionally, please make sure your full name is in Copyright.txt as part of your patch. It helps us keep track of people that have contributed to Adium and credits you for your contribution.
  5. Make sure you have created the Mercurial configuration file ~/.hgrc with your email and real name (these will be shown publicly). See the Mercurial documentation for more information about how to do that.
  6. Commit your changes:
    hg commit
    
    You will need to enter a commit message. Please give a brief summary in the first line, and then describe the change more fully in subsequent lines (after at least one hard line break).

Ways to contribute

Broadly, there are two ways to send a patch to us. One is to go through Bitbucket, creating your own fork and then letting us know that we should pull from it. This is a great method if you have multiple changes or a longer term project. The other is to create a patch file (or diff) and submit that file. Either way, you should use an existing ticket or create a new one related to your code. See below for details.

Bitbucket

This is probably the simplest way to get started. However, it requires you to know a bit about Mercurial, and to have a Bitbucket account.

  1. Go to Adium's page on bitbucket.
  2. Choose the appropriate repository (depending on which version of Adium you want to hack on)
  3. While signed in to Bitbucket, click the "Fork" button.
  4. Follow the instructions on Bitbucket to create the fork.
  5. Once the fork is created, you can push your changes from your local repository to Bitbucket. Make sure you have committed your changes, and then use the command: hg push to do this. More information is available on the Bitbucket website.

When noting in the ticket that you've written a fix or improvement, provide a link to your Bitbucket fork.

Mercurial Bundles

It is also possible to instruct Mercurial to create a self-contained archive of your changes. make sure you have committed your changes and use the hg bundle command. To make sure you only bundle your own changesets, do:

  1. Make sure you have committed your changes.
  2. Use the following command to create your bundle:
    hg bundle MyBundle.hgbundle https://hg.adium.im/adium
    
    Or, if you are working on adium-1.4:
    hg bundle MyBundle.hgbundle https://hg.adium.im/adium-1.4
    

Now, go to the ticket you've created or found. You'll need to Register (if you don't have a Trac account) and Login. You can then click Attach File to attach your bundle. Add a comment detailing your patch, and set the Patch field of your trac ticket to "Initially included".

Creating and submitting a patch file

Probably the most complicated method, but a safe fallback if none of the others work for whatever reason.

  1. Make sure you have committed your changes.
  2. Export the patch:
    hg export --git tip > myPatch.diff
    
    where myPatch is a name for your patch. This will create a patch file from the commit you just created.

Also in this case, go to the ticket you've created or found. You'll need to Register (if you don't have a Trac account) and Login. You can then click Attach File to attach your diff. Add a comment detailing your patch, and set the Patch field of your trac ticket to "Initially included".

Other options to submit your changes

Own hosted Mercurial repository

It is also possible to host your own Mercurial repository that is a clone of Adium's. The instructions are a bit much to detail here, but there's more information on the Mercurial wiki.

Patch Queues

It is also possible to create and host Patch Queues with Mercurial's mq extension, both on Bitbucket and on your own servers. Again, more information is on the Mercurial wiki.

Page last modified by Robby, 3 years ago