Sending Patches: Difference between revisions

From Bluefish Wiki
Jump to navigation Jump to search
(New page: ===A short document how you should send your patches=== ====Before starting to code:==== * update your CVS tree, or alternatively download the latest snapshot (see also [[Downloading fro...)
 
(Starting to update the document. cvs->svn transition and update.)
Line 1: Line 1:
===A short document how you should send your patches===
This is a short document how you should send your patches.


====Before starting to code:====
==Before starting to code==


* update your CVS tree, or alternatively download the latest snapshot (see also [[Downloading from CVS]])
We have two main branches in our [https://bluefish.svn.sourceforge.net Subversion] tree:


we have two development brances: the stable 1.0 brach that should only get bugfixes, and the CVS HEAD branch, that gets all the new features.
* the [http://bluefish.svn.sourceforge.net/viewvc/bluefish/http://bluefish.svn.sourceforge.net/viewvc/bluefish/branches/bluefish_1_0/ stable 1.0 branch] (gets mainly bugfixes; no major rewrites)
* the [http://bluefish.svn.sourceforge.net/viewvc/bluefish/trunk/bluefish/ development 1.3 branch] (major rewrites, new features).


* copy this original tree, so you can make a patch against this tree
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
 
<pre>svn co https://bluefish.svn.sourceforge.net/svnroot/bluefish/trunk/bluefish/
svn co https://bluefish.svn.sourceforge.net/svnroot/bluefish/branches/bluefish_1_0/</pre>
 
If you already have checked out the code, then please first update it to retreive the latest revision:
 
<pre>svn update</pre>
 
Alternatively download the latest snapshot (see also [[Downloading from CVS]]).
 
 
==While coding==


====While coding:====
* use tabs, not spaces, for indenting, so everybody can use their own preferred tabsize
* use tabs, not spaces, for indenting, so everybody can use their own preferred tabsize
* comment all public functions like it is done in bf''lib.c and gtk''easy.c (javadoc style, with some small differences), this can be used to create a function reference
* comment all public functions like it is done in bf''lib.c and gtk''easy.c (javadoc style, with some small differences), this can be used to create a function reference
Line 16: Line 33:
* more to come...
* more to come...


====Before creating the patch:====
==Before creating the patch==


* run ''make distclean && ./configure && make'' and test if it runs successfull
* run ''make distclean && ./configure && make'' and test if it runs successfull
Line 22: Line 39:
* more to come later...
* more to come later...


====Now create the patch====
==Now create the patch==


suppose you have two directories, original-tree and my-tree
suppose you have two directories, original-tree and my-tree
Line 29: Line 46:
* run ''diff -Naur original-tree my-tree | bzip2 -9c > patchbla.diff.bz2''
* run ''diff -Naur original-tree my-tree | bzip2 -9c > patchbla.diff.bz2''


==== Sending the patch====
== Sending the patch==


You can send patches to the development mailinglist, or attach them to a bugzilla bugreport.
You can send patches to the development mailinglist, or attach them to a bugzilla bugreport.


simple isn't it?
simple isn't it?

Revision as of 12:34, 18 September 2009

This is a short document how you should send your patches.

Before starting to code

We have two main branches in our Subversion tree:

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?