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.
Import CEED repository to BitBucket
Input the following:
|Language||Python (CEGUI itself is C++)|
|Issue tracking||Leave blank|
BitBucket will import the repository:
Wait a bit, and you're done:
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.
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:
Note: Please, don't try to merge many fixes into single commit. Place each fix into its own commit. It will be easier for us to understand your fixes and accept it faster.
Contact CEGUI developer(s)
Use IRC, mail, or mantis. Tell the URL of your repository and list the changesets you want into upstream.
If you will contribute again later, you need to first update your BitBucket repository to upstream version, and only then make changes. Please, do it, otherwise your fixes may be rejected simply because we can't spend hours in figuring out how to apply your old changes to the latest version.
To update your BitBucket repository to upstream version, go to your clone of BitBucket repository on your machine and do:
hg pull -u https://bitbucket.org/cegui/CEED
Then simply push the changes back to your BitBucket repository: