How can I submit a patch?

Created by Michael Rooney
Keywords:
patch branch bazaar launchpad
Last updated by:
Michael Rooney

Thanks for your interest in contributing!

The easiest way to contribute is by branching the code and submitting a merge proposal. However if you already have a patch, see the == PATCHES == section below.

== BRANCHES ==

Here's an example of how to create a new branch and propose for merging. If you are new to bazaar and Launchpad, check out the 5 minute guide at http://doc.bazaar-vcs.org/latest/en/mini-tutorial/. Now, let's say in this example you are joeuser and want to implement themed colors.

1. Run "bzr branch lp:wxbanker". This will create a branch of the code in the current directory named "wxbanker".
2. Make any changes to the code you desire.
3. Commit the changes: "bzr commit -m "implemented my great new feature XYZ""
4. Push up your new branch: "bzr push lp:~joeuser/wxbanker/themed-colors".
5. Visit https://code.launchpad.net/~joeuser/wxbanker/themed-colors (not a real link, it will be based on the previous line) and click the "Propose for merging" link. The target branch is probably already lp:wxbanker and is correct, and you can likely leave "Prerequisite Branch" empty. Now just fill in the comments explaining your changes and any integration notes.

Once you do this, I will receive an email from Launchpad telling me you want your code merged, and can begin the review process.

If you get stuck anywhere along this process, please feel free to ask for help on IRC in #wxbanker on irc.freenode.net, or open a bug in wxBanker (https://bugs.launchpad.net/wxbanker/+filebug) explaining where you got stuck and we can resolve the issues.

== PATCHES ==

It is recommended that you use the above approach to create a branch and file a merge proposal, but if that process is overwhelming feel free to simply create a patch and attach it to a bug report.

To create a patch:
1. Check out the wxBanker code: "bzr co lp:wxbanker"
2. Perform any modifications you desire to the code files in the wxbanker directory.
3. From inside the wxbanker directory, run "bzr diff > mypatch.patch"

Now once you have a patch:
1. File a bug report on https://bugs.launchpad.net/wxbanker
2. Put "[PATCH]" at the beginning of the title, followed by a brief description of what the patch does.
3. Add your patch as an attachment, and check the box which marks as a patch.

Then it can be reviewed and hopefully applied! Just make sure to create your patch against trunk, which you can obtain by doing something such as: "bzr branch lp:wxbanker".