Difference between revisions of "Creating a patch to submit (Patch Tracker)"

From Code::Blocks
(Finished paragraph.)
(Enhanced introduction)
Line 2: Line 2:
  
 
== Introduction ==
 
== Introduction ==
If you want to contribute to Code::Blocks you can make it easier for the developers to integrate your patches if you follow the advices of this page. Patches can be created in different formats. The format that is used by Code::Blocks is called a "unified diff". Hence 3rd party tools may still create a different patch format allthough it may be labelled as "unified diff". To avoid unnecessary incompatibilities the best way to provide a patch is to '''use the Subversion (SVN) diff''' (at the command line or using a SVN GUI application).
+
You ant to contribute to Code::Blocks? - Thank you! That is really appreciated. Hence you can help us even more if you read the following paragraphs carefully.
 +
 
 +
First of all please make sure the feature you are implementing is not already implemented in the "nigthly builds" of Code::Blocks ([https://www.codeblocks.org/nightly https://www.codeblocks.org/nightly]). Furthermore browse through the list of available patches at the Code::Blocks project page at BErliOS (see below how to gain access). If you are unsure, don't hesitate to ask in the forum ([ ]) for advise.
 +
 
 +
You can make it easier for the developers to integrate your patches if you follow the advices of this page. Patches can be created in different formats. The format that is used by Code::Blocks is called a "unified diff". Hence 3rd party tools may still create a different patch format allthough it may be labelled as "unified diff". To avoid unnecessary incompatibilities the best way to provide a patch is to '''use the Subversion (SVN) diff''' (at the command line or using a SVN GUI application).
  
 
== What is required? ==
 
== What is required? ==
Line 15: Line 19:
 
...replacing "my" with a descriptive name. Please make sure you leave the file ectension ".patch" as this avoids conflicts while submitting the patch. This operation may take a while. A connection to the (remote) repository is established to compute the patch data. Please be patient!
 
...replacing "my" with a descriptive name. Please make sure you leave the file ectension ".patch" as this avoids conflicts while submitting the patch. This operation may take a while. A connection to the (remote) repository is established to compute the patch data. Please be patient!
 
Once the patch file is created please make sure it contains content! Otherwise make sure you followed the steps above or ask in the forum ([ ]) for support.
 
Once the patch file is created please make sure it contains content! Otherwise make sure you followed the steps above or ask in the forum ([ ]) for support.
 +
 +
== Patch submission ==
 +
By now you are ready to submit your work to the Patch Tracker at BerliOS ([http://developer.berlios.de/projects/codeblocks http://developer.berlios.de/projects/codeblocks/]) - the developer platform for Code::Blocks. If you haven't done already you need to register with BerliOS to gain the right to submit patches to projects. The membership is free and appreciated. Select the "Patches" section ([http://developer.berlios.de/patch/?group_id=5358 http://developer.berlios.de/patch/?group_id=5358]) of the Code::Blocks project page.

Revision as of 17:57, 2 March 2006

WARNING: Page is under development. Please do not change until this message disappears.

Introduction

You ant to contribute to Code::Blocks? - Thank you! That is really appreciated. Hence you can help us even more if you read the following paragraphs carefully.

First of all please make sure the feature you are implementing is not already implemented in the "nigthly builds" of Code::Blocks (https://www.codeblocks.org/nightly). Furthermore browse through the list of available patches at the Code::Blocks project page at BErliOS (see below how to gain access). If you are unsure, don't hesitate to ask in the forum ([ ]) for advise.

You can make it easier for the developers to integrate your patches if you follow the advices of this page. Patches can be created in different formats. The format that is used by Code::Blocks is called a "unified diff". Hence 3rd party tools may still create a different patch format allthough it may be labelled as "unified diff". To avoid unnecessary incompatibilities the best way to provide a patch is to use the Subversion (SVN) diff (at the command line or using a SVN GUI application).

What is required?

Not too much, you might already have the required tools installed. You'll need a subversion client. You can download a current version for your OS at the Subversion project webpage here: http://subversion.tigris.org. It is a good idea to apply your code to the most up-to-date Code::Blocks sources as they are available at the SVN repository. You'll find the instructions how to obtain the sources here: https://www.codeblocks.org/source_code.shtml. Once you've created your local sandbox you can start integrating your changes to that revision. Thus you may modify existing files or add new ones. When you have finished please make sure you've verified your changes work. Now it's time to create the patch.

Patch creation

If you have added new files you first have to register them with your sandbox. Thus go into the directory you've added new files and type at the command line:

svn add filename(s)

...whereas "filename(s)" needs to be replaced with the files you've added. Of course if you are not using the command line version of SVN you can easily use the "Add" feature of your prefered SVN GUI. If you've completed adding all your new files to your sandbox your are ready to create the patch. First of all go to the top-level directory of your sandbox (the first directory that has a hidden ".svn" folder with content). Then type at the command line:

svn.exe diff > my.patch

...replacing "my" with a descriptive name. Please make sure you leave the file ectension ".patch" as this avoids conflicts while submitting the patch. This operation may take a while. A connection to the (remote) repository is established to compute the patch data. Please be patient! Once the patch file is created please make sure it contains content! Otherwise make sure you followed the steps above or ask in the forum ([ ]) for support.

Patch submission

By now you are ready to submit your work to the Patch Tracker at BerliOS (http://developer.berlios.de/projects/codeblocks/) - the developer platform for Code::Blocks. If you haven't done already you need to register with BerliOS to gain the right to submit patches to projects. The membership is free and appreciated. Select the "Patches" section (http://developer.berlios.de/patch/?group_id=5358) of the Code::Blocks project page.