Sending Patches
This is a short document how you should send your patches.
Before starting to code
We have two main branches in our Subversion tree:
- the stable 1.0 branch (gets mainly bugfixes; no major rewrites)
- the development 1.3 branch (major rewrites, new features).
Make a checkout of the branch you want to work on. Sometimes we also have some branches, when we work on new major features or rewrites. But you usually want one of the above.
Getting the code
To checkout one of the branches
svn co https://bluefish.svn.sourceforge.net/svnroot/bluefish/trunk/bluefish/ svn co https://bluefish.svn.sourceforge.net/svnroot/bluefish/branches/bluefish_1_0/
If you already have checked out the code, then please first update it to retreive the latest revision:
svn update
Alternatively download the latest snapshot (see also Downloading from CVS).
While coding
- use tabs, not spaces, for indenting, so everybody can use their own preferred tabsize
- comment all public functions like it is done in bflib.c and gtkeasy.c (javadoc style, with some small differences), this can be used to create a function reference
declare all local functions as 'static', declare all non-local functions in the ''''.h file
- for gtk callback functions, use the name of the signal in the name, and append lcb to the function name if it is local, or cb for non-local callbacks
- more to come...
Before creating the patch
- run make distclean && ./configure && make and test if it runs successfull
- if you have the possibility do this both with gcc-2.95 and gcc-3. as compiler
- more to come later...
Now create the patch
suppose you have two directories, original-tree and my-tree
- run make distclean in both trees
- cd to the parent dir of the two trees
- run diff -Naur original-tree my-tree | bzip2 -9c > patchbla.diff.bz2
Sending the patch
You can send patches to the development mailinglist, or attach them to a bugzilla bugreport.
simple isn't it?