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...)
 
(Refer to Getting Bluefish.)
 
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
===A short document how you should send your patches===
__TOC__


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


* update your CVS tree, or alternatively download the latest snapshot (see also [[Downloading from CVS]])
This is a short document how you should send your patches.


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.


* copy this original tree, so you can make a patch against this tree
==Getting the code==


====While coding:====
To get the bluefish source see [[Getting Bluefish]]. If you have checked out the code, then please first update it to retrieve the latest revision:
* 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
svn update
''' 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
 
==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 <tt>bf_lib.c</tt> and <tt>gtk_easy.c</tt> (javadoc style, with some small differences)
<!-- * 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...
* 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
* if you have the possibility do this both with gcc-2.95 and gcc-3. as compiler
* if you have the possibility do this even with gcc-2.95 and gcc-3 as compiler
* more to come later...
* more to come later...


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


suppose you have two directories, original-tree and my-tree
==Notes for translators==
* run make distclean in both trees
 
* cd to the parent dir of the two trees
The following information is for people wanting to translate Bluefish into their language and update an existing language.
* run ''diff -Naur original-tree my-tree | bzip2 -9c > patchbla.diff.bz2''
 
===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 msginit -l your_lang_code --no-translator ";"
 
===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 though.
 
==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 <code>svn update</code> and resolve all occuring conflicts (if any). Then produce the patch by using the <code>svn diff</code> command as shown below:
 
svn diff | bzip2 -9c &gt; your_patch.diff.bz2
svn diff src/foo.c data/bflang/foo.bflang2 | bzip2 -9c &gt; your_patch.diff.bz2
 
====Special notes for translators====
 
In case you have updated all <tt>your_lang.po</tt> files in the subversion tree and you want to send us a patch, you can use:


==== Sending the patch====
find . -name your_lang.po | xargs svn diff | bzip2 -9c &gt; your_lang.diff.bz2


You can send patches to the development mailinglist, or attach them to a bugzilla bugreport.
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. <tt>bluefish-unstable-1.3.6.orig</tt>) and your working tree (e.g. <tt>bluefish-unstable-1.3.6</tt>), then use the <tt>diff</tt> comand to produce a patch. Make sure you
 
* run <code>make distclean</code> (or even <code>make maintainer-clean</code>) in both trees
* <code>cd</code> to the parent dir of the two trees
* run <code>diff -purN original-tree working-tree | bzip2 -9c &gt; patch.diff.bz2</code>
 
 
==Sending the patch==
 
You can send patches to the [mailto:bluefish-dev@lists.ems.ru development mailinglist]<ref>You can subscribe to the developers' Bluefish mailing list by sending an email containing “subscribe bluefish-dev” to [mailto:bluefish-dev-request@lists.ems.ru bluefish-dev-request@lists.ems.ru].</ref> or attach them to a [http://bugzilla.gnome.org/buglist.cgi?product=bluefish bugzilla bugreport].


simple isn't it?
simple isn't it?
==notes and references==
<references/>

Latest revision as of 20:36, 29 September 2009


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


Getting the code[edit]

To get the bluefish source see Getting Bluefish. If you have checked out the code, then please first update it to retrieve the latest revision:

svn update


Notes for hackers[edit]

The following information is for people wanting to hack on Bluefishs source code.

While coding[edit]

  • 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[edit]

  • 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[edit]

The following information is for people wanting to translate Bluefish into their language and update an existing language.

Before you start[edit]

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 msginit -l your_lang_code --no-translator ";"

Before creating the patch[edit]

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 though.

Create the patch[edit]

Create the patch against the Subversion tree[edit]

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[edit]

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[edit]

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 even make 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[edit]

You can send patches to the development mailinglist<ref>You can subscribe to the developers' Bluefish mailing list by sending an email containing “subscribe bluefish-dev” to bluefish-dev-request@lists.ems.ru.</ref> or attach them to a bugzilla bugreport.

simple isn't it?

notes and references[edit]

<references/>