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.
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 ceate 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. It requires you to know a bit about Mercurial, and to have a Bitbucket account, however.
- Go to Adium's page on bitbucket.
- Choose the appropriate repository (depending on which version of Adium you want to hack on)
- While signed in to Bitbucket, click the "Fork" button.
- Follow the instructions on Bitbucket to create the fork.
- Once the fork is created, you should push your changes from your local repository to Bitbucket. You can 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 version of your changes. To do this, use the hg bundle command. You'll probably end up typing something like hg bundle mybundle.hgbundle ssh://hg@h.adium.im/adium, but see the Mercurial documentation for more information.
Creating and submitting a patch file
Probably the most complicated method, but a safe fallback if none of the others work for whatever reason.
- From the Terminal, change to the Adium folder. If it is in your home directory, this would be:
cd ~/adium
- If you have created new files, you should do:
hg add
- 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. - Additionally, please include 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.
- 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). - 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.
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 patch. Add a comment detailing your patch, and set the Patch field of your trac ticket.
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, both on Bitbucket and on your own servers. Again, more information is on the Mercurial wiki.

