Contributing Patches

Pacemaker uses the Mercurial revision control system for source code management. If you would like to contribute a bug fix or new feature, you are highly encouraged to submit your patch in a format that Mercurial can easily import. Don't despair -- it's actually quite easy.

Mercurial primer
Mercurial is a distributed, lightweight, open source Revision control system that allows for decentralized development. If you are a Mercurial newbie, then the Tutorial is an excellent starting point. For more in-depth information, dig deep into Mercurial: The Definitive Guide.

Mercurial repositories used by Pacemaker
Code that is part of or related to Pacemaker is spread out over a handful of distinct Mercurial repositories:

Please note: the OpenAIS cluster stack, the preferred cluster stack for Pacemaker, does not use Mercurial, nor is it hosted on the Linux-HA or Clusterlabs server infrastructure. If you wish to contribute patches to OpenAIS, please refer to the Developers page on the OpenAIS Wiki.

Setting Mercurial preferences
User-level preferences for Mercurial live in a file named .hgrc in your home directory. You may want to set your preferences similar to this:

[ui] username = J. Random Hacker 

[extensions] hgext.mq= hgext.patchbomb= hgext.hgk=

[email] from = J. Random Hacker  bcc = J. Random Hacker  method = smtp

[smtp] host = mail.example.com username = jrh tls = true

These preferences will enable you to submit patches via the Patchbomb extension, using SMTP securely via TLS. They will also enable Mercurial Queues, described below.

Cloning a Mercurial repository
To create a local copy of a Mercurial repository, issue the following command in a directory set aside for this purpose:

hg clone http://hg.clusterlabs.org/pacemaker/stable-1.0 pacemaker-stable-1.0