Contribution
The article describes how you can contribute to a CEGUI project with the help of BitBucket.
We prefer your contribution through BitBucket, because it simplifies the development process for both you and us. If your contribution needs a bit more tuning, we just say so and you make another commit to your BitBucket repository. After we are satisfied with the quality of the fixes, we simply pull them from you repository. And since your repository is located under your nickname, we will know you can be trusted. So it's a win-win for everybody.
If you prefer video tutorials, you can watch this tutorial.
Note: This tutorial describes contribution to CEED (CEGUI Editor) as a user kornerr as an example.
1. Import CEED repository to BitBucket
Go to Repositories -> import repository.
Input the following:
Source | Mercurial repository |
URL | http://crayzedsgui.hg.sourceforge.net/hgroot/crayzedsgui/CEED |
Requires authorization | No |
Name | CEED |
Private | No |
Language | Python (CEGUI itself is C++) |
Description | CEED contribution |
Website | Leave blank |
Wiki | Leave blank |
Issue tracking | Leave blank |
Press Import.
BitBucket will import the repository:
Wait a bit, and you're done:
2. Clone from BitBucket to your machine
cd ~ hg clone https://bitbucket.org/kornerr/ceed
This will clone CEED repository from BitBucket to your home directory.
3. Make changes, commit, and push
Make changes. Mine were:
diff --git a/compatibility/looknfeel/cegui.py b/compatibility/looknfeel/cegui.py --- a/compatibility/looknfeel/cegui.py +++ b/compatibility/looknfeel/cegui.py @@ -95,6 +95,9 @@ log = "" root = ElementTree.fromstring(data) + # Fix for Python < 2.7. + if not hasattr(root, "iter"): + root.iter = root.getiterator # version 7 has a version attribute root.set("version", "7")
Commit with a meaningful message, e.g., in my case it was:
hg commit -m "XML iterator fix for Python < 2.7. tested on Python 2.6"
And push it back to BitBucket:
kornerr@koren:~/ceed$ hg push pushing to https://bitbucket.org/kornerr/ceed searching for changes http authorization equired realm: Bitbucket.org HTTP user: kornerr password: remote: adding changesets remote: adding manifests remote: adding file changes remote: added 1 changesets with 1 changes to 1 files remote: bb/acl: kornerr is allowed. accepted payload.
You can see your changes at BitBucket now: