Difference between revisions of "Contribution"

From CEGUI Wiki - Crazy Eddie's GUI System (Open Source)
Jump to: navigation, search
(3. Make changes, commit, and push)
Line 97: Line 97:
  
 
[[Image:Ceed_contrib_push.png]]
 
[[Image:Ceed_contrib_push.png]]
 +
 +
'''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.'''
 +
 +
== 4. Contact CEGUI developer(s) ==
 +
Use IRC, mail, or mantis. Tell the URL of your repository and list the changesets you want into upstream.

Revision as of 12:57, 26 September 2011

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:

Ceed contrib import repo.png

Wait a bit, and you're done:

Ceed contrib import repo done.png

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:

Ceed contrib push.png

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.

4. Contact CEGUI developer(s)

Use IRC, mail, or mantis. Tell the URL of your repository and list the changesets you want into upstream.