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 retrieve the latest revision:
svn update
Alternatively download the latest snapshot (see also Downloading from CVS). In this case make a copy of the
Notes for hackers
The following information is for people wanting to hack on Bluefishs source code.
While coding
- for indenting use tabs, not spaces
- comment all public functions like it is done in bf_lib.c and gtk_easy.c (javadoc style, with some small differences)
- 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 even with gcc-2.95 and gcc-3 as compiler
- more to come later...
Notes for translators
The following information is for people wanting to translate Bluefish into their language and update an existing language.
Before you start
Before you start contact our translation coordinator. To get a very last and complete template file run:
LINGUAS="your_lang" make update-po
After this step you can begin to work on these translations. For a list of all .po files for your language use find . -name your_lang.po
. If there are no .po file for your language, please contact our translaton coordinator. Files for a new translation can also be obtained with:
find . -name "*.pot" -execdir cp "{}" your_lang.po ";"
Before creating the patch
The following step is not necessary but it will help you finding issues, which must be fixed, before your changes can be committed to the subversion tree. It requires an installation of the gettext tools.
find . -name lang.po | xargs msgcat --use-first -o - | msgfmt -o /dev/null --statistics -
This step should report missing or fuzzy translations and even errors in your .po file. It won't report wrong translations hough.
Create the patch
Create the patch against the Subversion tree
Before you create a patch in the subversion tree you should again update it to the latest SVN revision via svn update
and resolve all occuring conflicts (if any). Then produce the patch by using the svn diff
command as shown below:
svn diff | bzip2 -9c > your_patch.diff.bz2 svn diff src/foo.c data/bflang/foo.bflang2 | bzip2 -9c > your_patch.diff.bz2
Special notes for translators
In case you have updated all your_lang.po files in the subversion tree and you want to send us a patch, you can use:
find . -name your_lang.po | xargs svn diff | bzip2 -9c > your_lang.diff.bz2
Alternatively you can send us the files too by adding them to a tarball:
find . -name your_lang.po | xargs tar -cjf your_lang.tar.bz2
Create the patch against the tarball
Suppose you have two directories, the original tree (e.g. bluefish-unstable-1.3.6.orig) and your working tree (e.g. bluefish-unstable-1.3.6), then use the diff comand to produce a patch. Make sure you
- run
make distclean
(or evenmake maintainer-clean
) in both trees cd
to the parent dir of the two trees- run
diff -purN original-tree working-tree | bzip2 -9c > patch.diff.bz2
Sending the patch
You can send patches to the development mailinglist or attach them to a bugzilla bugreport.
simple isn't it?